From 6e8ff6e5c232de4b8235626af31ab85345120a93 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 13 Jan 2007 21:19:52 +0000 Subject: * ffmpeg update to 51.28.0 * Workaround ffmpeg buggy codecs that don't release their DR1 frames. * Fix several segfaults and freezing problem with H264 streams that use a lot of reference frames (eg. 15) * Initial support to enable/disable ffmpeg codecs. Codecs may be disabled in groups by --disable-ffmpeg-uncommon-codecs/--disable-ffmpeg-popular-codecs Think of "uncommon" codecs what people would never want to play with their PDAs (they will save memory by removing them). Note: currently both uncommon/popular codecs are _build_ but disabled. that is, build system still need some improvements to really save memory. warning: non-autoconf guru playing with the build system, likely breakage. CVS patchset: 8499 CVS date: 2007/01/13 21:19:52 --- src/libffmpeg/libavcodec/wmadec.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libffmpeg/libavcodec/wmadec.c') diff --git a/src/libffmpeg/libavcodec/wmadec.c b/src/libffmpeg/libavcodec/wmadec.c index 684aea2c8..bbf4970ce 100644 --- a/src/libffmpeg/libavcodec/wmadec.c +++ b/src/libffmpeg/libavcodec/wmadec.c @@ -115,6 +115,8 @@ typedef struct WMADecodeContext { float max_exponent[MAX_CHANNELS]; int16_t coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE]; DECLARE_ALIGNED_16(float, coefs[MAX_CHANNELS][BLOCK_MAX_SIZE]); + DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]); + DECLARE_ALIGNED_16(float, window[BLOCK_MAX_SIZE * 2]); MDCTContext mdct_ctx[BLOCK_NB_SIZES]; float *windows[BLOCK_NB_SIZES]; DECLARE_ALIGNED_16(FFTSample, mdct_tmp[BLOCK_MAX_SIZE]); /* temporary storage for imdct */ @@ -717,7 +719,6 @@ static int wma_decode_block(WMADecodeContext *s) { int n, v, a, ch, code, bsize; int coef_nb_bits, total_gain, parse_exponents; - DECLARE_ALIGNED_16(float, window[BLOCK_MAX_SIZE * 2]); int nb_coefs[MAX_CHANNELS]; float mdct_norm; @@ -1072,7 +1073,7 @@ static int wma_decode_block(WMADecodeContext *s) next_block_len = 1 << s->next_block_len_bits; /* right part */ - wptr = window + block_len; + wptr = s->window + block_len; if (block_len <= next_block_len) { for(i=0;iwindows[bsize][i]; @@ -1088,7 +1089,7 @@ static int wma_decode_block(WMADecodeContext *s) } /* left part */ - wptr = window + block_len; + wptr = s->window + block_len; if (block_len <= prev_block_len) { for(i=0;iwindows[bsize][i]; @@ -1107,14 +1108,13 @@ static int wma_decode_block(WMADecodeContext *s) for(ch = 0; ch < s->nb_channels; ch++) { if (s->channel_coded[ch]) { - DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]); float *ptr; int n4, index, n; n = s->block_len; n4 = s->block_len / 2; s->mdct_ctx[bsize].fft.imdct_calc(&s->mdct_ctx[bsize], - output, s->coefs[ch], s->mdct_tmp); + s->output, s->coefs[ch], s->mdct_tmp); /* XXX: optimize all that by build the window and multipying/adding at the same time */ @@ -1122,13 +1122,13 @@ static int wma_decode_block(WMADecodeContext *s) /* multiply by the window and add in the frame */ index = (s->frame_len / 2) + s->block_pos - n4; ptr = &s->frame_out[ch][index]; - s->dsp.vector_fmul_add_add(ptr,window,output,ptr,0,2*n,1); + s->dsp.vector_fmul_add_add(ptr,s->window,s->output,ptr,0,2*n,1); /* specific fast case for ms-stereo : add to second channel if it is not coded */ if (s->ms_stereo && !s->channel_coded[1]) { ptr = &s->frame_out[1][index]; - s->dsp.vector_fmul_add_add(ptr,window,output,ptr,0,2*n,1); + s->dsp.vector_fmul_add_add(ptr,s->window,s->output,ptr,0,2*n,1); } } } -- cgit v1.2.3