diff options
author | Koen Vos <koenvos@users.noreply.github.com> | 2016-06-02 23:03:27 +0800 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-06-02 15:09:56 -0400 |
commit | ca231d12e9f1418c04af0ee140b85acde9830f17 (patch) | |
tree | d74659434385af9809dff4edb14984a22ab5c689 /silk/VQ_WMat_EC.c | |
parent | 8e8fe1d948f804f919291c56009d65dd5b7c7b72 (diff) | |
download | opus-exp_lbr_tune6.tar.gz |
comment about reduced codelength component in LTP quantizer error metricexp_lbr_tune6
Diffstat (limited to 'silk/VQ_WMat_EC.c')
-rw-r--r-- | silk/VQ_WMat_EC.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/silk/VQ_WMat_EC.c b/silk/VQ_WMat_EC.c index f16ca827..1434971a 100644 --- a/silk/VQ_WMat_EC.c +++ b/silk/VQ_WMat_EC.c @@ -63,7 +63,7 @@ void silk_VQ_WMat_EC_c( cb_row_Q7 = cb_Q7; for( k = 0; k < L; k++ ) { /* Weighted rate */ - /* Quantization error: 1 - 2* xX * cb + cb' * XX * cb */ + /* Quantization error: 1 - 2 * xX * cb + cb' * XX * cb */ sum1_Q15 = SILK_FIX_CONST( 1.001, 15 ); /* first row of XX_Q17 */ @@ -105,7 +105,8 @@ void silk_VQ_WMat_EC_c( if( sum1_Q15 >= 0 ) { /* Translate residual energy to bits using high-rate assumption (6 dB ==> 1 bit/sample) */ bits_res_Q8 = silk_SMULBB( subfr_len, silk_lin2log( sum1_Q15 ) - (15 << 7) ); - bits_tot_Q8 = silk_ADD_LSHIFT32( bits_res_Q8, cl_Q5[ k ], 2 ); + /* In the following line we reduce the codelength component by half ("-1"); seems to slghtly improve quality */ + bits_tot_Q8 = silk_ADD_LSHIFT32( bits_res_Q8, cl_Q5[ k ], 3-1 ); if( bits_tot_Q8 <= *rate_dist_Q8 ) { *rate_dist_Q8 = bits_tot_Q8; *res_nrg_Q15 = sum1_Q15; |