[FFmpeg-devel] [PATCH 1/2] libavcodec: changed mathematical functions in aacpsy.c

Zivkovic, Bojan (c) bojan at mips.com
Tue Nov 27 17:12:28 CET 2012


> You should avoid that kind of magic constants, they should be a define,
> and you should leave it to the compiler to calculate
> PSY_3GPP_THR_SPREAD_LOW * 2.302585f.

Will be done.

> In all cases, a question is why the compiler doesn't do that
> optimization and if that reason is an issue for us.
> In addition, doing the multiplication with single precision
> while doing the exponentiation with double precision seems just wrong to
> me.

We have tested these changes on 2 platforms - MIPS and x86. In both cases,
the outputs from the encoder stayed bit-exact (also FATE tests passed),
so I think that these changes do not affect on precision, but I can
typecast into double the result of division. Similiar answer for next

> I expect this to significantly change the precision of the calculation.
> I don't know whether this might not be an issue though.


More information about the ffmpeg-devel mailing list