[Mplayer-cvslog] CVS: main/mp3lib layer3.c,1.4,1.5 mpg123.h,1.6,1.7 test2.c,1.3,1.4

Arpi of Ize arpi at mplayerhq.hu
Sun Jun 29 00:52:59 CEST 2003


Update of /cvsroot/mplayer/main/mp3lib
In directory mail:/var/tmp.root/cvs-serv21293

Modified Files:
	layer3.c mpg123.h test2.c 
Log Message:
merged with mpg123 0.59s-pre

Index: layer3.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/layer3.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- layer3.c	21 Jun 2003 23:45:07 -0000	1.4
+++ layer3.c	28 Jun 2003 22:52:36 -0000	1.5
@@ -1,31 +1,38 @@
-
-/*
+/* 
  * Mpeg Layer-3 audio decoder 
  * --------------------------
- * copyright (c) 1995,1996,1997 by Michael Hipp.
+ * copyright (c) 1995-1999 by Michael Hipp.
  * All rights reserved. See also 'README'
  *
- * - I'm currently working on that .. needs a few more optimizations,
- *   though the code is now fast enough to run in realtime on a 100Mhz 486
[...1656 lines suppressed...]
-          return clip;
-      } else {
-        if(III_dequantize_sample(hybridIn[1],scalefacs[1],gr_info,sfreq,part2bits))
+      if(III_dequantize_sample(hybridIn[1],scalefacs[1],gr_info,sfreq,part2bits))
           return clip;
+
+      if(ms_stereo) {
+        int i;
+        int maxb = sideinfo.ch[0].gr[gr].maxb;
+        if(sideinfo.ch[1].gr[gr].maxb > maxb)
+            maxb = sideinfo.ch[1].gr[gr].maxb;
+        for(i=0;i<SSLIMIT*maxb;i++) {
+          real tmp0 = ((real *)hybridIn[0])[i];
+          real tmp1 = ((real *)hybridIn[1])[i];
+          ((real *)hybridIn[0])[i] = tmp0 + tmp1;
+          ((real *)hybridIn[1])[i] = tmp0 - tmp1;
+        }
       }
 
       if(i_stereo)

Index: mpg123.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/mpg123.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mpg123.h	24 Dec 2002 22:33:46 -0000	1.6
+++ mpg123.h	28 Jun 2003 22:52:36 -0000	1.7
@@ -94,8 +94,8 @@
       unsigned preflag;
       unsigned scalefac_scale;
       unsigned count1table_select;
-      int full_gain[3];
-      int pow2gain;
+      real *full_gain[3];
+      real *pow2gain;
 };
 
 struct III_sideinfo

Index: test2.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/test2.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- test2.c	29 Jun 2001 17:53:53 -0000	1.3
+++ test2.c	28 Jun 2003 22:52:36 -0000	1.4
@@ -11,6 +11,7 @@
 
 #include "mp3lib/mp3.h"
 #include "config.h"
+#include "cpudetect.h"
 
 static FILE* mp3file=NULL;
 
@@ -21,6 +22,7 @@
 #define BUFFLEN 4608
 static unsigned char buffer[BUFFLEN];
 
+
 int main(int argc,char* argv[]){
   int len;
   int total=0;
@@ -30,6 +32,8 @@
   
   mp3file=fopen((argc>1)?argv[1]:"test.mp3","rb");
   if(!mp3file){  printf("file not found\n");  exit(1); }
+  
+  GetCpuCaps(&gCpuCaps);
 
   // MPEG Audio:
 #ifdef USE_FAKE_MONO



More information about the MPlayer-cvslog mailing list