summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-22 11:30:52 -0500
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-24 20:36:40 -0500
commit81a0aec29e7aa325b46b1942fe477b83fb54eb3a (patch)
treecd519982a875cce7e5f85ab5e2ebb4cb745fafb0 /libavcodec
parentaececd11abadf7c59531cd62721726b774468ee1 (diff)
avcodec/aacps_tablegen: use hypot()
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacps_tablegen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacps_tablegen.h b/libavcodec/aacps_tablegen.h
index ca1112ddd0..0bd51ccf57 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;
}