patch from Bruce for portability to embedded environments
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 22 Oct 2010 06:55:10 +0000 (06:55 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 22 Oct 2010 06:55:10 +0000 (06:55 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@205 01035d8c-6547-0410-b346-abe4f91aad63

codec2/README
codec2/src/Makefile.am
codec2/src/Makefile.in
codec2/src/defines.h
codec2/src/dump.h
codec2/src/four1.c
codec2/src/nlp.h
codec2/src/phase.c
codec2/src/sine.h
codec2/unittest/tcodec2.c

index 2490fcf1fd54a6803a694bad0dc18e0241ee6d47..687ef141e2303136d02b0a2c83a8e154ffa83560 100644 (file)
@@ -9,8 +9,9 @@ For more information please see:
 Quickstart
 ----------
 
-$ cd codec2/src
+$ ./configure
 $ make
+$ cd src
 $ ./c2enc ../raw/hts1a.raw hts1a_c2.bit
 $ ./c2dec hts1a_c2.bit hts1a_c2.raw 
 $ ../script/menu.sh ../raw/hts1a.raw hts1a_c2.raw
@@ -19,6 +20,12 @@ For playback testing, menu.sh requires either the 'play', 'aplay' or
 'ossplay' programs to be installed (see http://sox.sourceforge.net/,
 http://www.alsa-project.org/, or http://www.opensound.com/ respectively).
 
+To enable dump files build using:
+
+$ make clean
+$ CFLAGS=-DDUMP ./configure
+$ make
+
 Programs
 --------
 
@@ -40,4 +47,4 @@ Directories
   raw      - speech files in raw format (16 bits signed linear 8 KHz)
   unittest - unit test source code
   wav      - speech files in wave file format
-
+  voicing  - hand estimated voicing files 
index 7453de8feba361be4cbbac182fd7ec9bb26f02d0..8451899dac4a01ade6feba0d322571e5dff1cfaf 100644 (file)
@@ -56,7 +56,6 @@ phase.h \
 quantise.h \
 comp.h \
 dump.h \
-globals.h \
 lpc.h \
 nlp.h  \
 postfilter.h \
index 8828ef4793bae02dcd984f66b2653f3f9f32c7e7..13b95b558834ae6ac9c6d992a5daaf9ce1967192 100644 (file)
@@ -251,7 +251,6 @@ phase.h \
 quantise.h \
 comp.h \
 dump.h \
-globals.h \
 lpc.h \
 nlp.h  \
 postfilter.h \
index 93b4d853ac893dba5e7e2b44925db8fb5f86cf22..679acb7995389c030cb2f709bff315f02caa1aaf 100644 (file)
                                                                              
 \*---------------------------------------------------------------------------*/
 
-/* Complex number */
-
-typedef struct {
-  float real;
-  float imag;
-} COMP;
-
 /* Structure to hold model parameters for one frame */
 
 typedef struct {
index 9f59a5580570ed09c187f8669d7b93da4dbed4e6..aebda4156d84804d6c5934be0979f3f47bd65c03 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __DUMP__
 #define __DUMP__
 
+#include "comp.h"
+
 void dump_on(char filename_prefix[]);
 void dump_off();
 
index 1c1ede597c4d8409016dbacead1e2a1d0c0fa691..7713ff1fa970c587e0e3b4c8221189c3f5c507df 100644 (file)
@@ -13,9 +13,8 @@
 
 #define SWAP(a,b) tempr=(a);(a)=(b);(b)=tempr
 
-void four1(data,nn,isign)
-float data[];
-int nn,isign;
+void
+four1(float * data, int nn, int isign)
 {
        int n,mmax,m,j,istep,i;
        double wtemp,wr,wpr,wpi,wi,theta;
index 5348ba59c7f95968331daba34c5ac7b9684759f8..88a3733dc249e86b228ae66b425916cb08204e1a 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef __NLP__
 #define __NLP__
 
+#include "comp.h"
+
 void *nlp_create();
 void nlp_destroy(void *nlp_state);
 float nlp(void *nlp_state, float Sn[], int n, int m, int pmin, int pmax, 
index e8cee7ec2708407ac51066fdeb13399a3a7a4a4c..d9210815cb5327c2e651f43c8c24c77bdaa4e809 100644 (file)
@@ -28,6 +28,7 @@
 #include "defines.h"
 #include "phase.h"
 #include "four1.h"
+#include "comp.h"
 
 #include <assert.h>
 #include <math.h>
index 78e9e10f1c46dc92c48ad9da0e03a011df6e2502..d56ac9838f1b60cc3c8c5e37fc81fd4f1d60ab84 100644 (file)
@@ -28,6 +28,9 @@
 #ifndef __SINE__
 #define __SINE__
 
+#include "defines.h"
+#include "comp.h"
+
 void make_analysis_window(float w[], COMP W[]);
 void dft_speech(COMP Sw[], float Sn[], float w[]);
 void two_stage_pitch_refinement(MODEL *model, COMP Sw[]);
index b95dd449f3956cd37fdd80eb7af4a22a43f41402..dc1eda5734f0bcd758a7dd574658bec02734bb1c 100644 (file)
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <math.h>
 #include "defines.h"
+#include "comp.h"
 #include "codec2.h"
 #include "quantise.h"
 #include "interp.h"