[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


...calculate MIPS in JPEG? How much mips does jpeg...

<< Back to: JPEG image compression FAQ, part 1/2

Question by john
Submitted on 5/5/2004
Related FAQ: JPEG image compression FAQ, part 1/2
Rating: Rate this question: Vote
How do you calculate MIPS in JPEG?
How much mips does jpeg take?



Answer by Bobsobol
Submitted on 12/23/2005
Rating: Not yet rated Rate this answer: Vote
Can I answer this question? It's beautifully nonsensical. Like the question "How much Horse Power in a Piece of Cheese?"

Some calculation could be done to work out Calories or Kilojoules in the cheese if the cheese where known and what that translates to on a particular machines energy efficiency but the two terms are largely un-related.

Analogy over, the best answer I could give to your question john, is long winded and will probably not tell you what you want to know, but only confirm that you are confusing terms and asking the wrong question. ;) My guess is that the question you wanted to ask was how many Mega-pixels or Mega-bits in a JPEG, which are quite different measurements entirely. Comparing Mega-Pixels to MIPS is like comparing Yards to Liters. In that "how many Yards to a Litre" is only comparable if the Yard is one of Ale. ;)

JPEG usually refers to an image compression encoding, MIPS is a rough (and many say meaningless) measurement of maximum workload on a particular processing unit over time. (how long a processor will take to work out a tricky equation). Since JPEG compression could be considered "a tricky equation" some comparison could be made there but you would need to know the size of the image compressed, the level of JPEG compression applied, the output format desired; which varies from machine to machine depending on your application of the decode.. ie do you want a RAW bitmap out and do you want it in 8 bit grey scale, 8-16 bit pallet mapped, 24 or 32 bit chunky or planar format? If you use palatte mapping what method of colour reduction do you want to use as this in it's self is "a tricky equation" and there are options for raw image compression such as RLE or HAM.

How can such a short simple question be so complex.

Next to work out how many instructions it will take you need to consider the complexity of the instruction set, and whether or not you include Floating Point Operations? Strictly speaking most MIPS checks do not utalise Floating Point arithmetic as this is calculated in the secondary sub benchmark MFLOpS. However as JPEG compression is largely based on DCT (Discrete Co-Sign Transformations) it takes an awful lot of integer math operations to accurately simulate such Floating Point operations. If we ignore the limitations of the standard MIPS benchmark and just concentrate on the instructions you have available you need to note that many processors do not have access to internal floating point units, and may have access to more complex instruction sets such as MMX, SSE, 3DNow! in iNTEL x86 terms or Altivec for PPC range, not to mention other technologies which exist in the wild of mobile or multimedia devices and Mainframe systems.

Effectively you need to find the most optimal JPEG decoder for the processor you have in mind. Which means implementing JPEG decoding to your desired output by hand assembly. Count the number of instructions you execute to complete the decode for your desired JPEG image, and compare this to the MIPS rating of your system to see how long it will/should take.

Of course by the time you've done all that the JPEG has already been decoded by your code and you could more easily have done the decoding by hand on several bits of paper.

But from an academic point of view this could be useful for calculating the amount of time it would take to decode several thousand JPEGS of a specific (quantifiable, even if variable) size.

The MIPS rating will be highly inaccurate for this however as it would assume all instructions take the same amount of time, where your implementation of JPEG decompression will execute several fast jump operations and several slow floating point operations.

And in a real world environment, data transfer across data buses and delays in reading from (and possibly writing to) long term storage devices will mean that processing is halted (or at least diverted to another unrelated process) while the Mass Storage Device (probably a hard disk) responds.

These and many more reasons explain why many people consider MIPS ratings irrelevant. However if you simply wish to compare the speed of two CPUs with similar clock speeds and completely alien instruction sets for general unspecified applications MIPS can help you do that.

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: JPEG image compression FAQ, part 1/2


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.