[FFmpeg-devel] [PATCH] AAC: optimise bitstream reading in decode_spectrum_and_dequant()

Måns Rullgård mans
Fri Jan 15 15:05:08 CET 2010


Robert Swain <robert.swain at gmail.com> writes:

> On 15/01/10 13:41, M?ns Rullg?rd wrote:
>> Robert Swain<robert.swain at gmail.com>  writes:
>>
>>> On 15/01/10 05:10, Mans Rullgard wrote:
>>>> Using the low-level macros directly avoids redundant open/update/close
>>>> cycles.
>>>>
>>>> 2-3% faster on ARM, PPC, and Core i7.
>>>
>>> Nice! Keep them coming. :)
>>>
>>>> ---
>>>>    libavcodec/aac.c |   93 +++++++++++++++++++++++++++++++++++++----------------
>>>>    1 files changed, 65 insertions(+), 28 deletions(-)
>>>>
>>>> diff --git a/libavcodec/aac.c b/libavcodec/aac.c
>>>> index 393f2e6..0fbab77 100644
>>>> --- a/libavcodec/aac.c
>>>> +++ b/libavcodec/aac.c
>>>
>>> [...]
>>>
>>>> -                            const int index = get_vlc2(gb, vlc_tab, 8, 2);
>>>> +                            int code;
>>>
>>> My only comment is that this variable rename seems unrelated. Apply
>>> that change separately in my opinion.
>>
>> The GET_VLC macro declares a temp variable called index, so it has to
>> be renamed.
>
> Then maybe either add a comment to the macro to this effect, or
> obfuscate the name of the variable in the macro a bit so name clashes
> shouldn't occur.
>
> Otherwise, OK to apply.

Applied.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list