[FFmpeg-devel] [PATCH 2/2] libavcodec: Implementation of AC3 fixed point decoder

Nedeljko Babic Nedeljko.Babic at imgtec.com
Fri Apr 12 14:59:25 CEST 2013


Hi Christophe and thanks on your response,

Regarding your questions:
>
>1) If I haven't misread, you use a 20.12 FP format. It looks somewhat
>realistic. Do you think this format will still fit other codecs you
>might be working on?
>Because otherwise, the FP dsp functions would probably work only for
>that format, in which case the FP DSP context could hold somewhere
>info about the format used, so that proper dsp functions are set.
>

You are correct regarding format that we use here. For other codecs
that we are working on, format that will be used will depend on algorithm and 
I am not entirely sure at this moment that it will be the same format as here.

AS for FP DSP functions, adding additional parameter that hold info about
used format would increase their usability, but it would also add some overhead
to functions (for example for calculating rounding) and it is maybe overkill at 
this moment (since there is no code that uses other format).

>2) Some places use it seems 15bits of decimal precision. Why is that?
>

We are using different precision in accordance with the value range that we need in 
particular part of the algorithm.

>3) Speed-wise, how does it compare to the float version on your target device?
>You'd probably need to write optimized dsp functions first, I guess
>

When compairing optimized floating point version and fixed point version (both optimized
for our platform) fixed point code is 25% - 40% faster on our test streams (this is 
ofcourse for current version of optimized code)


>4) Third, quality-wise, how do you validate the quality?
>Something like outputting both float and FP decoders to 16bits signed,
>and computing the MSE/max error?
>Having some figures could be interesting.
>

We are comparing wav files generated by fixed and floating point decoders.
Max. difference on our test streams is 4 LSB bits when downsampling and 1 LSB bit 
without downsampling.

>5) Are there still some non-deterministic parts, like still using
>floats, besides the precomputed tables?
>ie, can the output be checked for exact matching via MD5?
>If one is to write optimized dsp functions besides yours, this could
>help check the validity of the optimizations.
>

There should be no non-deterministic parts left, so it should be possible to use 
tool for checking exact matching.


Regards,
Nedeljko


More information about the ffmpeg-devel mailing list