reviving the old EPIC_48K mode.
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Fri, 1 Dec 2006 13:33:51 +0000 (13:33 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Fri, 1 Dec 2006 13:33:51 +0000 (13:33 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@12161 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/jitter.c
libspeex/modes.c
libspeex/nb_celp.c
libspeex/quant_lsp.c

index 3ca8a1a..618db20 100644 (file)
@@ -442,6 +442,7 @@ int jitter_buffer_ctl(JitterBuffer *jitter, int request, void *ptr)
          speex_warning_int("Unknown jitter_buffer_ctl request: ", request);
          return -1;
    }
+   return 0;
 }
 
 
index 97e7d1e..de1a612 100644 (file)
@@ -608,11 +608,7 @@ static const SpeexSubmode nb_48k_submode = {
    split_cb_search_shape_sign,
    split_cb_shape_sign_unquant,
    &split_cb_nb_48k,
-#ifdef FIXED_POINT
-   22938, 16384, 11796, 18022,
-#else
-   0.7, 0.5, .36, .55,
-#endif
+   QCONST16(.45,15),
    144
 };
 
@@ -622,7 +618,6 @@ static const SpeexNBMode nb_48k_mode = {
    240,    /*frameSize*/
    48,     /*subframeSize*/
    10,     /*lpcSize*/
-   640,    /*bufSize*/
    17,     /*pitchStart*/
    144,    /*pitchEnd*/
    0.9,    /*gamma1*/
index ef7b618..f70b7da 100644 (file)
@@ -432,7 +432,7 @@ int nb_encode(void *state, void *vin, SpeexBits *bits)
             ol_gain2=ol2;
          ol_gain2 = sqrt(2*ol_gain2*(ol1+ol2))*1.3*(1-.5*GAIN_SCALING_1*GAIN_SCALING_1*ol_pitch_coef*ol_pitch_coef);
       
-         ol_gain=SHR(sqrt(1+ol_gain2/st->frameSize),SIG_SHIFT);
+         ol_gain=SHR32(sqrt(1+ol_gain2/st->frameSize),SIG_SHIFT);
 
       } else
 #endif
@@ -1227,7 +1227,7 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
    VARDECL(spx_lsp_t *qlsp);
    spx_word16_t pitch_average=0;
 #ifdef EPIC_48K
-   int pitch_half[2];
+   int pitch_half[2] = {0, 0};
    int ol_pitch_id=0;
 #endif
    spx_word16_t *out = (spx_word16_t*)vout;
index bfca587..d907b98 100644 (file)
@@ -417,7 +417,7 @@ void lsp_quant_48k(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
 
 #ifdef FIXED_POINT
    for (i=0;i<order;i++)
-      qlsp[i]=PSHR(qlsp[i],2);
+      qlsp[i]=PSHR16(qlsp[i],2);
 #else
    for (i=0;i<order;i++)
       qlsp[i]=qlsp[i]*0.00097655;