From 4432d3052f94a8e16c81d090f0e7f2036aaddc6f Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Tue, 3 Sep 2024 11:19:26 +0300 Subject: [PATCH] Fix issue 1174 by removing unnecessary loop. --- lib_com/options.h | 1 + lib_enc/ivas_masa_enc.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 38ab8ff7fe..42259c520c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -193,6 +193,7 @@ #define NONE_BE_FIX_816_LFE_PLC_FLOAT /* DLB: issue 816: reduce required precision to float for LFE-PLC*/ #define NONBE_FIX_1220_OMASA_JBM_EXT_USAN /* Nokia: fix issue 1220 OMASA EXT JBM USAN, also fix similar cases of free to avoid future problems */ +#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/ivas_masa_enc.c b/lib_enc/ivas_masa_enc.c index 54691e864e..d58d49a9ed 100644 --- a/lib_enc/ivas_masa_enc.c +++ b/lib_enc/ivas_masa_enc.c @@ -1747,10 +1747,14 @@ static void reduce_metadata_further( /* Copy spread coherence to the rest of subframes for the coherence coding algorithm. */ for ( sf = 1; sf < MAX_PARAM_SPATIAL_SUBFRAMES; sf++ ) { +#ifdef NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR + hqmetadata->q_direction[0].coherence_band_data[band].spread_coherence[sf] = hqmetadata->q_direction[0].coherence_band_data[band].spread_coherence[0]; +#else for ( band = 0; band < numCodingBands; band++ ) { hqmetadata->q_direction[0].coherence_band_data[band].spread_coherence[sf] = hqmetadata->q_direction[0].coherence_band_data[band].spread_coherence[0]; } +#endif } /* Surround coherence is already merged through time */ -- GitLab