On Tue, Nov 10, 2015 at 10:35:23PM -0500, Ganesh Ajjanagadde wrote: > This uses M_SQRT2, M_PI, and M_E instead of the actual literals. > Benefits include: > 1. Reduced scope for copy/paste errors and improved readability. > 2. Consistency across the codebase. > 3. Actually fixes an incorrect sqrt(2) in avcodec/ppc. > 4. Greater precision in avcodec/ac3. > > Patch tested with FATE on x86, ppc untested. > > Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com> > --- > libavcodec/ac3.h | 2 +- > libavcodec/cos_tablegen.c | 4 +++- > libavcodec/mpegaudioenc_template.c | 4 ++-- > libavcodec/mpegaudiotab.h | 2 -- > libavcodec/mpegvideo.c | 4 ++-- > libavcodec/ppc/fdctdsp.c | 21 ++++++++++----------- > libavcodec/ratecontrol.c | 4 ---- > libavcodec/simple_idct.c | 4 ++-- > libavfilter/af_dynaudnorm.c | 4 +--- > 9 files changed, 21 insertions(+), 28 deletions(-) > > diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h > index 3f67e09..4dc7373 100644 > --- a/libavcodec/ac3.h > +++ b/libavcodec/ac3.h > @@ -100,7 +100,7 @@ > #define AC3_LEVEL(x) ROUND15((x) * FIXR15(0.7071067811865476)) > > /* pre-defined gain values */ > -#define LEVEL_PLUS_3DB 1.4142135623730950 > +#define LEVEL_PLUS_3DB M_SQRT2 > #define LEVEL_PLUS_1POINT5DB 1.1892071150027209 > #define LEVEL_MINUS_1POINT5DB 0.8408964152537145
> #define LEVEL_MINUS_3DB 0.7071067811865476 M_SQRT1_2? [...] -- Clément B.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel