[FFmpeg-devel] [PATCH] AAC decoder

Robert Swain robert.swain
Fri May 23 11:26:25 CEST 2008


2008/5/23 Robert Swain <robert.swain at gmail.com>:
> 2008/4/2 Michael Niedermayer <michaelni at gmx.at>:
>> On Tue, Apr 01, 2008 at 04:56:48PM +0200, Andreas ?man wrote:
>>> Andreas ?man wrote:
>
> [...]
>
>>> +static inline float ivquant(AACContext * ac, int a) {
>>> +    static const float sign[2] = { -1., 1. };
>>> +    int tmp = (a>>31);
>>> +    int abs_a = (a^tmp)-tmp;
>>> +    if (abs_a < sizeof(ac->ivquant_tab)/sizeof(ac->ivquant_tab[0]))
>>> +        return sign[tmp+1] * ac->ivquant_tab[abs_a];
>>
>> What is the point of the sign splitout? it seems that it would be simpler
>> to have that in teh table as well
>
> Kostya is in favour of removing the ivquant_tab table because it
> caches only a small number of possible values and its general impact
> on decoding speedup is not obvious.
>
> Attached is a patch that removes the ivquant_tab table and simplifies
> and moves the ivquant() functionality into the calling loop and
> removes the ivquant() function altogether as it isn't really needed to
> wrap pow().

Oops! sign * pow(abs(a), 4./3) != pow(a, 4./3) . Fixed patch attached
with bit magic returned.

I'll do some benchmarks too, just for good measure.

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20080523-1025-remove_ivquant.diff
Type: text/x-diff
Size: 1846 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080523/50e041e4/attachment.diff>



More information about the ffmpeg-devel mailing list