Mercurial > libavcodec.hg
changeset 8614:ff10b38304d2 libavcodec
Use shared sine window instead of defining another one.
author | vitor |
---|---|
date | Sat, 17 Jan 2009 20:06:08 +0000 |
parents | e75610c5da69 |
children | 2a2318411d9d |
files | nellymoserdec.c |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/nellymoserdec.c Sat Jan 17 12:51:26 2009 +0000 +++ b/nellymoserdec.c Sat Jan 17 20:06:08 2009 +0000 @@ -53,8 +53,6 @@ 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 @@ 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 @@ } /* 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;