summaryrefslogtreecommitdiff
path: root/libavcodec/dca.c
diff options
context:
space:
mode:
authorChristophe Gisquet <Christophe.Gisquet@gmail.com>2010-07-12 12:32:24 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2010-07-12 12:32:24 +0000
commitf2401c214dd4ff3aa80c6d459ad55f0202bb382d (patch)
treed2a7da2c8509064d00bb8c3b96ee3c17887aa5e2 /libavcodec/dca.c
parentbf55cf19ca46fdc70444359558243813db40418f (diff)
Use math constant instead of hardcoded rounded value for sqrt(0.5).
Patch by Christophe.Gisquet (gmail) Originally committed as revision 24213 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r--libavcodec/dca.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index b81094a000..77299dfcb3 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -1403,8 +1403,8 @@ static int dca_decode_frame(AVCodecContext * avctx,
float* rt_chan = s->samples + s->channel_order_tab[s->xch_base_channel - 1] * 256;
int j;
for(j = 0; j < 256; ++j) {
- lt_chan[j] -= (back_chan[j] - s->add_bias) * 0.707107f;
- rt_chan[j] -= (back_chan[j] - s->add_bias) * 0.707107f;
+ lt_chan[j] -= (back_chan[j] - s->add_bias) * M_SQRT1_2;
+ rt_chan[j] -= (back_chan[j] - s->add_bias) * M_SQRT1_2;
}
}