Mercurial > libavcodec.hg
comparison ra144.c @ 5523:c2ab2ac31edb libavcodec
use av_clip_int16() where it makes sense
author | aurel |
---|---|
date | Sat, 11 Aug 2007 22:48:55 +0000 |
parents | c8c591fe26f8 |
children | bc4791868c52 |
comparison
equal
deleted
inserted
replaced
5522:acaaff7b6fb8 | 5523:c2ab2ac31edb |
---|---|
484 glob->resetflag=0; | 484 glob->resetflag=0; |
485 | 485 |
486 shptr=glob->output_buffer; | 486 shptr=glob->output_buffer; |
487 while (shptr<glob->output_buffer+BLOCKSIZE) { | 487 while (shptr<glob->output_buffer+BLOCKSIZE) { |
488 s=*(shptr++)<<2; | 488 s=*(shptr++)<<2; |
489 *data=s; | 489 *data=av_clip_int16(s); |
490 if (s>32767) *data=32767; | |
491 if (s<-32767) *data=-32768; | |
492 data++; | 490 data++; |
493 } | 491 } |
494 b+=30; | 492 b+=30; |
495 } | 493 } |
496 | 494 |