aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cook.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/cook.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/cook.c')
-rw-r--r--libavcodec/cook.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index fa945ec841..6661ee4979 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -239,9 +239,9 @@ static int init_cook_mlt(COOKContext *q) {
return -1;
/* Initialize the MLT window: simple sine window. */
- alpha = M_PI / (2.0 * (float)mlt_size);
+ ff_sine_window_init(q->mlt_window, mlt_size);
for(j=0 ; j<mlt_size ; j++)
- q->mlt_window[j] = sin((j + 0.5) * alpha) * sqrt(2.0 / q->samples_per_channel);
+ q->mlt_window[j] *= sqrt(2.0 / q->samples_per_channel);
/* Initialize the MDCT. */
if (ff_mdct_init(&q->mdct_ctx, av_log2(mlt_size)+1, 1)) {