[FFmpeg-devel] [PATCH 2/3] avcodec/aacsbr: Add comment about possibly optimization in sbr_dequant()

Ganesh Ajjanagadde gajjanag at mit.edu
Fri Dec 11 17:21:51 CET 2015


On Fri, Dec 11, 2015 at 11:16 AM, Andreas Cadhalpun
<andreas.cadhalpun at googlemail.com> wrote:
> On 19.11.2015 14:17, Michael Niedermayer wrote:
>> From: Michael Niedermayer <michael at niedermayer.cc>
>>
>> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
>> ---
>>  libavcodec/aacsbr.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
>> index d1e3a91..e014646 100644
>> --- a/libavcodec/aacsbr.c
>> +++ b/libavcodec/aacsbr.c
>> @@ -73,6 +73,7 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
>>  {
>>      int k, e;
>>      int ch;
>> +    //TODO: Replace exp2f(0.5*x) by a LUT, the inputs are all integer and have a small range
>>
>>      if (id_aac == TYPE_CPE && sbr->bs_coupling) {
>>          float alpha      = sbr->data[0].bs_amp_res ?  1.0f :  0.5f;
>>
>
> This shouldn't hurt, with or without the clarification requested by Ganesh.

I am doing related work cleaning up and optimizing usages of slow libm
functions such as pow and exp2. Do you know the exact possible range
of the inputs x, and if so, can it be added to the comment? That will
be very helpful for me to come up with a patch. Thanks.

>
> Best regards,
> Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list