mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-23 09:01:00 +08:00
use av_clip_int16() where it makes sense
Originally committed as revision 10078 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -822,10 +822,7 @@ void ff_mpa_synth_filter(MPA_INT *synth_buf_ptr, int *synth_buf_offset,
|
||||
#if FRAC_BITS <= 15
|
||||
/* NOTE: can cause a loss in precision if very high amplitude
|
||||
sound */
|
||||
if (v > 32767)
|
||||
v = 32767;
|
||||
else if (v < -32768)
|
||||
v = -32768;
|
||||
v = av_clip_int16(v);
|
||||
#endif
|
||||
synth_buf[j] = v;
|
||||
}
|
||||
|
Reference in New Issue
Block a user