[FFmpeg-devel] [PATCH] HE-AAC v1 decoder

Vitor Sessak vitor1001
Wed Jan 27 15:37:26 CET 2010


Alexander Strange wrote:
> On Jan 26, 2010, at 10:10 PM, Alex Converse wrote:
> 
>> Greetings Sirs,
>>
>> Enclosed you will find one (1) HE-AAC decoder to make glorious great
>> software FFmpeg.
>>
>> Heart,
>>
>> Alex
> 
> 
> Some comments:

[...]

>> +    for (k = 0; k < num_bands-1; k++) {
>> +        prod *= base;
>> +        present  = lroundf(start * prod);
>> +        bands[k] = present - previous;
>> +        previous = present;
>> +    }
> 
> You use lroundf() a lot, which is a library call for me. Can't you set the rounding direction (or just ignore it) and cast instead?
> Also, this is called later on with the output qsorted afterwards, but it doesn't look like it can be generated out of order.

BTW, we should avoid doing float -> integer conversions when possible, 
it amplify floating-point differences and may make output varies wildly 
across archs.

-Vitor



More information about the ffmpeg-devel mailing list