From a2f8fbf18f04e7660cc87a609fea23d3ce1a7372 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Fri, 23 May 2025 17:46:17 +0530 Subject: [PATCH 1/2] Fix for 3GPP issue 1475: 160 kbit/s ISM4 Encoder: FB BWE lacking energy Link #1475 --- lib_enc/swb_tbe_enc_fx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib_enc/swb_tbe_enc_fx.c b/lib_enc/swb_tbe_enc_fx.c index 903f3a46c..a4230db46 100644 --- a/lib_enc/swb_tbe_enc_fx.c +++ b/lib_enc/swb_tbe_enc_fx.c @@ -7548,7 +7548,7 @@ void fb_tbe_enc_ivas_fx( move16(); temp2 = sum2_fx_no_sat( input_fhb, L_FRAME48k / 2 ); // 2*q_input_fhb /* Q(2*Q_input_fhb-8) */ - temp2 = W_add( temp2, W_shl( hBWE_TD->prev_fb_energy_fx, sub( q_input_fhb, hBWE_TD->prev_fb_energy_fx_Q ) ) ); // 2*q_input_fhb + temp2 = W_add( temp2, W_shl( hBWE_TD->prev_fb_energy_fx, sub( shl( q_input_fhb, 1 ), hBWE_TD->prev_fb_energy_fx_Q ) ) ); // 2*q_input_fhb temp1 = sum2_fx_no_sat( input_fhb + L_FRAME48k / 2, L_FRAME48k / 2 ); // 2*q_input_fhb exp = W_norm( temp1 ); @@ -7605,7 +7605,6 @@ void fb_tbe_enc_ivas_fx( { push_indice( st->hBstr, IND_FB_SLOPE, idxGain, 4 ); } - return; } void tbe_write_bitstream_fx( -- GitLab From e26eb7288617bc285cf2e2ec22cd02f2183b8664 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Fri, 23 May 2025 18:15:50 +0530 Subject: [PATCH 2/2] Clang formatting changes --- lib_enc/swb_tbe_enc_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/swb_tbe_enc_fx.c b/lib_enc/swb_tbe_enc_fx.c index a4230db46..9d0f16ee9 100644 --- a/lib_enc/swb_tbe_enc_fx.c +++ b/lib_enc/swb_tbe_enc_fx.c @@ -7547,7 +7547,7 @@ void fb_tbe_enc_ivas_fx( hBWE_TD->old_input_fhb_fx_Q = exp_temp; move16(); - temp2 = sum2_fx_no_sat( input_fhb, L_FRAME48k / 2 ); // 2*q_input_fhb /* Q(2*Q_input_fhb-8) */ + temp2 = sum2_fx_no_sat( input_fhb, L_FRAME48k / 2 ); // 2*q_input_fhb /* Q(2*Q_input_fhb-8) */ temp2 = W_add( temp2, W_shl( hBWE_TD->prev_fb_energy_fx, sub( shl( q_input_fhb, 1 ), hBWE_TD->prev_fb_energy_fx_Q ) ) ); // 2*q_input_fhb temp1 = sum2_fx_no_sat( input_fhb + L_FRAME48k / 2, L_FRAME48k / 2 ); // 2*q_input_fhb -- GitLab