[MPlayer-cvslog] CVS: main/libfaad2 output.c,1.10,1.11

Richard Felker CVS syncmail at mplayerhq.hu
Tue Apr 5 07:43:44 CEST 2005


CVS change done by Richard Felker CVS

Update of /cvsroot/mplayer/main/libfaad2
In directory mail:/var2/tmp/cvs-serv17741/libfaad2

Modified Files:
	output.c 
Log Message:
10l, integer overflow. who uses 14 fractional bits?! only faad developers.... *sigh*

Index: output.c
===================================================================
RCS file: /cvsroot/mplayer/main/libfaad2/output.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- output.c	4 Apr 2005 23:31:33 -0000	1.10
+++ output.c	5 Apr 2005 05:43:41 -0000	1.11
@@ -573,10 +573,10 @@
         for(i = 0; i < frame_len; i++)
         {
 	    int32_t tmp;
-	    tmp = ((ch1[i]<<2) + ((ch0[i]+ch3[i])<<1) + (ch0[i]+ch3[i]) + (1<<(REAL_BITS+2))) >> (REAL_BITS+3);
+	    tmp = (ch1[i] + ((ch0[i]+ch3[i])>>1) + ((ch0[i]+ch3[i])>>2) + (1<<(REAL_BITS))) >> (REAL_BITS+1);
 	    if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000;
             short_sample_buffer[0] = tmp;
-	    tmp = ((ch2[i]<<2) + ((ch0[i]+ch4[i])<<1) + (ch0[i]+ch4[i]) + (1<<(REAL_BITS+2))) >> (REAL_BITS+3);
+	    tmp = (ch2[i] + ((ch0[i]+ch4[i])>>1) + ((ch0[i]+ch4[i])>>2) + (1<<(REAL_BITS))) >> (REAL_BITS+1);
 	    if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000;
             short_sample_buffer[1] = tmp;
 	    short_sample_buffer += channels;




More information about the MPlayer-cvslog mailing list