summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudioenc_template.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-14 10:52:30 -0500
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-14 10:58:39 -0500
commit11f0acf829e26279c5f2a414c6860bd4933f29af (patch)
tree6b9bd171d1d7c4e97a3215c833c2e5970c7191b9 /libavcodec/mpegaudioenc_template.c
parentc5fa42c69aeccd644fb5a42b4995602d206f168b (diff)
avcodec/mpegaudio: use predefined M_SQRT2
M_SQRT2 is defined in math.h, or in avutil/mathematics.h for compatibility hacks. This uses this value instead of an ad-hoc define. Fixed point values produced by FIX() remain identical. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/mpegaudioenc_template.c')
-rw-r--r--libavcodec/mpegaudioenc_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegaudioenc_template.c b/libavcodec/mpegaudioenc_template.c
index ce93cc7c6d..b91d0a8895 100644
--- a/libavcodec/mpegaudioenc_template.c
+++ b/libavcodec/mpegaudioenc_template.c
@@ -244,11 +244,11 @@ static void idct32(int *out, int *tab)
do {
int x1, x2, x3, x4;
- x3 = MUL(t[16], FIX(SQRT2*0.5));
+ x3 = MUL(t[16], FIX(M_SQRT2*0.5));
x4 = t[0] - x3;
x3 = t[0] + x3;
- x2 = MUL(-(t[24] + t[8]), FIX(SQRT2*0.5));
+ x2 = MUL(-(t[24] + t[8]), FIX(M_SQRT2*0.5));
x1 = MUL((t[8] - x2), xp[0]);
x2 = MUL((t[8] + x2), xp[1]);