[FFmpeg-devel] [PATCH] AAC: unroll parts of decode_spectrum_and_dequant()

Robert Swain robert.swain
Tue Dec 9 18:37:18 CET 2008


2008/12/9 M?ns Rullg?rd <mans at mansr.com>:
> M?ns Rullg?rd wrote:
>> Michael Niedermayer wrote:
>>> something like:
>>> if (vq_ptr[2]) ((uint32_t*)coef)[coef_tmp_idx + 2] = (get_bits1(gb)<<31) +
>>> 0x3F800000;
>>>
>>> might be even faster
>>> but i agree with robert that this should be a seperate patch
>>
>> Strict aliasing violation.  Depending on CPU it might also be slower.
>> Most FPUs can generate +-1 constants efficiently.
>
> I meant that something like this could be faster:
>
>  if (vq_ptr[2]) coef[coef_tmp_idx + 2] = get_bits1(gb)? -1.0 : 1.0;
>
> IMO it deserves testing.

If it is, would you want the commit reverting and this committing
instead or would committing this over the top be acceptable?

Alex: Feel free to test M?ns' suggestion. :) I'm looking at your other patches.

Regards,
Rob



More information about the ffmpeg-devel mailing list