Change FIX15() back to clipping to -32767..32767.

This avoids a 16-bit overflow in mdct512() due to a -32768 value in costab.
References updated for acodec-ac3, lavf-rm, and seek-ac3_rm tests.
Thanks to Måns Rullgård for finding the bug.

Originally committed as revision 26071 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Justin Ruggles
2010-12-21 21:18:58 +00:00
parent f9f69028af
commit 295ab2af6e
4 changed files with 8 additions and 10 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
#define SCALE_FLOAT(a, bits) lrintf((a) * (float)(1 << (bits)))
/** Scale a float value by 2^15, convert to an integer, and clip to int16_t range. */
#define FIX15(a) av_clip_int16(SCALE_FLOAT(a, 15))
#define FIX15(a) av_clip(SCALE_FLOAT(a, 15), -32767, 32767)
/**