Mercurial > libavcodec.hg
diff cook.c @ 7094:b0820b8bd4dd libavcodec
Add generic ff_sine_window_init function and implement in codecs appropriately
author | superdump |
---|---|
date | Sun, 22 Jun 2008 15:12:27 +0000 |
parents | e943e1409077 |
children | af6510f5f7e1 |
line wrap: on
line diff
--- a/cook.c Sun Jun 22 13:20:41 2008 +0000 +++ b/cook.c Sun Jun 22 15:12:27 2008 +0000 @@ -239,9 +239,9 @@ 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)) {