comparison wmadec.c @ 10275:ae08043eb532 libavcodec

WMA: remove some unused variables
author mru
date Sat, 26 Sep 2009 19:23:27 +0000
parents 575faff0a524
children 4d1b9ca628fc
comparison
equal deleted inserted replaced
10274:bcf5c5551b3c 10275:ae08043eb532
80 #endif 80 #endif
81 81
82 static int wma_decode_init(AVCodecContext * avctx) 82 static int wma_decode_init(AVCodecContext * avctx)
83 { 83 {
84 WMACodecContext *s = avctx->priv_data; 84 WMACodecContext *s = avctx->priv_data;
85 int i, flags1, flags2; 85 int i, flags2;
86 uint8_t *extradata; 86 uint8_t *extradata;
87 87
88 s->avctx = avctx; 88 s->avctx = avctx;
89 89
90 /* extract flag infos */ 90 /* extract flag infos */
91 flags1 = 0;
92 flags2 = 0; 91 flags2 = 0;
93 extradata = avctx->extradata; 92 extradata = avctx->extradata;
94 if (avctx->codec->id == CODEC_ID_WMAV1 && avctx->extradata_size >= 4) { 93 if (avctx->codec->id == CODEC_ID_WMAV1 && avctx->extradata_size >= 4) {
95 flags1 = AV_RL16(extradata);
96 flags2 = AV_RL16(extradata+2); 94 flags2 = AV_RL16(extradata+2);
97 } else if (avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 6) { 95 } else if (avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 6) {
98 flags1 = AV_RL32(extradata);
99 flags2 = AV_RL16(extradata+4); 96 flags2 = AV_RL16(extradata+4);
100 } 97 }
101 // for(i=0; i<avctx->extradata_size; i++) 98 // for(i=0; i<avctx->extradata_size; i++)
102 // av_log(NULL, AV_LOG_ERROR, "%02X ", extradata[i]); 99 // av_log(NULL, AV_LOG_ERROR, "%02X ", extradata[i]);
103 100
247 * decode exponents coded with VLC codes 244 * decode exponents coded with VLC codes
248 */ 245 */
249 static int decode_exp_vlc(WMACodecContext *s, int ch) 246 static int decode_exp_vlc(WMACodecContext *s, int ch)
250 { 247 {
251 int last_exp, n, code; 248 int last_exp, n, code;
252 const uint16_t *ptr, *band_ptr; 249 const uint16_t *ptr;
253 float v, *q, max_scale, *q_end; 250 float v, *q, max_scale, *q_end;
254 251
255 band_ptr = s->exponent_bands[s->frame_len_bits - s->block_len_bits]; 252 ptr = s->exponent_bands[s->frame_len_bits - s->block_len_bits];
256 ptr = band_ptr;
257 q = s->exponents[ch]; 253 q = s->exponents[ch];
258 q_end = q + s->block_len; 254 q_end = q + s->block_len;
259 max_scale = 0; 255 max_scale = 0;
260 if (s->version == 1) { 256 if (s->version == 1) {
261 last_exp = get_bits(&s->gb, 5) + 10; 257 last_exp = get_bits(&s->gb, 5) + 10;