From 45211c12942eab11dabbae1d9e42db899bc22410 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 18 Aug 2025 17:05:15 +0200 Subject: [PATCH 1/2] port MR --- lib_com/options.h | 1 + lib_dec/ivas_init_dec.c | 6 ++++-- lib_dec/ivas_output_config.c | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 346383984..3b265c582 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -193,6 +193,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 FIX_1158_FASTCONV_REVERB_HRTF /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */ +#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.c b/lib_dec/ivas_init_dec.c index c3ef7ab59..560b0438d 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1267,7 +1267,7 @@ ivas_error ivas_init_decoder( { return error; } - +#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup ) { if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK ) @@ -1275,6 +1275,7 @@ ivas_error ivas_init_decoder( return error; } } +#endif if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ), st_ivas->ivas_format ) ) != IVAS_ERR_OK ) @@ -1425,7 +1426,7 @@ ivas_error ivas_init_decoder( { return error; } - +#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup ) { if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK ) @@ -1433,6 +1434,7 @@ ivas_error ivas_init_decoder( return error; } } +#endif if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ), st_ivas->ivas_format ) ) != IVAS_ERR_OK ) diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 6aea937ce..94f3e94f4 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -338,6 +338,12 @@ void ivas_renderer_select( { *internal_config = output_config; } +#ifdef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX + else + { + *internal_config = IVAS_AUDIO_CONFIG_HOA3; + } +#else else if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) { *internal_config = IVAS_AUDIO_CONFIG_FOA; @@ -346,6 +352,7 @@ void ivas_renderer_select( else if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) #else if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) +#endif #endif { *internal_config = IVAS_AUDIO_CONFIG_HOA3; @@ -369,10 +376,12 @@ void ivas_renderer_select( { *renderer_type = RENDERER_DISABLE; } +#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX else if ( ivas_format == SBA_FORMAT && output_config == IVAS_AUDIO_CONFIG_MONO ) { *renderer_type = RENDERER_SBA_LINEAR_DEC; } +#endif else if ( ivas_format == SBA_ISM_FORMAT && output_config == IVAS_AUDIO_CONFIG_STEREO ) { *renderer_type = RENDERER_OSBA_STEREO; -- GitLab From 65ebc1f2f79cf47e54756d2173779ee6e77b6bb1 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 18 Aug 2025 17:33:22 +0200 Subject: [PATCH 2/2] fix --- lib_dec/ivas_output_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 94f3e94f4..801cc58e6 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -352,11 +352,11 @@ void ivas_renderer_select( else if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) #else if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) -#endif #endif { *internal_config = IVAS_AUDIO_CONFIG_HOA3; } +#endif *renderer_type = RENDERER_SBA_LINEAR_DEC; } else if ( ( ivas_format == MASA_FORMAT && output_config == IVAS_AUDIO_CONFIG_MONO && st_ivas->nchan_transport == 1 ) || -- GitLab