views:

299

answers:

2

Hello,

How do we get the performance of a video decoder as to how many frames it can decode per second. I know following parameters are used to arrive at fps but not able to relate them in a formula which gives the exact answer:

seconds taken to decode a video sequence, total number of frames in the encoded video sequence, clock rate of the hardware/processor which executes the code, Million cycles per second(MCPS) of the decoder

How is MCPS and fps related?

thank you.

-AD

+1  A: 

When a codec quotes a MCPS number it is for a specific hardware configuration.

Million Cycles Per Second. This parameter describes the performance of any software on a given processor. For example, when we say a codec takes 100 MCPS on a given processor, it means that it consumes 100 Million cycles of the processor every second. Reference

Also some video is encoded better by different codecs. Different video streams will have different performance characteristics based on the type of video encoded. There are codecs that encode anime very well and fast, but do horribly on DVD movies. There are many parameters to consider.

The best way to determine the performance a specific algorithm is to run it on the same hardware against the type of streams you think you will be encoding. you should do multiple runs with different video and average.

That said for a specific stream on a specific peice of hardware the math is relativly simple:

If it takes a 2.5Ghz processor 5 seconds to encode a file, the MCPS for that encoder is 2500/5 or 500 MCPS

There is also a peak MCPS number, where peak mcps can be defined as:

...Peak MCPS [quoted here] is the maximum average MCPS calculated over a sliding window of 4 pictures. The actual MCPS number may vary within a +/- 5% range. Reference
Byron Whitlock
@Byron: If a processor can generate 2500 Million cycles per second and if MCPS of some encoder running on it is 2500 MCPS, then it should take only 1 sec to encode it. So how come ur calculation above comes out to be 500 MCPS or am i missing something?
goldenmean
the 2.5 Ghz takes 5 seconds, not 1 second in my above calc. The MCPS is what you measure after encoding. So if it took 1 second, the MCPS would be 2500.
Byron Whitlock
Hi Byron, your calculation is not correct. Youare saying that the longer it takes to encode a file, the less MCPS it uses. While to all probability the encoder goes as fast as it can. So the MCPS should go up. Also, in your formula you don't take the number of frames of the file to be encoded into consideration.
Toad
Reinier: Thats the issue that i was trying to point out in Byron's logic/formula. Ideally if it takes less time to encode, then it should have less MCPS than the case when encoding time was more.
goldenmean
+1  A: 

Given the calculation of Byron. I think it should be more in the lines of:

A file F to be encoded which consists of N frames takes T seconds to be encoded on a processor which can do X MCPS

than I would say the encoder uses: (T*X)/N MC(million cycles) per frame

given that the framerate is F (for instance 25 frames a second)

than the above value times F gives the used MCPS for the encoder.

if this is lower than the MCPS of your processor, you can encode realtime (or faster).

R

Toad