[Mplayer-cvslog] CVS: main/libac3 imdct.c,1.10,1.11

Stephen Davies steve at mplayer.dev.hu
Mon Dec 10 00:36:53 CET 2001


Update of /cvsroot/mplayer/main/libac3
In directory mplayer:/var/tmp.root/cvs-serv22770/libac3

Modified Files:
	imdct.c 
Log Message:
took 3dB off output levels to get rid of clipping

Index: imdct.c
===================================================================
RCS file: /cvsroot/mplayer/main/libac3/imdct.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- imdct.c	9 Dec 2001 17:47:55 -0000	1.10
+++ imdct.c	9 Dec 2001 23:36:42 -0000	1.11
@@ -517,18 +517,18 @@
 			          (*centre + *delay_centre)     * dm_par->clev );
       *s16_samples++ = (int16_t)( (*right++ + *delay_right++)   * dm_par->unit +
 				  (*centre++ + *delay_centre++) * dm_par->clev );
-      *s16_samples++ = (int16_t)(*left_s++ + *delay_left_s++);
-      *s16_samples++ = (int16_t)(*right_s++ + *delay_right_s++);
+      *s16_samples++ = (int16_t)( (*left_s++ + *delay_left_s++) * dm_par->slev );
+      *s16_samples++ = (int16_t)( (*right_s++ + *delay_right_s++) * dm_par->slev );
     }
   }
   else {
     for (i=0; i<256; i++) {
-      *s16_samples++ = (int16_t)(*left++ + *delay_left++);
-      *s16_samples++ = (int16_t)(*right++ + *delay_right++);
-      *s16_samples++ = (int16_t)(*left_s++ + *delay_left_s++);
-      *s16_samples++ = (int16_t)(*right_s++ + *delay_right_s++);
-      *s16_samples++ = (int16_t)(*centre++ + *delay_centre++);
-      *s16_samples++ = (int16_t)(*lfe++ + *delay_lfe++);
+      *s16_samples++ = (int16_t)( (*left++ + *delay_left++)       * .707 );
+      *s16_samples++ = (int16_t)( (*right++ + *delay_right++)     * .707 );
+      *s16_samples++ = (int16_t)( (*left_s++ + *delay_left_s++)   * .707 );
+      *s16_samples++ = (int16_t)( (*right_s++ + *delay_right_s++) * .707 );
+      *s16_samples++ = (int16_t)( (*centre++ + *delay_centre++)   * .707 );
+      *s16_samples++ = (int16_t)( (*lfe++ + *delay_lfe++)         * .707 );
     }
   }
 }




More information about the MPlayer-cvslog mailing list