Hello,
We would like to use libmad to do multiple decodes simultaniously. I don't know much about the decoding algorithm and was wondering if it takes a different amount of CPU power to decode different MP3's.
For example, are there MP3's which are somehow more "complex" and require more CPU horsepower to decode than others?
Thanks, Ira Weiny iweiny@acm.org
On Wednesday, February 20, 2002, at 05:16 PM, Ira Weiny wrote:
We would like to use libmad to do multiple decodes simultaniously. I don't know much about the decoding algorithm and was wondering if it takes a different amount of CPU power to decode different MP3's.
For example, are there MP3's which are somehow more "complex" and require more CPU horsepower to decode than others?
A number of bitstream factors influence decoder complexity and affect CPU requirements. Roughly, in order from most influence to least:
- Layer. Layer III (MP3) is more complex than Layer II, which in turn is more complex than Layer I.
- Number of output channels. Two channels require more work to decode than a single channel.
- Sample rate. The more samples which must be decoded per second, the more CPU instructions executed per second.
- Stereo mode. The space savings of joint stereo is offset by additional decoder complexity.
- Bit rate. The higher the bit rate, the more data which may appear in each frame to be decoded.
Many people think the bit rate is the most influential factor, but this is not true. The most computationally-intense routines are synthesis and Layer III IMDCT, and since these operate after all data has been extracted from the frame, they are unaffected by the bit rate. For a given sample rate, the bit rate merely determines the length of the frame. Since each frame generally yields the same number of samples, the sample rate is the more important factor.
Decoder complexity can also vary slightly from frame to frame, so for example a silent passage or one with localized harmonic frequencies can require less effort to decode than a noisy passage or one with frequencies spread across the spectrum.
-- Rob Leslie rob@mars.org