Removed some warnings, fixed posfilter mode for wideband
authorjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Fri, 7 Jun 2002 04:30:20 +0000 (04:30 +0000)
committerjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Fri, 7 Jun 2002 04:30:20 +0000 (04:30 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@3359 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/cb_search.c
libspeex/hexc_table.c
libspeex/modes.c
libspeex/sb_celp.c

index 09564f6..801b812 100644 (file)
@@ -735,8 +735,8 @@ float *stack
             }
             
             {
-               int best_index2, best_sign2, sign2;
-               float  best_dist2;
+               int best_index2=0, best_sign2=0, sign2;
+               float  best_dist2=0;
                x=t+subvect_size*(i+1);
                for (j=0;j<shape_cb_size;j++)
                {
index 308719d..844d8ee 100644 (file)
@@ -1,4 +1,4 @@
-float hexc_table[256][8]={
+float hexc_table[128][8]={
 {-0.832280,0.602346,-0.560115,0.167680,-0.314430,-0.214323,0.482515,-0.353925},
 {0.223509,-0.620498,0.624377,-0.595327,0.053103,-0.994383,0.742378,0.465689},
 {0.123678,-0.308868,-1.493745,0.588987,0.705033,-0.737404,-0.826796,1.359984},
index 2415026..3859413 100644 (file)
@@ -44,7 +44,7 @@ pf_params pf_params_nb = {
 /* Post-filter parameters for wideband */
 pf_params pf_params_sb = {
    0.65,      /* formant enhancement numerator */
-   0.67,      /* formant enhancement denominator */
+   0.68,      /* formant enhancement denominator */
    0.3       /* pitch enhancement factor */
 };
 
@@ -132,7 +132,7 @@ static SpeexNBMode low_sb_mode = {
    split_cb_nogain_unquant,
    &split_cb_sb,
    nb_post_filter,
-   &pf_params_nb
+   &pf_params_sb
 };
 
 SpeexMode low_wb_mode = {
index 57ee35e..8a8ef17 100644 (file)
@@ -567,6 +567,16 @@ void sb_encode(void *state, float *in, SpeexBits *bits)
          for (i=0;i<st->subframeSize;i++)
             exc[i] += innov[i]*scale;
 
+         if (0) {
+            float en=0;
+            for (i=0;i<st->subframeSize;i++)
+               en+=exc[i]*exc[i];
+            en=sqrt(eh/(1+en));
+            for (i=0;i<st->subframeSize;i++)
+               exc[i]*=en;
+            printf ("correction high: %f\n", en);
+         }
+
          POP(st->stack);
       }
 #if 1