Mercurial > libavcodec.hg
changeset 12147:6d7a12293959 libavcodec
Use math constant instead of hardcoded rounded value for sqrt(0.5).
Patch by Christophe.Gisquet (gmail)
author | benoit |
---|---|
date | Mon, 12 Jul 2010 12:32:24 +0000 |
parents | 36f7c2d7b3fb |
children | 9a7c4cabbc5a |
files | dca.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dca.c Mon Jul 12 09:10:53 2010 +0000 +++ b/dca.c Mon Jul 12 12:32:24 2010 +0000 @@ -1403,8 +1403,8 @@ 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; } }