[Mplayer-cvslog] CVS: main/liba52 resample_c.c,1.14,1.15

Arpi of Ize arpi at mplayer.dev.hu
Thu Jan 3 23:59:29 CET 2002


Update of /cvsroot/mplayer/main/liba52
In directory mplayer:/var/tmp.root/cvs-serv10519

Modified Files:
	resample_c.c 
Log Message:
mono ac3 support

Index: resample_c.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/resample_c.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- resample_c.c	30 Dec 2001 21:44:10 -0000	1.14
+++ resample_c.c	3 Jan 2002 22:59:21 -0000	1.15
@@ -20,6 +20,15 @@
     return 5*256;
 }
 
+static int a52_resample_MONO_to_1_C(float * _f, int16_t * s16){
+    int i;
+    int32_t * f = (int32_t *) _f;
+	for (i = 0; i < 256; i++) {
+	    s16[i] = convert (f[i]);
+	}
+    return 1*256;
+}
+
 static int a52_resample_STEREO_to_2_C(float * _f, int16_t * s16){
     int i;
     int32_t * f = (int32_t *) _f;
@@ -136,6 +145,7 @@
     switch (flags) {
     case A52_MONO:
 	if(ch==5) return a52_resample_MONO_to_5_C;
+	if(ch==1) return a52_resample_MONO_to_1_C;
 	break;
     case A52_CHANNEL:
     case A52_STEREO:




More information about the MPlayer-cvslog mailing list