diff Plugins/Input/mpg123/decode.c @ 970:0f294f2b0a9b trunk

[svn] - integer-mode decoding accuracy improvements
author nenolod
date Wed, 26 Apr 2006 10:54:58 -0700
parents 0a2963adefab
children b5ae09a6c2f1
line wrap: on
line diff
--- a/Plugins/Input/mpg123/decode.c	Mon Apr 24 21:41:50 2006 -0700
+++ b/Plugins/Input/mpg123/decode.c	Wed Apr 26 10:54:58 2006 -0700
@@ -17,7 +17,7 @@
   else if( (sum) < REAL_MINUS_32768) { *(samples) = -0x8000; (clip)++; } \
   else { *(samples) = sum; }
 
-int mpg123_synth_1to1_8bit(real *bandPtr,int channel,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_8bit(mpgdec_real *bandPtr,int channel,unsigned char *samples,int *pnt)
 {
   short samples_tmp[64];
   short *tmp1 = samples_tmp + channel;
@@ -37,7 +37,7 @@
   return ret;
 }
 
-int mpg123_synth_1to1_8bit_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_8bit_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[64];
   short *tmp1 = samples_tmp;
@@ -56,7 +56,7 @@
   return ret;
 }
 
-int mpg123_synth_1to1_8bit_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_8bit_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[64];
   short *tmp1 = samples_tmp;
@@ -76,7 +76,7 @@
   return ret;
 }
 
-int mpg123_synth_1to1_mono(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_mono(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   short samples_tmp[64];
   short *tmp1 = samples_tmp;
@@ -97,7 +97,7 @@
 }
 
 
-int mpg123_synth_1to1_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
+int mpg123_synth_1to1_mono2stereo(mpgdec_real *bandPtr,unsigned char *samples,int *pnt)
 {
   int i,ret;
 
@@ -113,14 +113,14 @@
 }
 
 
-int mpg123_synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
+int mpg123_synth_1to1(mpgdec_real *bandPtr,int channel,unsigned char *out,int *pnt)
 {
-  static real buffs[2][2][0x110];
+  static mpgdec_real buffs[2][2][0x110];
   static const int step = 2;
   static int bo = 1;
   short *samples = (short *) (out+*pnt);
 
-  real *b0,(*buf)[0x110];
+  mpgdec_real *b0,(*buf)[0x110];
   int clip = 0; 
   int bo1;
 
@@ -148,11 +148,11 @@
 
   {
     register int j;
-    real *window = mpg123_decwin + 16 - bo1;
+    mpgdec_real *window = mpg123_decwin + 16 - bo1;
  
     for (j=16;j;j--,window+=0x10,samples+=step)
     {
-      real sum;
+      mpgdec_real sum;
       sum  = REAL_MUL(*window++, *b0++);
       sum -= REAL_MUL(*window++, *b0++);
       sum += REAL_MUL(*window++, *b0++);
@@ -174,7 +174,7 @@
     }
 
     {
-      real sum;
+      mpgdec_real sum;
       sum  = REAL_MUL(window[0x0], b0[0x0]);
       sum += REAL_MUL(window[0x2], b0[0x2]);
       sum += REAL_MUL(window[0x4], b0[0x4]);
@@ -190,7 +190,7 @@
 
     for (j=15;j;j--,b0-=0x20,window-=0x10,samples+=step)
     {
-      real sum;
+      mpgdec_real sum;
       sum = -REAL_MUL(*(--window), *b0++);
       sum -= REAL_MUL(*(--window), *b0++);
       sum -= REAL_MUL(*(--window), *b0++);