Here's some data:
$ svn diff
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;
==============
FYI - Post Filter Defaults to TRUE, so the function gets called from c2enc.
==============
Original codec2 compile.
$ c2enc 1300 hts.raw hts-orig.c2
Compile changes, make install in codec2 (codec2-dev not compiled).
$ c2enc 1300 hts.raw hts-new.c2
$ diff -s hts-orig.c2 hts-new.c2
Files hts-orig.c2 and hts-new.c2 are identical
eof
------------------------------------------------------------------------------
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