diff Plugins/Input/mpg123/decode_2to1.c @ 1098:b5ae09a6c2f1 trunk

[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
author nenolod
date Mon, 22 May 2006 17:22:34 -0700
parents 0f294f2b0a9b
children
line wrap: on
line diff
--- a/Plugins/Input/mpg123/decode_2to1.c	Mon May 22 17:02:59 2006 -0700
+++ b/Plugins/Input/mpg123/decode_2to1.c	Mon May 22 17:22:34 2006 -0700
@@ -18,18 +18,18 @@
   else if( (sum) < -32768.0) { *(samples) = -0x8000; (clip)++; } \
   else { *(samples) = sum; }
 
-int mpg123_synth_2to1_8bit(mpgdec_real *bandPtr,int channel,unsigned char *samples,int *pnt)
+int mpgdec_synth_2to1_8bit(mpgdec_real *bandPtr,int channel,unsigned char *samples,int *pnt)
 {
   short samples_tmp[32];
   short *tmp1 = samples_tmp + channel;
   int i,ret;
   int pnt1 = 0;
 
-  ret = mpg123_synth_2to1(bandPtr,channel,(unsigned char *) samples_tmp,&pnt1);
+  ret = mpgdec_synth_2to1(bandPtr,channel,(unsigned char *) samples_tmp,&pnt1);
   samples += channel + *pnt;
 
   for(i=0;i<16;i++) {
-    *samples = mpg123_conv16to8[*tmp1>>AUSHIFT];
+    *samples = mpgdec_conv16to8[*tmp1>>AUSHIFT];
     samples += 2;
     tmp1 += 2;
   }
@@ -38,18 +38,18 @@
   return ret;
 }
 
-int mpg123_synth_2to1_8bit_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
+int mpgdec_synth_2to1_8bit_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[32];
   short *tmp1 = samples_tmp;
   int i,ret;
   int pnt1 = 0;
 
-  ret = mpg123_synth_2to1(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
+  ret = mpgdec_synth_2to1(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
   samples += *pnt;
 
   for(i=0;i<16;i++) {
-    *samples++ = mpg123_conv16to8[*tmp1>>AUSHIFT];
+    *samples++ = mpgdec_conv16to8[*tmp1>>AUSHIFT];
     tmp1 += 2;
   }
   *pnt += 16;
@@ -58,19 +58,19 @@
 }
 
 
-int mpg123_synth_2to1_8bit_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
+int mpgdec_synth_2to1_8bit_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[32];
   short *tmp1 = samples_tmp;
   int i,ret;
   int pnt1 = 0;
 
-  ret = mpg123_synth_2to1(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
+  ret = mpgdec_synth_2to1(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
   samples += *pnt;
 
   for(i=0;i<16;i++) {
-    *samples++ = mpg123_conv16to8[*tmp1>>AUSHIFT];
-    *samples++ = mpg123_conv16to8[*tmp1>>AUSHIFT];
+    *samples++ = mpgdec_conv16to8[*tmp1>>AUSHIFT];
+    *samples++ = mpgdec_conv16to8[*tmp1>>AUSHIFT];
     tmp1 += 2;
   }
   *pnt += 32;
@@ -78,14 +78,14 @@
   return ret;
 }
 
-int mpg123_synth_2to1_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
+int mpgdec_synth_2to1_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[32];
   short *tmp1 = samples_tmp;
   int i,ret;
   int pnt1=0;
 
-  ret = mpg123_synth_2to1(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
+  ret = mpgdec_synth_2to1(bandPtr,0,(unsigned char *) samples_tmp,&pnt1);
   samples += *pnt;
 
   for(i=0;i<16;i++) {
@@ -98,11 +98,11 @@
   return ret;
 }
 
-int mpg123_synth_2to1_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
+int mpgdec_synth_2to1_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   int i,ret;
 
-  ret = mpg123_synth_2to1(bandPtr,0,samples,pnt);
+  ret = mpgdec_synth_2to1(bandPtr,0,samples,pnt);
   samples = samples + *pnt - 64;
 
   for(i=0;i<16;i++) {
@@ -113,7 +113,7 @@
   return ret;
 }
 
-int mpg123_synth_2to1(mpgdec_real *bandPtr,int channel,unsigned char *out,int *pnt)
+int mpgdec_synth_2to1(mpgdec_real *bandPtr,int channel,unsigned char *out,int *pnt)
 {
   static mpgdec_real buffs[2][2][0x110];
   static const int step = 2;
@@ -137,17 +137,17 @@
   if(bo & 0x1) {
     b0 = buf[0];
     bo1 = bo;
-    mpg123_dct64(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr);
+    mpgdec_dct64(buf[1]+((bo+1)&0xf),buf[0]+bo,bandPtr);
   }
   else {
     b0 = buf[1];
     bo1 = bo+1;
-    mpg123_dct64(buf[0]+bo,buf[1]+bo+1,bandPtr);
+    mpgdec_dct64(buf[0]+bo,buf[1]+bo+1,bandPtr);
   }
 
   {
     register int j;
-    mpgdec_real *window = mpg123_decwin + 16 - bo1;
+    mpgdec_real *window = mpgdec_decwin + 16 - bo1;
 
     for (j=8;j;j--,b0+=0x10,window+=0x30)
     {