Thank you Stephen for all that hard work!  I have looked at the patch
and made a few changes:

+ I'd like the keep the lpc order argument in lpc.c
+ I'd like to keep the VQ dimension flexible in quantise.c

I've attached the patch with my edits (ie I removed a few hunks as per
above).  Could you pls apply it and modify the code to make sure it all
compiles and runs again?  Unfortunately I don't have the time for this
right now (many other Codec2/FreeDV projects).

I'm also on IRC #freedv if you have any questions.

Thanks,

David

On Sat, 2014-06-21 at 10:23 -0500, Steve Sampson wrote:
> Ack, OK I'm awake now, I forgot you requested the -ruN diff.
> 
> 
> I did a:
> 
> 
> diff -ruN freetel-code/codec2-dev/src freetel-code-new/codec2-dev/src
> >patch.txt
> 
> 
> and put the patch at:
> 
> 
> http://goo.gl/4UZAFX
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 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

;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

ndex: quantise.c
===================================================================
--- quantise.c (revision 1692)
+++ 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
===================================================================
--- quantise.c (revision 1692)
+++ 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