From c3b3ad91b74fbba577a3181d54682c0efa9d4177 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 18 Aug 2025 17:12:40 +0200 Subject: [PATCH 1/2] port MR --- lib_com/options.h | 1 + lib_dec/ivas_init_dec_fx.c | 10 ++++++---- lib_dec/ivas_output_config_fx.c | 12 ++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 49f6e68e9..16612eedb 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -122,6 +122,7 @@ #define NONBE_1360_LFE_DELAY /* Dlb: LFE delay alignment when rendering in CLDFB domain*/ #define NONBE_1229_FIX_ISM1_DPID /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */ #define NONBE_SVD_OPTIMIZATION +#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix * /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 667b9dc32..ddc2cab51 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1507,6 +1507,8 @@ ivas_error ivas_init_decoder_fx( return error; } set16_fx( st_ivas->hSpar->hFbMixer->cldfb_cross_fade_fx, 0, CLDFB_NO_COL_MAX ); + +#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX test(); IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_DEC ) && st_ivas->hOutSetup.is_loudspeaker_setup ) { @@ -1515,7 +1517,7 @@ ivas_error ivas_init_decoder_fx( return error; } } - +#endif Word16 hodirac_flag = ivas_get_hodirac_flag_fx( ivas_total_brate, st_ivas->sba_analysis_order ); IF( hodirac_flag ) { @@ -1532,7 +1534,6 @@ ivas_error ivas_init_decoder_fx( } } - test(); test(); #ifdef NONBE_FIX_1052_SBA_EXT_FIX @@ -1570,6 +1571,7 @@ ivas_error ivas_init_decoder_fx( } st_ivas->sba_dirac_stereo_flag = ivas_get_sba_dirac_stereo_flag( st_ivas ); move16(); + FOR( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) { Word32 res_dec, res_frac; @@ -1702,6 +1704,7 @@ ivas_error ivas_init_decoder_fx( return error; } +#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX test(); IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_DEC ) && st_ivas->hOutSetup.is_loudspeaker_setup ) { @@ -1710,7 +1713,7 @@ ivas_error ivas_init_decoder_fx( return error; } } - +#endif Word16 hodirac_flag = ivas_get_hodirac_flag_fx( ivas_total_brate, st_ivas->sba_analysis_order ); IF( hodirac_flag ) { @@ -1727,7 +1730,6 @@ ivas_error ivas_init_decoder_fx( } } - test(); test(); IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && NE_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_MONO ) ) diff --git a/lib_dec/ivas_output_config_fx.c b/lib_dec/ivas_output_config_fx.c index 14341a888..2b4be8bf4 100644 --- a/lib_dec/ivas_output_config_fx.c +++ b/lib_dec/ivas_output_config_fx.c @@ -397,8 +397,10 @@ void ivas_renderer_select( test(); test(); test(); +#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX test(); test(); +#endif IF( EQ_32( ivas_format, SBA_FORMAT ) && ( NE_32( output_config, IVAS_AUDIO_CONFIG_5_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_2 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_5_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_7_1_4 ) && NE_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) && NE_32( output_config, IVAS_AUDIO_CONFIG_MONO ) && NE_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) ) ) { test(); @@ -416,6 +418,13 @@ void ivas_renderer_select( *internal_config = output_config; move16(); } +#ifdef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX + ELSE + { + *internal_config = IVAS_AUDIO_CONFIG_HOA3; + move16(); + } +#else ELSE IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_MONO ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) ) { *internal_config = IVAS_AUDIO_CONFIG_FOA; @@ -430,6 +439,7 @@ void ivas_renderer_select( *internal_config = IVAS_AUDIO_CONFIG_HOA3; move16(); } +#endif *renderer_type = RENDERER_SBA_LINEAR_DEC; move16(); } @@ -454,11 +464,13 @@ void ivas_renderer_select( *renderer_type = RENDERER_DISABLE; move16(); } +#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX ELSE IF( EQ_32( ivas_format, SBA_FORMAT ) && EQ_32( output_config, IVAS_AUDIO_CONFIG_MONO ) ) { *renderer_type = RENDERER_SBA_LINEAR_DEC; move16(); } +#endif ELSE IF( EQ_32( ivas_format, SBA_ISM_FORMAT ) && EQ_32( output_config, IVAS_AUDIO_CONFIG_STEREO ) ) { *renderer_type = RENDERER_OSBA_STEREO; -- GitLab From b4f724f8ab02bc9d73924a5e826b520d3616e9e4 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 18 Aug 2025 17:27:51 +0200 Subject: [PATCH 2/2] add closing slash --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index bbc6cbb92..233b88f0c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -123,7 +123,7 @@ #define NONBE_1229_FIX_ISM1_DPID /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */ #define NONBE_SVD_OPTIMIZATION #define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */ -#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix * +#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */ /* #################### End BASOP porting switches ############################ */ -- GitLab