diff --git a/lib_com/options.h b/lib_com/options.h index a5b56970e7feb6857ac37b0c1e7aff972015bbbc..35ade8090194f229c5a7cbab2085da1f8731e42b 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -144,30 +144,16 @@ #define SBA_BR_SWITCHING /* Issue 114: Changes for SBA bit rate switching with reconfiguration for bitrates with same number of transport channels*/ #ifdef SBA_BR_SWITCHING #define SBA_BR_SWITCHING_RECONFIG /* Issue 114: Changes for SBA bitrate switching with reconfiguration for bitrates with different number of transport channels*/ -#define SBA_BR_SWITCHING_COMPLEXITY_FIX /* VA: fix complexity overhead */ #endif -#define FIX_I59_DELAY_ROUNDING /* Issue 59: rounding in sample domain instead of nanosec for IVAS_ENC_GetDelay() and IVAS_DEC_GetDelay() */ + #define FIX_FIX_I59 /* Issue 59: small fix concerning LFE delay rounding */ -#define FIX_245_RANGE_CODER_VOIP_MSAN /* Issue 245: fix use-of-uninitialized-value in range coder in VoIP mode */ -#define REND_CFG_LFE /* Issue 110: Configurable LFE handling for external renderer */ -#define FIX_235 /* Issue 235: Deallocation of HR filter memory separately for lib_rend (ROM) and lib_util (from file) */ -#define ENV_STAB_FIX /* Contribution 23: HQ envelope stability memory fix */ -#define STABILIZE_GIPD /* FhG: Contribution 22: gIPD stabilization */ -#define FIX_292_VBAP_CALLOC_REMOVAL /* Nokia: Fixes issue 292 by removing the remnant callocs */ -#define FIX_293_EXT_RENDERER_CLI /* FhG: Fix bugs in external renderer CLI */ -#define FIX_268 /* Issue 268: Add low cost dry-run of memory analysis */ #define HRTF_BINARY_FILE /* HRTF filters' binary file used for binaural rendering. */ -#define LOW_RATE_TRANS_FIX /* Eri: Fix for critical item during transitions */ #define FIX_197_CREND_INTERFACE -#define SET_TNS_FLAG_IN_EVERY_FRAME /* FhG: issue 288 - mismatch between encoder and decoder wrt TNS usage in unified stereo with frameloss */ #define FIX_FOR_TEST /* allows tests to pass using old TD binary file, to be removed after merge*/ -#define FIX_299_ISM_BWS /* VA: issue 299 - fix Band-width switching issues in ISM format */ -#define FIX_309_PREMPH_MEM_SCE /* FhG: issue 309 - fix overwriting of mem_preemph_enc in ivas preprocessing for SCE and tcxonly modes*/ - -#define FIX_317 /* FhG: issue 317 - address sanitizer error in MDCT-Stereo PLC */ #define FIX_301_PLC /* FhG: issue 301 - fix bug of missing update of overlap buffer for DFT-stereo PLC*/ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif diff --git a/lib_dec/core_dec_init.c b/lib_dec/core_dec_init.c index 511eedc53f17c9f3cb8b79e63767af38274aa2bb..6787968270787e0301314f5eb564ed8e1f3d273f 100644 --- a/lib_dec/core_dec_init.c +++ b/lib_dec/core_dec_init.c @@ -674,13 +674,11 @@ void open_decoder_LPD( st->last_tns_active = 0; st->second_last_tns_active = 0; st->second_last_core = -1; -#ifdef SET_TNS_FLAG_IN_EVERY_FRAME /* TODO: also apply for MCT modes, once issue #24 is solved */ if ( st->hTcxCfg != NULL && !MCT_flag && st->element_mode != EVS_MONO ) { st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( is_init ? total_brate : st->bits_frame_nominal * FRAMES_PER_SEC, st->igf, st->element_mode, st->mct_chan_mode ); } -#endif if ( hTcxDec != NULL ) { hTcxDec->tcxltp_second_last_pitch = st->old_fpitch; diff --git a/lib_dec/core_switching_dec.c b/lib_dec/core_switching_dec.c index 6ea717d07ea5543a3d8ef45b880bc8332c138d3b..c2a3955afba78484d27ac1a564e75a6a9f4d6113 100644 --- a/lib_dec/core_switching_dec.c +++ b/lib_dec/core_switching_dec.c @@ -1028,11 +1028,7 @@ void bandwidth_switching_detect( { st->bws_cnt1 = 0; } - else if ( st->total_brate > ACELP_9k60 && st->last_core_brate < ACELP_9k60 && st->bwidth == SWB && st->last_bwidth == WB -#ifdef FIX_299_ISM_BWS - && st->last_low_rate_mode == 0 -#endif - ) + else if ( st->total_brate > ACELP_9k60 && st->last_core_brate < ACELP_9k60 && st->bwidth == SWB && st->last_bwidth == WB && st->last_low_rate_mode == 0 ) { st->bws_cnt1++; } diff --git a/lib_dec/init_dec.c b/lib_dec/init_dec.c index 05183e12f587add5b95c0247abc4c56afbbc537c..a318d7e5604c2f79753ada3b1579fe2428eec3f1 100644 --- a/lib_dec/init_dec.c +++ b/lib_dec/init_dec.c @@ -107,9 +107,7 @@ ivas_error init_decoder( st->last_good = UNVOICED_CLAS; st->clas_dec = UNVOICED_CLAS; st->low_rate_mode = 0; -#ifdef FIX_299_ISM_BWS st->last_low_rate_mode = 0; -#endif st->lp_gainp = 0.0f; st->lp_gainc = 0.0f; diff --git a/lib_dec/ivas_stereo_mdct_stereo_dec.c b/lib_dec/ivas_stereo_mdct_stereo_dec.c index 963acdc16bfc0cdd65adb3f871b01ffcfe9af041..82cab39d4b21625e690da6bc177a48e2b9985c32 100644 --- a/lib_dec/ivas_stereo_mdct_stereo_dec.c +++ b/lib_dec/ivas_stereo_mdct_stereo_dec.c @@ -327,19 +327,11 @@ void stereo_decoder_tcx( hStereoMdct->reverse_dmx = 0; } -#ifdef FIX_317 if ( ( nrgRatio > 1.0f ) && ( k < ( ( core_r == TCX_10_CORE ) ? NB_DIV : 1 ) ) ) -#else - if ( ( nrgRatio > 1.0f ) && ( k < ( ( core_r == TCX_20_CORE ) ? 1 : NB_DIV ) ) ) -#endif { v_multc( spec_r[k], nrgRatio, spec_r[k], L_frameTCX_r ); } -#ifdef FIX_317 else if ( ( nrgRatio < 1.0f ) && ( k < ( ( core_l == TCX_10_CORE ) ? NB_DIV : 1 ) ) ) -#else - else if ( ( nrgRatio < 1.0f ) && ( k < ( ( core_l == TCX_20_CORE ) ? 1 : NB_DIV ) ) ) -#endif { v_multc( spec_l[k], 1.0f / nrgRatio, spec_l[k], L_frameTCX_l ); } diff --git a/lib_dec/ivas_tcx_core_dec.c b/lib_dec/ivas_tcx_core_dec.c index 2a6dcdf82e4cbc3a94dc69e15271aa47149f7c07..785e74cc7351e17aaecc31d4401cc47940b3e694 100644 --- a/lib_dec/ivas_tcx_core_dec.c +++ b/lib_dec/ivas_tcx_core_dec.c @@ -96,13 +96,11 @@ void stereo_tcx_init_dec( st->hTcxCfg->resq = getResq( st->bits_frame_nominal * FRAMES_PER_SEC ); hTcxDec->tcx_lpc_shaped_ari = getTcxLpcShapedAri( st->bits_frame_nominal * FRAMES_PER_SEC, st->rf_flag, st->element_mode ); st->igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->rf_flag, st->mct_chan_mode ); -#ifdef SET_TNS_FLAG_IN_EVERY_FRAME /* TODO: also apply for MCT modes, once issue #24 is solved */ if ( !MCT_flag && st->element_mode != EVS_MONO ) { st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( st->bits_frame_nominal * FRAMES_PER_SEC, st->igf, st->element_mode, st->mct_chan_mode ); } -#endif if ( hTcxLtpDec != NULL ) { hTcxLtpDec->tcxltp = getTcxLtp( st->sr_core ); diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index c14d3318a6fb5a752088100550a4033b73ce099e..038385033a08aeda287e805abad0b3572e62dfc1 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1180,11 +1180,7 @@ ivas_error IVAS_DEC_GetDelay( st_ivas = hIvasDec->st_ivas; hDecoderConfig = st_ivas->hDecoderConfig; -#ifdef FIX_I59_DELAY_ROUNDING *nSamples = (int16_t) roundf( (float) get_delay( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], st_ivas->binaural_latency_ns ) * hDecoderConfig->output_Fs / 1000000000.f ); -#else - *nSamples = NS2SA( hDecoderConfig->output_Fs, get_delay( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], st_ivas->binaural_latency_ns ) ); -#endif *timeScale = hDecoderConfig->output_Fs; diff --git a/lib_dec/stat_dec.h b/lib_dec/stat_dec.h index 8bd367814fd111d6366cc60b296599745adef528..68bbd4e9ca8acdf63054777ad087779f3461ee87 100644 --- a/lib_dec/stat_dec.h +++ b/lib_dec/stat_dec.h @@ -934,9 +934,7 @@ typedef struct Decoder_State int16_t ini_frame; /* initialization frames counter */ int16_t prev_coder_type; /* coding type of last frame */ int16_t low_rate_mode; /* low-rate mode flag */ -#ifdef FIX_299_ISM_BWS - int16_t last_low_rate_mode; /* previous frame low-rate mode flag */ -#endif + int16_t last_low_rate_mode; /* previous frame low-rate mode flag */ /*----------------------------------------------------------------------------------* * ACELP core parameters diff --git a/lib_enc/ivas_core_pre_proc.c b/lib_enc/ivas_core_pre_proc.c index 77b31fac1298c2ea36da31ae0bfb0aad03825e22..7a0d25ddfa4e2883fd7db7eb507d72b24123e064 100644 --- a/lib_enc/ivas_core_pre_proc.c +++ b/lib_enc/ivas_core_pre_proc.c @@ -660,9 +660,7 @@ ivas_error ivas_compute_core_buffers( *-----------------------------------------------------------------*/ if ( -#ifdef FIX_309_PREMPH_MEM_SCE st->tcxonly == 0 && -#endif !( ( element_mode == IVAS_CPE_TD && st->idchan == 1 ) || element_mode == IVAS_CPE_MDCT ) ) { st->mem_preemph_enc = new_inp_16k[L_frame_tmp - 1]; diff --git a/lib_enc/ivas_tcx_core_enc.c b/lib_enc/ivas_tcx_core_enc.c index cc05a70044b214ca4dcafa01cab92fd9102f9964..b11435e25b35644090fd77828b51c80b2198909f 100644 --- a/lib_enc/ivas_tcx_core_enc.c +++ b/lib_enc/ivas_tcx_core_enc.c @@ -100,12 +100,10 @@ void stereo_tcx_init_enc( st->hTcxCfg->resq = getResq( st->bits_frame_nominal * FRAMES_PER_SEC ); st->hTcxEnc->tcx_lpc_shaped_ari = getTcxLpcShapedAri( st->bits_frame_nominal * FRAMES_PER_SEC, st->rf_mode, st->element_mode ); st->igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->rf_mode, st->mct_chan_mode ); -#ifdef SET_TNS_FLAG_IN_EVERY_FRAME if ( st->element_mode != EVS_MONO ) { st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( st->bits_frame_nominal * FRAMES_PER_SEC, st->igf, st->element_mode, st->mct_chan_mode ); } -#endif st->core_brate = st->total_brate;