comparison ra288.c @ 7411:d41948bf80a1 libavcodec

Give the context structure of ra288 a better name: s/Real288_internal/RA288Context/
author vitor
date Sat, 26 Jul 2008 14:29:39 +0000
parents 981b14d8b0e9
children 51da3d8200d0
comparison
equal deleted inserted replaced
7410:4c68f77c49ee 7411:d41948bf80a1
33 33
34 float st1a[111], st1b[37], st1[37]; 34 float st1a[111], st1b[37], st1[37];
35 float st2a[38], st2b[11], st2[11]; 35 float st2a[38], st2b[11], st2[11];
36 float sb[41]; 36 float sb[41];
37 float lhist[10]; 37 float lhist[10];
38 } Real288_internal; 38 } RA288Context;
39 39
40 static inline float scalar_product_float(const float * v1, const float * v2, 40 static inline float scalar_product_float(const float * v1, const float * v2,
41 int size) 41 int size)
42 { 42 {
43 float res = 0.; 43 float res = 0.;
47 47
48 return res; 48 return res;
49 } 49 }
50 50
51 /* Decode and produce output */ 51 /* Decode and produce output */
52 static void decode(Real288_internal *glob, float gain, int cb_coef) 52 static void decode(RA288Context *glob, float gain, int cb_coef)
53 { 53 {
54 int x, y; 54 int x, y;
55 double sumsum; 55 double sumsum;
56 float sum, buffer[5]; 56 float sum, buffer[5];
57 57
185 } 185 }
186 186
187 /** 187 /**
188 * Backward synthesis filter. Find the LPC coefficients from past speech data. 188 * Backward synthesis filter. Find the LPC coefficients from past speech data.
189 */ 189 */
190 static void backward_filter(Real288_internal *glob) 190 static void backward_filter(RA288Context *glob)
191 { 191 {
192 float buffer1[40], temp1[37]; 192 float buffer1[40], temp1[37];
193 float buffer2[8], temp2[11]; 193 float buffer2[8], temp2[11];
194 194
195 memcpy(buffer1 , glob->output + 20, 20*sizeof(*buffer1)); 195 memcpy(buffer1 , glob->output + 20, 20*sizeof(*buffer1));
216 int *data_size, const uint8_t * buf, 216 int *data_size, const uint8_t * buf,
217 int buf_size) 217 int buf_size)
218 { 218 {
219 int16_t *out = data; 219 int16_t *out = data;
220 int x, y; 220 int x, y;
221 Real288_internal *glob = avctx->priv_data; 221 RA288Context *glob = avctx->priv_data;
222 GetBitContext gb; 222 GetBitContext gb;
223 223
224 if (buf_size < avctx->block_align) { 224 if (buf_size < avctx->block_align) {
225 av_log(avctx, AV_LOG_ERROR, 225 av_log(avctx, AV_LOG_ERROR,
226 "Error! Input buffer is too small [%d<%d]\n", 226 "Error! Input buffer is too small [%d<%d]\n",
250 AVCodec ra_288_decoder = 250 AVCodec ra_288_decoder =
251 { 251 {
252 "real_288", 252 "real_288",
253 CODEC_TYPE_AUDIO, 253 CODEC_TYPE_AUDIO,
254 CODEC_ID_RA_288, 254 CODEC_ID_RA_288,
255 sizeof(Real288_internal), 255 sizeof(RA288Context),
256 NULL, 256 NULL,
257 NULL, 257 NULL,
258 NULL, 258 NULL,
259 ra288_decode_frame, 259 ra288_decode_frame,
260 .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"), 260 .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"),