From 52d624a012e324df7c65ec847f2363dae3050a21 Mon Sep 17 00:00:00 2001 From: naghibza Date: Mon, 8 Jun 2026 10:04:46 +0200 Subject: [PATCH] remove dead (always-overwritten) gsMapping clamp in ic_bwe_enc_gsMapping_fx --- lib_com/options.h | 1 + lib_enc/ivas_stereo_icbwe_enc_fx.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index aebd87cb0..5f210924b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -90,6 +90,7 @@ #define FIX_ISSUE_2613_WRONG_COMP_MACRO /* FhG: basop issue 2613: Inconsistent comparison macros in function tdm_SCh_LSF_intra_pred_fx*/ #define FIX_ISSUE_2611_WRONG_COMMENT /* FhG: basop issue 2611: Wrong Q value comment in fucntion stereo_dft_sg_recovery_fx()*/ #define FIX_BASOP_2550_TCX_ENC_MEM_UPDATE /* FhG: fix condition in tcx_encoder_memory_update_*_fx(), bring inline with float */ +#define FIX_BASOP_2620_ICBWE_GSMAPPING_DEAD_CLAMP /* FhG: remove dead (always-overwritten) gsMapping clamp in ic_bwe_enc_gsMapping_fx; float ref has no clamp */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/ivas_stereo_icbwe_enc_fx.c b/lib_enc/ivas_stereo_icbwe_enc_fx.c index 3694290b4..ee31ada4b 100644 --- a/lib_enc/ivas_stereo_icbwe_enc_fx.c +++ b/lib_enc/ivas_stereo_icbwe_enc_fx.c @@ -373,6 +373,7 @@ static Word16 ic_bwe_enc_gsMapping_fx( /* quantize the IC-BWE GS mapping*/ IF( EQ_16( element_mode, IVAS_CPE_TD ) ) { +#ifndef FIX_BASOP_2620_ICBWE_GSMAPPING_DEAD_CLAMP IF( LT_32( temp2_fx32, -( 2 << 25 ) ) ) { temp2_fx = -( 2 << 12 ); // Q12 @@ -383,6 +384,7 @@ static Word16 ic_bwe_enc_gsMapping_fx( temp2_fx = 1 << 12; // Q12 move16(); } +#endif temp2_fx = extract_h( L_shl_sat( temp2_fx32, Q3 ) ); // Q12 gsMapping_fx16 = 0; @@ -391,6 +393,7 @@ static Word16 ic_bwe_enc_gsMapping_fx( } ELSE { +#ifndef FIX_BASOP_2620_ICBWE_GSMAPPING_DEAD_CLAMP IF( LT_32( temp2_fx32, -( 5 << 25 ) ) ) { temp2_fx = -( 5 << 12 ); // Q12 @@ -401,6 +404,7 @@ static Word16 ic_bwe_enc_gsMapping_fx( temp2_fx = 1 << 12; // Q12 move16(); } +#endif temp2_fx = extract_h( L_shl_sat( temp2_fx32, Q3 ) ); // Q12 gsMapping_fx16 = 0; -- GitLab