comparison ra288.c @ 7442:2ccb81f932f0 libavcodec

Remove the now useless phase variable from context
author vitor
date Mon, 28 Jul 2008 10:49:14 +0000
parents 0ca4275b5c6f
children a8b985890c34
comparison
equal deleted inserted replaced
7441:a09e82b2f875 7442:2ccb81f932f0
25 #include "ra288.h" 25 #include "ra288.h"
26 26
27 typedef struct { 27 typedef struct {
28 float sp_lpc[36]; ///< LPC coefficients for speech data (spec: A) 28 float sp_lpc[36]; ///< LPC coefficients for speech data (spec: A)
29 float gain_lpc[10]; ///< LPC coefficients for gain (spec: GB) 29 float gain_lpc[10]; ///< LPC coefficients for gain (spec: GB)
30 int phase;
31 30
32 float sp_hist[111]; ///< Speech data history (spec: SB) 31 float sp_hist[111]; ///< Speech data history (spec: SB)
33 32
34 /** Speech part of the gain autocorrelation (spec: REXP) */ 33 /** Speech part of the gain autocorrelation (spec: REXP) */
35 float sp_rec[37]; 34 float sp_rec[37];
237 init_get_bits(&gb, buf, avctx->block_align * 8); 236 init_get_bits(&gb, buf, avctx->block_align * 8);
238 237
239 for (x=0; x < 32; x++) { 238 for (x=0; x < 32; x++) {
240 float gain = amptable[get_bits(&gb, 3)]; 239 float gain = amptable[get_bits(&gb, 3)];
241 int cb_coef = get_bits(&gb, 6 + (x&1)); 240 int cb_coef = get_bits(&gb, 6 + (x&1));
242 ractx->phase = (x + 4) & 7;
243 decode(ractx, gain, cb_coef); 241 decode(ractx, gain, cb_coef);
244 242
245 for (y=0; y < 5; y++) 243 for (y=0; y < 5; y++)
246 *(out++) = 8 * ractx->sp_block[4 - y]; 244 *(out++) = 8 * ractx->sp_block[4 - y];
247 245
248 if (ractx->phase == 7) 246 if ((x & 7) == 3)
249 backward_filter(ractx); 247 backward_filter(ractx);
250 } 248 }
251 249
252 *data_size = (char *)out - (char *)data; 250 *data_size = (char *)out - (char *)data;
253 return avctx->block_align; 251 return avctx->block_align;