From eb368a654ea9f1c8879117f4251d56ca99c1d663 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 3 Jun 2025 15:23:50 +0200 Subject: [PATCH] fix issue 1250: fix crash in McMASA to custom LS output decoding; under NONBE_1250_MCMASA_LS_OUTPUT --- lib_com/options.h | 1 + lib_dec/ivas_dirac_dec.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index a127724dc2..d4fc3f0e85 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -178,6 +178,7 @@ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ #define NONBE_FIX_1326_MASA_EXTREND_CUSTOMLS_OUT /* FhG: Fix crash for external renderer MASA to custom LS rendering, number of output channels not set correctly */ #define NONBE_1325_TD_STEREO_QUANT_LSF_SEC /* Nokia: issue 1325: fix for usage of active_cnt variable in TD stereo LSFQ */ +#define NONBE_1250_MCMASA_LS_OUTPUT /* VA: issue 1250: fix crash in McMASA to custom LS output decoding */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 53c8d8ccd5..af0651b967 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2542,7 +2542,14 @@ void ivas_dirac_dec_render_sf( /* Move the separated and the LFE channels to temporary variables as spatial synthesis may overwrite current channels */ mvr2r( &( output_f[st_ivas->hOutSetup.separateChannelIndex][subframe_start_sample] ), tmp_separated, num_samples_subframe ); +#ifdef NONBE_1250_MCMASA_LS_OUTPUT + if ( hDirACRend->hOutSetup.num_lfe > 0 ) + { + mvr2r( &( output_f[LFE_CHANNEL][subframe_start_sample] ), tmp_lfe, num_samples_subframe ); + } +#else mvr2r( &( output_f[LFE_CHANNEL][subframe_start_sample] ), tmp_lfe, num_samples_subframe ); +#endif for ( ch = 0; ch < outchannels; ch++ ) { -- GitLab