[FFmpeg-devel] [PATCH 03/10] avcodec/aacps_tablegen: use hypot()

Ganesh Ajjanagadde gajjanagadde at gmail.com
Wed Nov 25 02:41:31 CET 2015


On Sun, Nov 22, 2015 at 6:59 PM, Rostislav Pehlivanov
<atomnuker at gmail.com> wrote:
> LGTM, feel free to apply.

pushed, thanks

>
> On Sun, 2015-11-22 at 12:05 -0500, Ganesh Ajjanagadde wrote:
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>>  libavcodec/aacps_tablegen.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/aacps_tablegen.h
>> b/libavcodec/aacps_tablegen.h
>> index ca1112d..0bd51cc 100644
>> --- a/libavcodec/aacps_tablegen.h
>> +++ b/libavcodec/aacps_tablegen.h
>> @@ -136,7 +136,7 @@ static av_cold void ps_tableinit(void)
>>                  float pd2_im = ipdopd_sin[pd2];
>>                  float re_smooth = 0.25f * pd0_re + 0.5f * pd1_re +
>> pd2_re;
>>                  float im_smooth = 0.25f * pd0_im + 0.5f * pd1_im +
>> pd2_im;
>> -                float pd_mag = 1 / sqrt(im_smooth * im_smooth +
>> re_smooth * re_smooth);
>> +                float pd_mag = 1 / hypot(im_smooth, re_smooth);
>>                  pd_re_smooth[pd0*64+pd1*8+pd2] = re_smooth * pd_mag;
>>                  pd_im_smooth[pd0*64+pd1*8+pd2] = im_smooth * pd_mag;
>>              }


More information about the ffmpeg-devel mailing list