[FFmpeg-soc] [PATCH 4/5] simplify precision normalization calculation

Justin Ruggles justin.ruggles at gmail.com
Wed Nov 17 22:55:07 CET 2010


Ronald S. Bultje wrote:

> Hi,
> 
> On Wed, Nov 17, 2010 at 2:37 AM, Justin Ruggles
> <justin.ruggles at gmail.com> wrote:
>> -            v = 14 - log2_tab(input_samples, AC3_BLOCK_SIZE*2);
>> -            if (v < 0)
>> -                v = 0;
>> +            v = FFMAX(0, 14 - log2_tab(input_samples, AC3_BLOCK_SIZE*2));
> [..]
> $ grep FFMAX libavutil/*.h
> libavutil/common.h:#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
> 
> This will calculate 14 - log2_bla bla twice, no?

Yes. I need to be more careful with FFMAX/FFMIN.

Thanks,
Justin



More information about the FFmpeg-soc mailing list