diff --git a/lib_com/options.h b/lib_com/options.h index 9ce33d497451049e7dbee57598e3a596b0c93473..32c6745599b3e8d28b5f743af27451148d8b4acf 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -130,6 +130,7 @@ #define FIX_FLOAT_1578_OMASA_REND_SPIKES /* Nokia: Float issue 1578: Fix spikes and collapsed perception in OMASA/MASA rendering to FOA/HOA */ #define FIX_1521_SBA_LOUDNESS_STEREO /* FhG: issue 1521: Fix loudness for SBA to stereo rendering */ #define FIX_1559 /* Eri/FhG: fix for Issue 1559 in FD CNG with bitrate/bw switching */ +#define FIX_BASOP_2519_TCA_LA_ZERO_EXP /* FhG: BASOP #2519: Exclude zero samples from exp_com calculation in tcaTargetCh_LA_fx */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/ivas_stereo_ica_enc_fx.c b/lib_enc/ivas_stereo_ica_enc_fx.c index 234652072aafb5da36bdc5e843e522bd6928ad00..0263267f7afc9318cfad8b947bb8bee26a967d7f 100644 --- a/lib_enc/ivas_stereo_ica_enc_fx.c +++ b/lib_enc/ivas_stereo_ica_enc_fx.c @@ -171,7 +171,14 @@ static void tcaTargetCh_LA_fx( move32(); target_exp_temp[i + currentNCShift] = temp; move16(); +#ifdef FIX_BASOP_2519_TCA_LA_ZERO_EXP + IF( NE_32( target[i + currentNCShift], 0 ) ) + { + exp_com = s_max( exp_com, temp ); + } +#else exp_com = s_max( exp_com, temp ); +#endif } FOR( ; i < input_frame; i++ ) @@ -180,7 +187,14 @@ static void tcaTargetCh_LA_fx( move32(); target_exp_temp[i + currentNCShift] = add( gAdj_exp, ref_exp ); move16(); +#ifdef FIX_BASOP_2519_TCA_LA_ZERO_EXP + IF( NE_32( target[i + currentNCShift], 0 ) ) + { + exp_com = s_max( exp_com, target_exp_temp[i + currentNCShift] ); + } +#else exp_com = s_max( exp_com, target_exp_temp[i + currentNCShift] ); +#endif } FOR( i = 0; i < input_frame + currentNCShift; i++ )