summaryrefslogtreecommitdiff
path: root/libavcodec/nellymoserdec.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2009-01-17 20:06:08 +0000
committerVitor Sessak <vitor1001@gmail.com>2009-01-17 20:06:08 +0000
commit8a569fee99eba28d3e993182c89a797c455a3bd6 (patch)
tree58c2e55417cb33d624ae0b95a77802fca82d09ab /libavcodec/nellymoserdec.c
parent4bcafc9a2304ef0a2a8957eefb09f36bdbc9f16d (diff)
Use shared sine window instead of defining another one.
Originally committed as revision 16657 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/nellymoserdec.c')
-rw-r--r--libavcodec/nellymoserdec.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index dfbb41caf4..c0a856e2ac 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -53,8 +53,6 @@ typedef struct NellyMoserDecodeContext {
DECLARE_ALIGNED_16(float,imdct_out[NELLY_BUF_LEN * 2]);
} NellyMoserDecodeContext;
-static DECLARE_ALIGNED_16(float,sine_window[128]);
-
static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *audio, float *a_in)
{
int bot, top;
@@ -63,8 +61,8 @@ static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *
top = NELLY_BUF_LEN-1;
while (bot < NELLY_BUF_LEN) {
- audio[bot] = a_in [bot]*sine_window[bot]
- +state[bot]*sine_window[top] + s->add_bias;
+ audio[bot] = a_in [bot]*ff_sine_128[bot]
+ +state[bot]*ff_sine_128[top] + s->add_bias;
bot++;
top--;
@@ -144,8 +142,8 @@ static av_cold int decode_init(AVCodecContext * avctx) {
}
/* Generate overlap window */
- if (!sine_window[0])
- ff_sine_window_init(sine_window, 128);
+ if (!ff_sine_128[127])
+ ff_sine_window_init(ff_sine_128, 128);
avctx->sample_fmt = SAMPLE_FMT_S16;
avctx->channel_layout = CH_LAYOUT_MONO;