aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/imc.c
diff options
context:
space:
mode:
authorRobert Swain <robert.swain@gmail.com>2008-06-22 15:12:27 +0000
committerRobert Swain <robert.swain@gmail.com>2008-06-22 15:12:27 +0000
commit9146e4d61c9de8fb86a7a9837705a0ad48fc547d (patch)
tree9a388e3225b3b770b2c2f3a26767fca52cf19079 /libavcodec/imc.c
parentd47f16074ff4678d0ea968318354fc8ca6e0ba90 (diff)
downloadffmpeg-9146e4d61c9de8fb86a7a9837705a0ad48fc547d.tar.gz
Add generic ff_sine_window_init function and implement in codecs appropriately
Originally committed as revision 13888 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r--libavcodec/imc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 80372b82b4..934de4a6a9 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -102,8 +102,9 @@ static av_cold int imc_decode_init(AVCodecContext * avctx)
q->old_floor[i] = 1.0;
/* Build mdct window, a simple sine window normalized with sqrt(2) */
+ ff_sine_window_init(q->mdct_sine_window, COEFFS);
for(i = 0; i < COEFFS; i++)
- q->mdct_sine_window[i] = sin((i + 0.5) / 512.0 * M_PI) * sqrt(2.0);
+ q->mdct_sine_window[i] *= sqrt(2.0);
for(i = 0; i < COEFFS/2; i++){
q->post_cos[i] = cos(i / 256.0 * M_PI);
q->post_sin[i] = sin(i / 256.0 * M_PI);