diff options
Diffstat (limited to 'contrib/ffmpeg/libavcodec/ra144.c')
-rw-r--r-- | contrib/ffmpeg/libavcodec/ra144.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/contrib/ffmpeg/libavcodec/ra144.c b/contrib/ffmpeg/libavcodec/ra144.c index c4f4b813b..30fd4a417 100644 --- a/contrib/ffmpeg/libavcodec/ra144.c +++ b/contrib/ffmpeg/libavcodec/ra144.c @@ -251,7 +251,7 @@ static void final(Real144_internal *glob, short *i1, short *i2, void *out, int * } /* Decode 20-byte input */ -static void unpack_input(unsigned char *input, unsigned int *output) +static void unpack_input(const unsigned char *input, unsigned int *output) { unsigned int outbuffer[28]; unsigned short inbuffer[10]; @@ -427,10 +427,9 @@ static void dec2(Real144_internal *glob, int *data, int *inp, int n, int f, int /* Uncompress one block (20 bytes -> 160*2 bytes) */ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata, int *data_size, - uint8_t * buf, int buf_size) + const uint8_t * buf, int buf_size) { unsigned int a,b,c; - long s; signed short *shptr; unsigned int *lptr,*temp; const short **dptr; @@ -484,13 +483,8 @@ static int ra144_decode_frame(AVCodecContext * avctx, glob->resetflag=0; shptr=glob->output_buffer; - while (shptr<glob->output_buffer+BLOCKSIZE) { - s=*(shptr++)<<2; - *data=s; - if (s>32767) *data=32767; - if (s<-32767) *data=-32768; - data++; - } + while (shptr<glob->output_buffer+BLOCKSIZE) + *data++=av_clip_int16(*(shptr++)<<2); b+=30; } |