diff --git a/lib_com/options.h b/lib_com/options.h index 23f991793e03078e44794c7b8d7e1b49d803d1c9..5a83a6491112b89466cd848e7e7ec1fc1c593efe 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,6 +163,8 @@ #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_1179_USAN_PHASEECU /* Eri: issue 1179: better handling of 16 bit wrap around for very long(>200ms) FER-bursts */ +#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */ + /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index cb5dfc379a5312005ecb5c92d8ad6534b4750f07..51ba40ae2233c03f56d42fe4934ee42f030fb49f 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 11e23d0b7b0814ab2824f337192483b1ce52b375..27ccf2567628a5567ba0dc5dcdc311b5975323c9 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;