Ignore:
Timestamp:
Jul 26, 2006 5:04:54 PM (18 years ago)
Author:
bennylp
Message:
  • Bring speex codec up to date with their SVN trunk
  • Speex codec should work in FIXED_POINT mode when PJ_HAS_FLOATING_POINT is set to zero.
  • ulaw2linear will return zero if zero is given (this would make the VAD works better, and it also fixed click noise when call is established/hangup).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/speex/modes.c

    r278 r628  
    191191   noise_codebook_unquant, 
    192192   NULL, 
    193 #ifdef FIXED_POINT 
    194    22938, 22938, 0, -1, 
    195 #else 
    196    .7, .7, 0, -1, 
    197 #endif 
     193   -1, 
    198194   43 
    199195}; 
     
    216212   split_cb_shape_sign_unquant, 
    217213   &split_cb_nb_ulbr, 
    218 #ifdef FIXED_POINT 
    219    22938, 16384, 11796, 21299, 
    220 #else 
    221    0.7, 0.5, .36, .65, 
    222 #endif 
     214   QCONST16(.65,15), 
    223215   79 
    224216}; 
     
    241233   split_cb_shape_sign_unquant, 
    242234   &split_cb_nb_vlbr, 
    243 #ifdef FIXED_POINT 
    244    22938, 16384, 11796, 18022, 
    245 #else 
    246    0.7, 0.5, .36, .55, 
    247 #endif 
     235   QCONST16(.55,15), 
    248236   119 
    249237}; 
     
    266254   split_cb_shape_sign_unquant, 
    267255   &split_cb_nb_lbr, 
    268 #ifdef FIXED_POINT 
    269    22938, 18022, 9830, 14746, 
    270 #else 
    271    0.7, 0.55, .30, .45, 
    272 #endif 
     256   QCONST16(.45,15), 
    273257   160 
    274258}; 
     
    291275   split_cb_shape_sign_unquant, 
    292276   &split_cb_nb_med, 
    293 #ifdef FIXED_POINT 
    294    22938, 20644, 5243, 11469, 
    295 #else 
    296    0.7, 0.63, .16, .35, 
    297 #endif 
     277   QCONST16(.35,15), 
    298278   220 
    299279}; 
     
    316296   split_cb_shape_sign_unquant, 
    317297   &split_cb_nb, 
    318 #ifdef FIXED_POINT 
    319    22938, 21299, 3932, 8192, 
    320 #else 
    321    0.7, 0.65, .12, .25, 
    322 #endif 
     298   QCONST16(.2,15), 
    323299   300 
    324300}; 
     
    341317   split_cb_shape_sign_unquant, 
    342318   &split_cb_sb, 
    343 #ifdef FIXED_POINT 
    344    22282, 21299, 2294, 3277, 
    345 #else 
    346    0.68, 0.65, .07, .1, 
    347 #endif 
     319   QCONST16(.1,15), 
    348320   364 
    349321}; 
     
    366338   split_cb_shape_sign_unquant, 
    367339   &split_cb_nb, 
    368 #ifdef FIXED_POINT 
    369    21299, 21299, 0, -1, 
    370 #else 
    371    0.65, 0.65, .0, -1, 
    372 #endif 
     340   -1, 
    373341   492 
    374342}; 
     
    435403   NULL, 
    436404   NULL, 
    437 #ifdef FIXED_POINT 
    438    24576, 24576, 0, -1, 
    439 #else 
    440    .75, .75, .0, -1, 
    441 #endif 
     405   -1, 
    442406   36 
    443407}; 
     
    464428   &split_cb_high_lbr, 
    465429#endif 
    466 #ifdef FIXED_POINT 
    467    27853, 19661, 8192, -1, 
    468 #else 
    469    .85, .6, .25, -1, 
    470 #endif 
     430   -1, 
    471431   112 
    472432}; 
     
    493453   &split_cb_high, 
    494454#endif 
    495  
    496 #ifdef FIXED_POINT 
    497    24576, 22938, 1638, -1, 
    498 #else 
    499    .75, .7, .05, -1, 
    500 #endif 
     455   -1, 
    501456   192 
    502457}; 
     
    522477   &split_cb_high, 
    523478#endif 
    524 #ifdef FIXED_POINT 
    525    24576, 24576, 0, -1, 
    526 #else 
    527    .75, .75, .0, -1, 
    528 #endif 
     479   -1, 
    529480   352 
    530481}; 
     
    543494   0.9, 0.6, /* gamma1, gamma2 */ 
    544495#endif 
    545    .001,   /*lag_factor*/ 
    546    QCONST16(.0001,15), /*lpc_floor*/ 
     496   .012,   /*lag_factor*/ 
     497   QCONST16(.0002,15), /*lpc_floor*/ 
    547498   0.9, 
    548499   {NULL, &wb_submode1, &wb_submode2, &wb_submode3, &wb_submode4, NULL, NULL, NULL}, 
     
    589540   0.9, 0.6, /* gamma1, gamma2 */ 
    590541#endif 
    591    .002,   /*lag_factor*/ 
    592    QCONST16(.0001,15), /*lpc_floor*/ 
     542   .012,   /*lag_factor*/ 
     543   QCONST16(.0002,15), /*lpc_floor*/ 
    593544   0.7, 
    594545   {NULL, &wb_submode1, NULL, NULL, NULL, NULL, NULL, NULL}, 
Note: See TracChangeset for help on using the changeset viewer.