diff --git a/lib_com/options.h b/lib_com/options.h index 1da007ad696ce783ca058ae3d0c182302c9e4036..247f43ed2472f86cee7a2e02b0c426c8b1e24944 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,6 +166,7 @@ #define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */ #define NONBE_1214_PLC_LSF_MEMORY /* VA: issue 1224: reset ACELP PLC FEC memory in case of switching from MDCT stereo to TD/DFT stereo */ #define NONBE_1293_SR_HRTF /* VA: issue 1293: add support of external HRTFs in split rendering */ +#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */ #define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 1440185231b42a769bb1a905662ef804fd0f3bfe..9c1ba26e182f6a9a4143473006d5feb1f2fe4eea 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1943,6 +1943,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 ) { @@ -1951,7 +1953,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 ) { @@ -2005,6 +2007,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; @@ -2137,6 +2140,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 ) { @@ -2145,7 +2149,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 ) { diff --git a/lib_dec/ivas_output_config_fx.c b/lib_dec/ivas_output_config_fx.c index 14341a8886bd99580437f926d8d49314fc2d281e..2b4be8bf411ba4d2291413d11163a1d722c639b4 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;