[FFmpeg-cvslog] r26071 - in trunk: libavcodec/ac3enc.c tests/ref/acodec/ac3 tests/ref/lavf/rm tests/ref/seek/ac3_rm

jbr subversion
Tue Dec 21 22:18:59 CET 2010


Author: jbr
Date: Tue Dec 21 22:18:58 2010
New Revision: 26071

Log:
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.

Modified:
   trunk/libavcodec/ac3enc.c
   trunk/tests/ref/acodec/ac3
   trunk/tests/ref/lavf/rm
   trunk/tests/ref/seek/ac3_rm

Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c	Tue Dec 21 21:56:25 2010	(r26070)
+++ trunk/libavcodec/ac3enc.c	Tue Dec 21 22:18:58 2010	(r26071)
@@ -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)
 
 
 /**

Modified: trunk/tests/ref/acodec/ac3
==============================================================================
--- trunk/tests/ref/acodec/ac3	Tue Dec 21 21:56:25 2010	(r26070)
+++ trunk/tests/ref/acodec/ac3	Tue Dec 21 22:18:58 2010	(r26071)
@@ -1,2 +1,2 @@
-464093173530736050e338caf152044c *./tests/data/acodec/ac3.rm
+8ea1ce311247d27dc653f274ed7104cd *./tests/data/acodec/ac3.rm
 98751 ./tests/data/acodec/ac3.rm

Modified: trunk/tests/ref/lavf/rm
==============================================================================
--- trunk/tests/ref/lavf/rm	Tue Dec 21 21:56:25 2010	(r26070)
+++ trunk/tests/ref/lavf/rm	Tue Dec 21 22:18:58 2010	(r26071)
@@ -1,2 +1,2 @@
-5da8e3db393189708f097cbdddea98f4 *./tests/data/lavf/lavf.rm
+03427369521c9ebc2a5408a0e2a163bf *./tests/data/lavf/lavf.rm
 346706 ./tests/data/lavf/lavf.rm

Modified: trunk/tests/ref/seek/ac3_rm
==============================================================================
--- trunk/tests/ref/seek/ac3_rm	Tue Dec 21 21:56:25 2010	(r26070)
+++ trunk/tests/ref/seek/ac3_rm	Tue Dec 21 22:18:58 2010	(r26071)
@@ -3,25 +3,23 @@ ret: 0         st:-1 flags:0  ts:-1.0000
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:    271 size:   556
 ret: 0         st:-1 flags:1  ts: 1.894167
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:    271 size:   556
-ret: 0         st: 0 flags:0  ts: 0.788000
-ret: 0         st: 0 flags:1 dts: 2.159000 pts: 2.159000 pos:  35567 size:   556
+ret:-1         st: 0 flags:0  ts: 0.788000
 ret: 0         st: 0 flags:1  ts:-0.317000
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:    271 size:   556
-ret:-1         st:-1 flags:0  ts: 2.576668
+ret: 0         st:-1 flags:0  ts: 2.576668
+ret: 0         st: 0 flags:1 dts: 2.960000 pts: 2.960000 pos:  48659 size:   558
 ret:-1         st:-1 flags:1  ts: 1.470835
 ret:-1         st: 0 flags:0  ts: 0.365000
 ret: 0         st: 0 flags:1  ts:-0.741000
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:    271 size:   556
 ret: 0         st:-1 flags:0  ts: 2.153336
 ret: 0         st: 0 flags:1 dts: 2.960000 pts: 2.960000 pos:  48659 size:   558
-ret: 0         st:-1 flags:1  ts: 1.047503
-ret: 0         st: 0 flags:1 dts: 1.044000 pts: 1.044000 pos:  17349 size:   558
+ret:-1         st:-1 flags:1  ts: 1.047503
 ret: 0         st: 0 flags:0  ts:-0.058000
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:    271 size:   556
 ret: 0         st: 0 flags:1  ts: 2.836000
 ret: 0         st: 0 flags:1 dts: 2.333000 pts: 2.333000 pos:  38413 size:   556
-ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.776000 pts: 1.776000 pos:  29303 size:   558
+ret:-1         st:-1 flags:0  ts: 1.730004
 ret: 0         st:-1 flags:1  ts: 0.624171
 ret: 0         st: 0 flags:1 dts: 0.417000 pts: 0.417000 pos:   7103 size:   556
 ret: 0         st: 0 flags:0  ts:-0.482000



More information about the ffmpeg-cvslog mailing list