From 302213ddba788a410d2ba7ce65922e51296e9520 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 6 Jan 2025 11:16:25 +0100 Subject: [PATCH] issue 1249: remove obsolete code around ALLRAD decoder matrix; under FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX --- lib_com/options.h | 1 + lib_dec/ivas_init_dec.c | 4 ++++ lib_dec/ivas_output_config.c | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 8b22dc430b..2262544d65 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,6 +162,7 @@ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE /* VA: issue 1228: Exit the processing when a HRTF binary file with wrong sampling rate is provided */ #define FIX_1225_DISCLAIMER /* VA: issue 1225: Add disclaimer for external renderer + Add info about IVAS reference version */ +#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index cb5dfc379a..51ba40ae22 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1509,6 +1509,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 ) @@ -1517,6 +1518,7 @@ ivas_error ivas_init_decoder( } } +#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 ) @@ -1664,6 +1666,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 ) @@ -1672,6 +1675,7 @@ ivas_error ivas_init_decoder( } } +#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 11e23d0b7b..27ccf25676 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -326,11 +326,15 @@ void ivas_renderer_select( { *internal_config = output_config; } +#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX else if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) { *internal_config = IVAS_AUDIO_CONFIG_FOA; } else if ( output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) +#else + else +#endif { *internal_config = IVAS_AUDIO_CONFIG_HOA3; } @@ -353,10 +357,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