[FFmpeg-devel] [PATCH 1/4] libavcodec: Implementation of AC3 fixed point decoder
michaelni at gmx.at
Thu Nov 14 22:59:12 CET 2013
On Thu, Nov 14, 2013 at 03:37:11PM +0000, Nedeljko Babic wrote:
> >> >> >> +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.
you could << the input integer, to increase the precission available
on the output
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel