Mercurial > libavcodec.hg
comparison ra288.c @ 6278:1454981691cb libavcodec
const
author | michael |
---|---|
date | Fri, 01 Feb 2008 15:43:53 +0000 |
parents | c8c591fe26f8 |
children | 5b3acf9fd50a |
comparison
equal
deleted
inserted
replaced
6277:2bd174b8d32e | 6278:1454981691cb |
---|---|
47 static int pred(float *in, float *tgt, int n); | 47 static int pred(float *in, float *tgt, int n); |
48 static void colmult(float *tgt, float *m1, const float *m2, int n); | 48 static void colmult(float *tgt, float *m1, const float *m2, int n); |
49 | 49 |
50 | 50 |
51 /* initial decode */ | 51 /* initial decode */ |
52 static void unpack(unsigned short *tgt, unsigned char *src, unsigned int len) | 52 static void unpack(unsigned short *tgt, const unsigned char *src, unsigned int len) |
53 { | 53 { |
54 int x,y,z; | 54 int x,y,z; |
55 int n,temp; | 55 int n,temp; |
56 int buffer[len]; | 56 int buffer[len]; |
57 | 57 |
206 for (sum=0,x=len;x--;sum+=(*p1++)*(*p2++)); | 206 for (sum=0,x=len;x--;sum+=(*p1++)*(*p2++)); |
207 tgt[n--]=sum; | 207 tgt[n--]=sum; |
208 } | 208 } |
209 } | 209 } |
210 | 210 |
211 static void * decode_block(AVCodecContext * avctx, unsigned char *in, signed short int *out,unsigned len) | 211 static void * decode_block(AVCodecContext * avctx, const unsigned char *in, signed short int *out,unsigned len) |
212 { | 212 { |
213 int x,y; | 213 int x,y; |
214 Real288_internal *glob=avctx->priv_data; | 214 Real288_internal *glob=avctx->priv_data; |
215 unsigned short int buffer[len]; | 215 unsigned short int buffer[len]; |
216 | 216 |
226 } | 226 } |
227 | 227 |
228 /* Decode a block (celp) */ | 228 /* Decode a block (celp) */ |
229 static int ra288_decode_frame(AVCodecContext * avctx, | 229 static int ra288_decode_frame(AVCodecContext * avctx, |
230 void *data, int *data_size, | 230 void *data, int *data_size, |
231 uint8_t * buf, int buf_size) | 231 const uint8_t * buf, int buf_size) |
232 { | 232 { |
233 void *datao; | 233 void *datao; |
234 | 234 |
235 if (buf_size < avctx->block_align) | 235 if (buf_size < avctx->block_align) |
236 { | 236 { |