[FFmpeg-devel] [PATCH] Add x86-optimized versions of exponent_min().
Ronald S. Bultje
rsbultje
Thu Feb 10 13:10:46 CET 2011
Hi,
2011/2/9 M?ns Rullg?rd <mans at mansr.com>:
> Justin Ruggles <justin.ruggles at gmail.com> writes:
>> @@ -604,7 +580,7 @@ static void encode_exponents(AC3EncodeContext *s)
>> ? ? ?for (ch = 0; ch < s->channels; ch++) {
>> ? ? ? ? ?exp ? ? ? ? ?= s->blocks[0].exp[ch];
>> ? ? ? ? ?exp_strategy = s->exp_strategy[ch];
>> - ? ? ? ?nb_coefs ? ? = s->nb_coefs[ch];
>> + ? ? ? ?nb_coefs ? ? = FFALIGN(s->nb_coefs[ch], 16); // align for ac3_exponent_min()
>
> Is this a good idea? ?Wouldn't it be better to pass the actual value to
> the function, but allow the implementation to round it up. ?The buffer
> is already suitably padded.
good point. Justin, you can use jg (which is a signed greater-than
jump) instead of ja (unsigned version of the same thing) and then this
would work without this extra change. Otherwise looks good, if you can
fix this without breaking it, I'll push it.
Ronald
More information about the ffmpeg-devel
mailing list