Browse Source

avcodec/aacps_tablegen: use hypot()

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
tags/n3.0
Ganesh Ajjanagadde 9 years ago
parent
commit
81a0aec29e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/aacps_tablegen.h

+ 1
- 1
libavcodec/aacps_tablegen.h View File

@@ -136,7 +136,7 @@ static av_cold void ps_tableinit(void)
float pd2_im = ipdopd_sin[pd2]; float pd2_im = ipdopd_sin[pd2];
float re_smooth = 0.25f * pd0_re + 0.5f * pd1_re + pd2_re; 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 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_re_smooth[pd0*64+pd1*8+pd2] = re_smooth * pd_mag;
pd_im_smooth[pd0*64+pd1*8+pd2] = im_smooth * pd_mag; pd_im_smooth[pd0*64+pd1*8+pd2] = im_smooth * pd_mag;
} }


Loading…
Cancel
Save