Loading lib_enc/cng_enc_fx.c +17 −1 Original line number Diff line number Diff line Loading @@ -1649,6 +1649,9 @@ static Word16 shb_DTX_fx( Word16 *shb_new_speech_fx; Word32 wb_ener_fx; Word32 shb_ener_fx; #ifdef NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT Word16 shb_ener_q; #endif Word16 log_wb_ener_fx; Word16 log_shb_ener_fx; Word16 tmp; Loading @@ -1673,13 +1676,22 @@ static Word16 shb_DTX_fx( #endif shb_ener_fx = L_deposit_l( 0 ); #ifdef NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT FOR( i = 0; i < L_FRAME16k; i++ ) { shb_ener_fx = L_mac_sat( shb_ener_fx, shb_old_speech_fx[i], shb_old_speech_fx[i] ); // ( 2 * hBWE_TD->old_speech_shb_q + Q1 ) --> Q1 due to left shift in L_mac } shb_ener_q = add( shl( hBWE_TD->old_speech_shb_q, 1 ), 1 ); shb_ener_fx = L_add( Mpy_32_16_1( shb_ener_fx, 102 ), 1 ); /* ( 1 / L_FRAME16K ) -> 102 in Q15, shb_ener_fx in shb_ener_q */ #else FOR( i = 0; i < L_FRAME16k; i++ ) { shb_ener_fx = L_mac_sat( shb_ener_fx, shb_old_speech_fx[i], shb_old_speech_fx[i] ); // ( Q0 + Q0 + Q1 ) --> Q1 due to left shift in L_mac } shb_ener_fx = L_add( Mpy_32_16_1( shb_ener_fx, 102 ), 1 ); /* ( 1 / L_FRAME16K ) -> 102 in Q15, shb_ener_fx in Q1 */ #endif wb_ener_fx = L_deposit_l( 0 ); FOR( i = 0; i < st->L_frame; i++ ) { Loading @@ -1696,7 +1708,11 @@ static Word16 shb_DTX_fx( log_wb_ener_fx = round_fx_sat( L_shl_sat( wb_ener_fx, 10 ) ); /* log_wb_ener_fx in Q8 */ exp = norm_l( shb_ener_fx ); fra = Log2_norm_lc( L_shl( shb_ener_fx, exp ) ); #ifdef NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT exp = sub( sub( 30, shb_ener_q ), exp ); #else exp = sub( 30 - 1, exp ); #endif shb_ener_fx = Mpy_32_16( exp, fra, LG10 ); test(); Loading Loading
lib_enc/cng_enc_fx.c +17 −1 Original line number Diff line number Diff line Loading @@ -1649,6 +1649,9 @@ static Word16 shb_DTX_fx( Word16 *shb_new_speech_fx; Word32 wb_ener_fx; Word32 shb_ener_fx; #ifdef NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT Word16 shb_ener_q; #endif Word16 log_wb_ener_fx; Word16 log_shb_ener_fx; Word16 tmp; Loading @@ -1673,13 +1676,22 @@ static Word16 shb_DTX_fx( #endif shb_ener_fx = L_deposit_l( 0 ); #ifdef NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT FOR( i = 0; i < L_FRAME16k; i++ ) { shb_ener_fx = L_mac_sat( shb_ener_fx, shb_old_speech_fx[i], shb_old_speech_fx[i] ); // ( 2 * hBWE_TD->old_speech_shb_q + Q1 ) --> Q1 due to left shift in L_mac } shb_ener_q = add( shl( hBWE_TD->old_speech_shb_q, 1 ), 1 ); shb_ener_fx = L_add( Mpy_32_16_1( shb_ener_fx, 102 ), 1 ); /* ( 1 / L_FRAME16K ) -> 102 in Q15, shb_ener_fx in shb_ener_q */ #else FOR( i = 0; i < L_FRAME16k; i++ ) { shb_ener_fx = L_mac_sat( shb_ener_fx, shb_old_speech_fx[i], shb_old_speech_fx[i] ); // ( Q0 + Q0 + Q1 ) --> Q1 due to left shift in L_mac } shb_ener_fx = L_add( Mpy_32_16_1( shb_ener_fx, 102 ), 1 ); /* ( 1 / L_FRAME16K ) -> 102 in Q15, shb_ener_fx in Q1 */ #endif wb_ener_fx = L_deposit_l( 0 ); FOR( i = 0; i < st->L_frame; i++ ) { Loading @@ -1696,7 +1708,11 @@ static Word16 shb_DTX_fx( log_wb_ener_fx = round_fx_sat( L_shl_sat( wb_ener_fx, 10 ) ); /* log_wb_ener_fx in Q8 */ exp = norm_l( shb_ener_fx ); fra = Log2_norm_lc( L_shl( shb_ener_fx, exp ) ); #ifdef NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT exp = sub( sub( 30, shb_ener_q ), exp ); #else exp = sub( 30 - 1, exp ); #endif shb_ener_fx = Mpy_32_16( exp, fra, LG10 ); test(); Loading