[FFmpeg-devel] [PATCH] AAC decoder

Robert Swain robert.swain
Fri May 23 11:08:47 CEST 2008


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().

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



More information about the ffmpeg-devel mailing list