try this.  Not sure about the -ruN option. I was just editing the original.
Index: codec2/src/quantise.c
===================================================================
--- codec2/src/quantise.c       (revision 1692)
+++ codec2/src/quantise.c       (working copy)
@@ -795,7 +795,7 @@
     COMP  Ww[FFT_ENC];  /* weighting spectrum           */
     float Rw[FFT_ENC];  /* R = WA                       */
     float e_before, e_after, gain;
-    float Pfw[FFT_ENC]; /* Post filter mag spectrum     */
+    float Pfw;
     float max_Rw, min_Rw;
     float coeff;
     TIMER_VAR(tstart, tfft1, taw, tfft2, tww, tr);
@@ -885,8 +885,8 @@
 
     e_after = 1E-4;
     for(i=0; i<FFT_ENC/2; i++) {
-       Pfw[i] = powf(Rw[i], beta);
-       Pw[i].real *= Pfw[i] * Pfw[i];
+       Pfw = powf(Rw[i], beta);
+       Pw[i].real *= Pfw * Pfw;
        e_after += Pw[i].real;
     }
     gain = e_before/e_after;
Index: codec2-dev/src/quantise.c
===================================================================
--- codec2-dev/src/quantise.c   (revision 1692)
+++ codec2-dev/src/quantise.c   (working copy)
@@ -795,7 +795,7 @@
     COMP  Ww[FFT_ENC];  /* weighting spectrum           */
     float Rw[FFT_ENC];  /* R = WA                       */
     float e_before, e_after, gain;
-    float Pfw[FFT_ENC]; /* Post filter mag spectrum     */
+    float Pfw;
     float max_Rw, min_Rw;
     float coeff;
     TIMER_VAR(tstart, tfft1, taw, tfft2, tww, tr);
@@ -885,8 +885,8 @@
 
     e_after = 1E-4;
     for(i=0; i<FFT_ENC/2; i++) {
-       Pfw[i] = powf(Rw[i], beta);
-       Pw[i].real *= Pfw[i] * Pfw[i];
+       Pfw = powf(Rw[i], beta);
+       Pw[i].real *= Pfw * Pfw;
        e_after += Pw[i].real;
     }
     gain = e_before/e_after;

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to