diff --git a/lib_com/options.h b/lib_com/options.h index 8ae36580e81d7977ee19a57531df3e6553a597b9..0a58d7d06f97d0656ba9161ce741d03739fb71dc 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -155,6 +155,9 @@ #define ALLRAD_OPTIM /* Issue 159: Optimize memory allocation for ALLRAD */ #define FIX_I178_HQ_BUFFER_OVERRUN /* issue 178: Buffer overrun in HQ core decoder -- spectral filling buffer did not account for extended transition frame in IVAS */ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */ + +#define SPAR_STEREO_NO_DIRAC /* Issue 180: skip DirAC processing channels for stereo output */ + #define AGC_TUNING_IMPROVEMENT /* Issue 168: Enable AGC for low bit rate (1 TC) */ #ifdef AGC_TUNING_IMPROVEMENT #define AGC_ENABLE_FOR_LBR /* Issue 168: Enable AGC for low bit rate (1 TC) */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index e3849dfbe090ca8d8e305af266eb324b2064b5eb..3250fe05cbc889f52c0500ef11582c5eedfb7d77 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -790,7 +790,12 @@ ivas_error ivas_init_decoder( return error; } - if ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) + if ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA +#ifdef SPAR_STEREO_NO_DIRAC + && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO + && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO +#endif + ) { if ( ( error = ivas_dirac_dec_open( st_ivas ) ) != IVAS_ERR_OK ) { diff --git a/lib_dec/ivas_output_init.c b/lib_dec/ivas_output_init.c index 307b29e74a147d3ea893ad3e04c02acbd9a1e8f4..3b65756ad600cd15bf83bbe0f3f5a8c3d47ac7ea 100644 --- a/lib_dec/ivas_output_init.c +++ b/lib_dec/ivas_output_init.c @@ -515,6 +515,12 @@ void ivas_renderer_select( { *internal_config = output_config; } +#ifdef SPAR_STEREO_NO_DIRAC + else if ( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) + { + *internal_config = AUDIO_CONFIG_FOA; + } +#endif else { *internal_config = AUDIO_CONFIG_HOA3; diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index eea34b31dcd9d68fabd84932cd77a4a59a6538d2..a51e941548654f7c345afd82041ee7e811fa5a14 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -1146,7 +1146,12 @@ void ivas_spar_dec_upmixer( } } - if ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) + if ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_FOA +#ifdef SPAR_STEREO_NO_DIRAC + && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO + && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO +#endif + ) { ivas_dirac_dec( st_ivas, output, nchan_internal, cldfb_in_ts_re, cldfb_in_ts_im, i_sf ); }