From ffdf787dcfe422c391d4809aa07336f65546d187 Mon Sep 17 00:00:00 2001 From: malenov Date: Thu, 14 Sep 2023 09:34:20 +0200 Subject: [PATCH 1/2] remove obsolete debugging macro DBG_STEREO_ICBWE2_TBE2K8 --- lib_com/options.h | 1 - lib_dec/ivas_decision_matrix_dec.c | 8 -------- lib_dec/ivas_stereo_icbwe_dec.c | 10 ---------- lib_enc/ivas_decision_matrix_enc.c | 8 -------- lib_enc/ivas_stereo_icbwe_enc.c | 10 ---------- 5 files changed, 37 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index a99a18570c..dd02c9ed57 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -88,7 +88,6 @@ /*#define DEBUG_STEREO_DFT_NOSTEREO*/ /* DFT stereo: by-pass stereo processing at encoder and decoder side*/ /*#define DEBUG_STEREO_DFT_NOQRES*/ /*#define DEBUG_STEREO_DFT_OUTRESPRED*/ /* output residual prediction signal instead of L/R*/ -/*#define DBG_STEREO_ICBWE2_TBE2K8*/ /* Enables TBE_2K8 for higher bitrates with ICBWE in operation for TD/DFT Stereo. Needs quality eval and currently only used for debugging purposes */ /*DirAC Debug switches*/ /*#define DEBUG_DISABLE_DIRAC_DELAY_COMP */ /* temporarily disable delay compensation on DirAC encoder */ diff --git a/lib_dec/ivas_decision_matrix_dec.c b/lib_dec/ivas_decision_matrix_dec.c index e5be65ae24..d238d43df7 100644 --- a/lib_dec/ivas_decision_matrix_dec.c +++ b/lib_dec/ivas_decision_matrix_dec.c @@ -271,11 +271,7 @@ void ivas_decision_matrix_dec( { st->extl = SWB_TBE; st->extl_brate = SWB_TBE_1k6; -#ifdef DBG_STEREO_ICBWE2_TBE2K8 - if ( st->total_brate >= MIN_BRATE_SWB_TBE_2k80 && st->flag_ACELP16k ) -#else if ( st->total_brate >= MIN_BRATE_SWB_TBE_2k80 && st->flag_ACELP16k && st->element_mode == IVAS_SCE ) -#endif { st->extl_brate = SWB_TBE_2k8; } @@ -314,11 +310,7 @@ void ivas_decision_matrix_dec( { st->extl = FB_TBE; st->extl_brate = FB_TBE_1k8; -#ifdef DBG_STEREO_ICBWE2_TBE2K8 - if ( st->total_brate >= MIN_BRATE_SWB_TBE_2k80 && st->flag_ACELP16k ) -#else if ( st->total_brate >= MIN_BRATE_SWB_TBE_2k80 && st->flag_ACELP16k && st->element_mode == IVAS_SCE ) -#endif { st->extl_brate = FB_TBE_3k0; } diff --git a/lib_dec/ivas_stereo_icbwe_dec.c b/lib_dec/ivas_stereo_icbwe_dec.c index 2be60ffcba..1da2cc3682 100644 --- a/lib_dec/ivas_stereo_icbwe_dec.c +++ b/lib_dec/ivas_stereo_icbwe_dec.c @@ -353,16 +353,6 @@ void stereo_icBWE_dec( /* LP synthesis */ mvr2r( hStereoICBWE->mem_syn_shb_nonref, shb_synth_nonref, L_SHB_LAHEAD ); syn_filt( hStereoICBWE->lpSHBRef, LPC_SHB_ORDER, excSHB_nonref, shb_synth_nonref + L_SHB_LAHEAD, L_FRAME16k, hStereoICBWE->mem_lpc_shbsynth_nonref, 1 ); -#ifdef DBG_STEREO_ICBWE2_TBE2K8 - /* Normalize the non-ref signal to the reference channel energy to compensate for the scaling shb_ener_sf */ - if ( st->extl_brate == SWB_TBE_2k8 || st->extl_brate == FB_TBE_3k0 ) - { - temp1 = sumAbs( hStereoICBWE->shbSynthRef, L_FRAME16k ); - temp2 = sumAbs( shb_synth_nonref + L_SHB_LAHEAD, L_FRAME16k ); - temp1 = ( temp2 > 0 ) ? ( temp1 / temp2 ) : ( 1.0f ); - v_multc( shb_synth_nonref + L_SHB_LAHEAD, temp1, shb_synth_nonref + L_SHB_LAHEAD, L_FRAME16k ); - } -#endif prev_pow = sum2_f( shb_synth_nonref, L_SHB_LAHEAD + 10 ); curr_pow = sum2_f( shb_synth_nonref + L_SHB_LAHEAD + 10, L_SHB_LAHEAD + 10 ); diff --git a/lib_enc/ivas_decision_matrix_enc.c b/lib_enc/ivas_decision_matrix_enc.c index 80ec66940e..bc9968dcb5 100644 --- a/lib_enc/ivas_decision_matrix_enc.c +++ b/lib_enc/ivas_decision_matrix_enc.c @@ -290,11 +290,7 @@ void ivas_decision_matrix_enc( st->extl = SWB_TBE; st->extl_brate = SWB_TBE_1k6; -#ifdef DBG_STEREO_ICBWE2_TBE2K8 - if ( st->total_brate >= MIN_BRATE_SWB_TBE_2k80 && st->flag_ACELP16k ) -#else if ( st->total_brate >= MIN_BRATE_SWB_TBE_2k80 && st->flag_ACELP16k && st->element_mode == IVAS_SCE ) -#endif { st->extl_brate = SWB_TBE_2k8; } @@ -319,11 +315,7 @@ void ivas_decision_matrix_enc( st->extl = FB_TBE; st->extl_brate = FB_TBE_1k8; -#ifdef DBG_STEREO_ICBWE2_TBE2K8 - if ( st->total_brate >= MIN_BRATE_SWB_TBE_2k80 && st->flag_ACELP16k ) -#else if ( st->total_brate >= MIN_BRATE_SWB_TBE_2k80 && st->flag_ACELP16k && st->element_mode == IVAS_SCE ) -#endif { st->extl_brate = FB_TBE_3k0; } diff --git a/lib_enc/ivas_stereo_icbwe_enc.c b/lib_enc/ivas_stereo_icbwe_enc.c index 84de217618..fee250951b 100644 --- a/lib_enc/ivas_stereo_icbwe_enc.c +++ b/lib_enc/ivas_stereo_icbwe_enc.c @@ -439,16 +439,6 @@ void stereo_icBWE_enc( /* LP synthesis */ syn_filt( hStereoICBWE->lpSHBRef, LPC_SHB_ORDER, excSHB_nonref, shb_synth_nonref, L_FRAME16k, hStereoICBWE->mem_lpc_shbsynth_nonref, 1 ); -#ifdef DBG_STEREO_ICBWE2_TBE2K8 - /* Normalize the non-ref signal to the reference channel energy to compensate for the scaling shb_ener_sf */ - if ( st->extl_brate == SWB_TBE_2k8 || st->extl_brate == FB_TBE_3k0 ) - { - temp1 = sumAbs( hStereoICBWE->shbSynthRef, L_FRAME16k ); - temp2 = sumAbs( shb_synth_nonref, L_FRAME16k ); - temp1 = ( temp2 > 0 ) ? ( temp1 / temp2 ) : ( 1.0f ); - v_multc( shb_synth_nonref, temp1, shb_synth_nonref, L_FRAME16k ); - } -#endif } else { -- GitLab From b8fdf4f5afe7bb8be21ac68061c9483a3718ce43 Mon Sep 17 00:00:00 2001 From: malenov Date: Thu, 14 Sep 2023 09:43:52 +0200 Subject: [PATCH 2/2] remove also QC_DBG_DFT_NO_SHIFT_DEC --- lib_dec/ivas_stereo_ica_dec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib_dec/ivas_stereo_ica_dec.c b/lib_dec/ivas_stereo_ica_dec.c index e5c6c00b0a..b400dee72c 100644 --- a/lib_dec/ivas_stereo_ica_dec.c +++ b/lib_dec/ivas_stereo_ica_dec.c @@ -126,9 +126,6 @@ void stereo_tca_dec( if ( hCPE->element_mode == IVAS_CPE_DFT ) { hStereoTCA->corrLagStats = (int16_t) fabsf( hCPE->hStereoDft->itd[1] ); -#ifdef QC_DBG_DFT_NO_SHIFT_DEC - hStereoTCA->corrLagStats = 0; -#endif hStereoTCA->refChanIndx = ( hCPE->hStereoDft->itd[1] >= 0 ) ? ( L_CH_INDX ) : ( R_CH_INDX ); } else if ( hCPE->element_mode == IVAS_CPE_MDCT ) -- GitLab