From 8b31a8440b1d782088fab825ea7c67d5fb0faad3 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 11 Oct 2023 15:18:25 +0200 Subject: [PATCH] issue 785: remove dead code; under FIX_785_REMOVE_DEAD_CODE --- lib_com/options.h | 2 +- lib_dec/ivas_binRenderer_internal.c | 4 ++++ lib_enc/ivas_mct_enc.c | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 9348bf96aa..4ddb7d287c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -149,7 +149,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define SPLIT_REND_WITH_HEAD_ROT*/ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ - +#define FIX_785_REMOVE_DEAD_CODE /* VA: issue 785: remove dead code */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index e31abae1d8..efb4ee9e3f 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -872,8 +872,12 @@ static void ivas_binaural_obtain_DMX( { int16_t chIdx, bandIdx, k; +#ifdef FIX_785_REMOVE_DEAD_CODE + if ( hBinRenderer->ivas_format == MC_FORMAT ) +#else // ToDo: hBinRenderer->ivas_format is never set to ISM_FORMAT if ( hBinRenderer->ivas_format == MC_FORMAT || hBinRenderer->ivas_format == ISM_FORMAT ) +#endif { /* Obtain the downmix */ float P_in[CLDFB_NO_CHANNELS_MAX]; diff --git a/lib_enc/ivas_mct_enc.c b/lib_enc/ivas_mct_enc.c index a664d4974d..e0d46ee26e 100755 --- a/lib_enc/ivas_mct_enc.c +++ b/lib_enc/ivas_mct_enc.c @@ -334,14 +334,18 @@ ivas_error create_mct_enc( { hMCT->nchan_out_woLFE = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS - 1; } +#ifndef FIX_785_REMOVE_DEAD_CODE else if ( ivas_format == SBA_FORMAT ) { hMCT->nchan_out_woLFE = ivas_sba_get_nchan( st_ivas->sba_analysis_order, st_ivas->hEncoderConfig->sba_planar ); } +#endif +#ifdef DEBUGGING else { assert( !"IVAS format currently not supported for MCT" ); } +#endif cp_bitrate = ivas_total_brate / hMCT->nchan_out_woLFE * CPE_CHANNELS; if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC ) @@ -463,10 +467,12 @@ ivas_error mct_enc_reconfigure( hMCT->nchan_out_woLFE += st_ivas->hEncoderConfig->nchan_ism; } } +#ifdef DEBUGGING else { assert( !"IVAS format currently not supported for MCT" ); } +#endif } cp_bitrate = ivas_total_brate / hMCT->nchan_out_woLFE * CPE_CHANNELS; -- GitLab