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

Nedeljko Babic Nedeljko.Babic at imgtec.com
Thu Nov 14 16:37:11 CET 2013


>> >> >> +static av_always_inline int fixed_sqrt(int x, int bits)
>> >> >
>> >> >why isnt ff_sqrt() used ?
>> >> 
>> >> Function fixed_sqrt was created because of the fixed point format that is
>> >> needed.
>> >
>> >can ff_sqrt() used instead or why is it not used ?
>> >are there speed or precission advanatges ?
>> 
>> Values obtained with ff_sqrt() can not be used because of the fixed point format
>> that we use in the code.
>
>i assume the difference is a matter of a single shift ?
>is the speed difference of using ff_sqrt() with a shift compared to
>a new function significant ?

We need 23 bits from sqrt output (for precision) and ff_sqrt gives only 16 useful bits.

-Nedeljko


More information about the ffmpeg-devel mailing list