diff --git a/lib_com/calc_st_com.c b/lib_com/calc_st_com.c index 62e0e808047eb5d099dca3b3b51ebf2bb438fb41..8440eb8079bf1c173ab7659deb2da0b7d4997940 100644 --- a/lib_com/calc_st_com.c +++ b/lib_com/calc_st_com.c @@ -292,27 +292,15 @@ void scale_st( void blend_subfr2( float *sigIn1, float *sigIn2, -#ifdef FIX_FLOAT_1533_BLEND_SUBFR2 int16_t L_subfr, -#endif float *sigOut ) { -#ifdef FIX_FLOAT_1533_BLEND_SUBFR2 float fac1 = 1.f - ( 1.f / L_subfr ); float fac2 = 0.f + ( 1.f / L_subfr ); float step = 1.f / ( L_subfr / 2 ); -#else - float fac1 = 1.f - ( 1.f / L_SUBFR ); - float fac2 = 0.f + ( 1.f / L_SUBFR ); - float step = 1.f / ( L_SUBFR / 2 ); -#endif int16_t i; -#ifdef FIX_FLOAT_1533_BLEND_SUBFR2 for ( i = 0; i < L_subfr / 2; i++ ) -#else - for ( i = 0; i < L_SUBFR / 2; i++ ) -#endif { sigOut[i] = fac1 * sigIn1[i] + fac2 * sigIn2[i]; fac1 -= step; diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 31601d7f30d08a336c05b11be41de8054b7372f0..3201fd15bdb53daef1a7643fb2d9a0f98dbe5814 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -1111,17 +1111,9 @@ ivas_error ivas_param_ism_dec_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK void ivas_param_ism_dec_close( PARAM_ISM_DEC_HANDLE *hParamIsmDec /* i/o: decoder ParamISM handle */ ); -#else -void ivas_param_ism_dec_close( - PARAM_ISM_DEC_HANDLE *hParamIsmDec, /* i/o: decoder ParamISM handle */ - SPAT_PARAM_REND_COMMON_DATA_HANDLE *hSpatParamRendCom_out, /* i/o: common spatial renderer data */ - const AUDIO_CONFIG output_config /* i : output audio configuration */ -); -#endif void ivas_ism_dec_digest_tc( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ diff --git a/lib_com/options.h b/lib_com/options.h index b8869c96e6b02e658ba2e3ccd652a464d0fa67b3..13a0c786d3b9024c0eab4248878420b63eb996ce 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -161,10 +161,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ -#define FIX_2235_TD_RENDERER_WORD16 /* Eri: For float: small synch with BASOP, removing unnecessary abs. BASOP: Use Word16 in TD renderer without converting to Word32 */ -#define FIX_FLOAT_1526_DIRAC_MEM_LEAK /* FhG: potential memory leak in DirAC handles in case of format switching */ -#define ALIGN_ACELP_CORE /* VA: align ACELP core functions with BASOP */ -#define FIX_1532_MSAN_ERR_AMR_FIRST_FRAME_IS_SID /* FhG: fix msan complaint in AMR-WB when first frame is an SID */ #define FIX_FLOAT_1535_ARI_RES_Q_CLEANUP /* FhG: remove dead code from tcx_ari_res_Q_spec() */ /* #################### End BE switches ################################## */ @@ -173,11 +169,6 @@ /* any switch which is non-be wrt. TS 26.258 V3.0 */ #define FIX_FLOAT_1493_MASA_ENCODE_STABILITY_IMPROVE /* Nokia: float issue 1493: Improves float decision stability in MASA encoding by adjusting reduction code */ -#define FIX_2432_ISM_SPIKES_16KHZ /* VA: basop issue 2432: fix spikes in ISM decoding at 16kHz output sampling rate */ -#define FIX_FLOAT_1518 /* FhG: fix issue 1518: loudness differences in OSBA decoding to mono or stereo output */ -#define FIX_FLOAT_1533_BLEND_SUBFR2 /* FhG: float issue 1533: correct blending in blend_subfr2() */ - -#define FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning /* FhG: Adjust non-diegetic panning law to harmonize codec levels with 3GPP reference software */ /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ diff --git a/lib_com/prot.h b/lib_com/prot.h index dd3a1c48f4ac6725b0f2ac5c1e87df2985ae93aa..309fc560c0dc2ada8d61befa0268206286b6af18 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -2334,11 +2334,8 @@ void MDCT_classifier_reset( ); ivas_error acelp_core_enc( - Encoder_State *st, /* i/o: encoder state structure */ - const float inp[], /* i : input signal of the current frame */ -#ifndef ALIGN_ACELP_CORE - const float ener, /* i : residual energy from Levinson-Durbin */ -#endif + Encoder_State *st, /* i/o: encoder state structure */ + const float inp[], /* i : input signal of the current frame */ float A[NB_SUBFR16k * ( M + 1 )], /* i : A(z) unquantized for the 4 subframes */ float Aw[NB_SUBFR16k * ( M + 1 )], /* i : weighted A(z) unquant. for subframes */ const float epsP[M + 1], /* i : LP prediction errors */ @@ -3028,12 +3025,9 @@ void analy_sp( ); void CNG_enc( - Encoder_State *st, /* i/o: State structure */ - float Aq[], /* o : LP coefficients */ - const float *speech, /* i : pointer to current frame input speech buffer */ -#ifndef ALIGN_ACELP_CORE - float enr, /* i : frame energy output from Levinson recursion */ -#endif + Encoder_State *st, /* i/o: State structure */ + float Aq[], /* o : LP coefficients */ + const float *speech, /* i : pointer to current frame input speech buffer */ const float *lsp_mid, /* i : mid frame LSPs */ float *lsp_new, /* i/o: current frame LSPs */ float *lsf_new, /* i/o: current frame LSFs */ @@ -10043,12 +10037,10 @@ int16_t tbe_celp_exc_offset( ); void blend_subfr2( - float *sigIn1, /* i : input signal for fade-out */ - float *sigIn2, /* i : input signal for fade-in */ -#ifdef FIX_FLOAT_1533_BLEND_SUBFR2 + float *sigIn1, /* i : input signal for fade-out */ + float *sigIn2, /* i : input signal for fade-in */ int16_t L_subfr, /* i : subframe length */ -#endif - float *sigOut /* o : output signal */ + float *sigOut /* o : output signal */ ); void init_tcx_window_cfg( diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index a952efd5d224a59c0708559b2536686bfae5ccf2..23b1b898c42f3223a0d1a5a6a062730ede8656b2 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -1091,11 +1091,7 @@ ivas_error acelp_core_dec( syn_filt( Aq, M, temp_buf + M + L_SUBFR, temp_buf, L_SUBFR, st->hPFstat->mem_stp + L_SYN_MEM - M, 0 ); scale_st( syn, temp_buf, &st->hPFstat->gain_prec, L_SUBFR, -1 ); mvr2r( temp_buf, syn, L_SUBFR / 2 ); -#ifdef FIX_FLOAT_1533_BLEND_SUBFR2 blend_subfr2( temp_buf + L_SUBFR / 2, syn + L_SUBFR / 2, L_SUBFR, syn + L_SUBFR / 2 ); -#else - blend_subfr2( temp_buf + L_SUBFR / 2, syn + L_SUBFR / 2, syn + L_SUBFR / 2 ); -#endif } st->hPFstat->on = 0; } diff --git a/lib_dec/acelp_core_switch_dec.c b/lib_dec/acelp_core_switch_dec.c index d40d7def7cb48e0ea821987399d192c6c2fda098..444b1f1323bd929b4c9a519080008fe99fb5c337 100644 --- a/lib_dec/acelp_core_switch_dec.c +++ b/lib_dec/acelp_core_switch_dec.c @@ -201,11 +201,7 @@ ivas_error acelp_core_switch_dec( syn_filt( Aq, M, old_exc, bpf_error_signal, L_SUBFR, st->hPFstat->mem_stp + L_SYN_MEM - M, 0 ); scale_st( synth_intFreq, bpf_error_signal, &st->hPFstat->gain_prec, L_SUBFR, -1 ); mvr2r( bpf_error_signal, synth_intFreq, L_SUBFR / 2 ); -#ifdef FIX_FLOAT_1533_BLEND_SUBFR2 blend_subfr2( bpf_error_signal + L_SUBFR / 2, synth_intFreq + L_SUBFR / 2, L_SUBFR, synth_intFreq + L_SUBFR / 2 ); -#else - blend_subfr2( bpf_error_signal + L_SUBFR / 2, synth_intFreq + L_SUBFR / 2, synth_intFreq + L_SUBFR / 2 ); -#endif } st->hPFstat->on = 0; diff --git a/lib_dec/hf_synth.c b/lib_dec/hf_synth.c index 9b4276ad950deca34d44fa599b227770d7d60bbc..3478aa0e89742d9c5d23ad368485248d3c91cec1 100644 --- a/lib_dec/hf_synth.c +++ b/lib_dec/hf_synth.c @@ -441,7 +441,6 @@ void hf_synth_amr_wb( HF_corr_gain[i] = 2 * HP_gain[hf_gain[i]]; } } -#ifdef FIX_1532_MSAN_ERR_AMR_FIRST_FRAME_IS_SID else { /* Initialize to fix clang-18 sanitizer complaint */ @@ -450,7 +449,6 @@ void hf_synth_amr_wb( HF_corr_gain[i] = 1.0f; } } -#endif /* inverse DCT transform of HF excitation */ set_f( exc16k, 0.0f, L_FRAME16k ); diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index fd9ae141e5d6a7e5afdabe9d5d70f236c4d35527..00f64436038f9f91207f762c50054ec13abbeb91 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -76,11 +76,7 @@ ivas_error ivas_core_dec( float tmp_buffer[L_FRAME48k]; int16_t tmps, incr; float *bwe_exc_extended[CPE_CHANNELS] = { NULL, NULL }; -#ifdef FIX_2432_ISM_SPIKES_16KHZ int16_t flag_bwe_bws, flag_swb_tbe; -#else - int16_t flag_bwe_bws; -#endif float voice_factors[CPE_CHANNELS][NB_SUBFR16k]; int16_t core_switching_flag[CPE_CHANNELS]; float old_syn_12k8_16k[CPE_CHANNELS][L_FRAME16k]; @@ -517,16 +513,10 @@ ivas_error ivas_core_dec( * SWB(FB) BWE decoding *---------------------------------------------------------------------*/ -#ifdef FIX_2432_ISM_SPIKES_16KHZ flag_swb_tbe = ( st->extl == SWB_TBE || st->extl == FB_TBE || ( st->coder_type != AUDIO && st->coder_type != INACTIVE && st->core_brate >= SID_2k40 && st->core == ACELP_CORE && !st->con_tcx && output_Fs >= 32000 && st->bwidth > NB && st->bws_cnt > 0 ) ); -#endif flag_bwe_bws = ( output_Fs >= 32000 && st->core == ACELP_CORE && st->bwidth > NB && st->bws_cnt > 0 && st->bfi == 0 ); -#ifdef FIX_2432_ISM_SPIKES_16KHZ if ( flag_swb_tbe ) -#else - if ( st->extl == SWB_TBE || st->extl == FB_TBE || ( st->coder_type != AUDIO && st->coder_type != INACTIVE && st->core_brate >= SID_2k40 && st->core == ACELP_CORE && !st->con_tcx && output_Fs >= 32000 && st->bwidth > NB && st->bws_cnt > 0 ) ) -#endif { /* SWB TBE decoder */ swb_tbe_dec( st, hStereoICBWE, bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], tmp_buffer /*fb_exc*/, hb_synth[n], pitch_buf[n] ); @@ -543,12 +533,8 @@ ivas_error ivas_core_dec( swb_bwe_dec( st, output[n], synth[n], hb_synth[n], use_cldfb_for_dft, output_frame ); } -#ifdef FIX_2432_ISM_SPIKES_16KHZ /* set hb_synth[n] buffer to zeros in case of no BWE decoding */ if ( ( st->core == ACELP_CORE && ( st->extl == -1 || st->extl == SWB_CNG || ( st->extl == WB_BWE && st->bws_cnt > 0 && flag_swb_tbe == 0 ) ) ) && flag_bwe_bws == 0 ) -#else - if ( ( st->core == ACELP_CORE && ( st->extl == -1 || st->extl == SWB_CNG ) ) && flag_bwe_bws == 0 ) -#endif { set_f( hb_synth[n], 0.0f, L_FRAME48k ); } diff --git a/lib_dec/ivas_cpe_dec.c b/lib_dec/ivas_cpe_dec.c index 231b1ed866a570dde1f3779ae2d7c893865dd8fa..b08b8b9ee48218104038c345fa7fc725ce09bfa7 100644 --- a/lib_dec/ivas_cpe_dec.c +++ b/lib_dec/ivas_cpe_dec.c @@ -500,14 +500,10 @@ ivas_error ivas_cpe_dec( if ( hCPE->element_mode == IVAS_CPE_MDCT && hCPE->nchan_out == 1 && ( is_DTXrate( ivas_total_brate ) == 0 || ( is_DTXrate( ivas_total_brate ) == 1 && is_DTXrate( st_ivas->hDecoderConfig->last_ivas_total_brate ) == 0 ) ) ) { -#ifdef FIX_FLOAT_1518 if ( !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_NONE ) ) { -#endif applyDmxMdctStereo( hCPE, output, output_frame ); -#ifdef FIX_FLOAT_1518 } -#endif } #ifndef DEBUG_STEREO_DFT_OUTRESPRED diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index f47dfb6118d4ac2201282414f56fbe0148ff0284..b99c5f70d6afd5496efc3626f134b70b56630aca 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -443,12 +443,10 @@ ivas_error ivas_dec( ivas_sba_dirac_stereo_dec( st_ivas, &p_output[sba_ch_idx], output_frame ); } -#ifdef FIX_FLOAT_1518 else if ( st_ivas->hDecoderConfig->nchan_out == 1 && st_ivas->ism_mode == ISM_MODE_NONE ) { v_multc( p_output[0], 2.0f, p_output[0], output_frame ); } -#endif /* HP filtering */ for ( n = 0; n < getNumChanSynthesis( st_ivas ); n++ ) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 2930e86e37d0206156d3e597232198f82db38501..b16a3160419d38c48b3543873cb459e3c23f222c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2885,7 +2885,6 @@ void ivas_destroy_dec( /* ISM renderer handle */ ivas_ism_renderer_close( &( st_ivas->hIsmRendererData ) ); -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK /* ParamISM dec handle */ ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ) ); @@ -2893,19 +2892,6 @@ void ivas_destroy_dec( ivas_dirac_rend_close( &( st_ivas->hDirACRend ) ); ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) ); ivas_dirac_dec_close( &( st_ivas->hDirAC ) ); -#else - /* DirAC handle */ - if ( st_ivas->ivas_format == ISM_FORMAT ) - { - ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ), &( st_ivas->hSpatParamRendCom ), st_ivas->hDecoderConfig->output_config ); - } - else - { - ivas_dirac_rend_close( &( st_ivas->hDirACRend ) ); - ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) ); - ivas_dirac_dec_close( &( st_ivas->hDirAC ) ); - } -#endif /* SPAR handle */ ivas_spar_dec_close( &( st_ivas->hSpar ), st_ivas->hDecoderConfig->output_Fs, 0 ); diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 3c1f842d41a6f6d99faf9f701a3f28c99891d614..18e8d04ff41b1248d51fd7d4dfdb9c8d1c8baa53 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -154,13 +154,9 @@ static ivas_error ivas_ism_bitrate_switching_dec( if ( st_ivas->ism_mode == ISM_MODE_DISC && last_ism_mode == ISM_MODE_PARAM ) { /* Deallocate the ParamISM struct */ -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ) ); ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) ); -#else - ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ), &( st_ivas->hSpatParamRendCom ), st_ivas->hDecoderConfig->output_config ); -#endif if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index e5c83b5b64e33f8f2d8aa3ec82931d279c1c4454..abc05ccb51bbeea1d366120a8d0b953384ca0c4d 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -430,18 +430,15 @@ ivas_error ivas_param_ism_dec_open( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ParamISM\n" ) ); } -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK /* initialize sub-handles with NULL */ hParamIsmDec->hParamIsm = NULL; hParamIsmDec->hParamIsmRendering = NULL; -#endif if ( ( hSpatParamRendCom = (SPAT_PARAM_REND_COMMON_DATA_HANDLE) malloc( sizeof( SPAT_PARAM_REND_COMMON_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); } -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK /* initialize buffers in handle with NULL - this handle is also used by other DirAC technologies, and not every technology is initializing all buffers */ hSpatParamRendCom->azimuth = NULL; hSpatParamRendCom->elevation = NULL; @@ -453,7 +450,6 @@ ivas_error ivas_param_ism_dec_open( hSpatParamRendCom->spreadCoherence = NULL; hSpatParamRendCom->spreadCoherence2 = NULL; hSpatParamRendCom->surroundingCoherence = NULL; -#endif /* Assign memory to Param Object handle */ if ( ( hParamIsmDec->hParamIsm = (PARAM_ISM_CONFIG_HANDLE) malloc( sizeof( PARAM_ISM_CONFIG_DATA ) ) ) == NULL ) @@ -461,23 +457,19 @@ ivas_error ivas_param_ism_dec_open( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ParamISM\n" ) ); } -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK /* initialize sub-handles with NULL */ hParamIsmDec->hParamIsm->hFbMixer = NULL; -#endif if ( ( hParamIsmDec->hParamIsmRendering = (PARAM_ISM_RENDERING_HANDLE) malloc( sizeof( PARAM_ISM_RENDERING_DATA ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ParamISM Rendering handle\n" ) ); } -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK /* initialize sub-handles/buffers with NULL */ hParamIsmDec->hParamIsmRendering->proto_matrix = NULL; hParamIsmDec->hParamIsmRendering->interpolator = NULL; hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL; hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL; -#endif output_Fs = st_ivas->hDecoderConfig->output_Fs; output_config = st_ivas->hDecoderConfig->output_config; @@ -650,17 +642,9 @@ ivas_error ivas_param_ism_dec_open( * Close Param ISM handle *-------------------------------------------------------------------------*/ -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK void ivas_param_ism_dec_close( PARAM_ISM_DEC_HANDLE *hParamIsmDec_out /* i/o: decoder DirAC handle */ ) -#else -void ivas_param_ism_dec_close( - PARAM_ISM_DEC_HANDLE *hParamIsmDec_out, /* i/o: decoder DirAC handle */ - SPAT_PARAM_REND_COMMON_DATA_HANDLE *hSpatParamRendCom_out, /* i/o: common spatial renderer data */ - AUDIO_CONFIG output_config /* i : output audio configuration */ -) -#endif { if ( hParamIsmDec_out != NULL && *hParamIsmDec_out != NULL ) { @@ -674,24 +658,17 @@ void ivas_param_ism_dec_close( hParamIsmDec->hParamIsm = NULL; } -#ifndef FIX_FLOAT_1526_DIRAC_MEM_LEAK - if ( !( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) ) + /* Param ISM Rendering */ + if ( hParamIsmDec->hParamIsmRendering->interpolator != NULL ) { -#endif - /* Param ISM Rendering */ - if ( hParamIsmDec->hParamIsmRendering->interpolator != NULL ) - { - free( hParamIsmDec->hParamIsmRendering->interpolator ); - hParamIsmDec->hParamIsmRendering->interpolator = NULL; - } - if ( hParamIsmDec->hParamIsmRendering->proto_matrix != NULL ) - { - free( hParamIsmDec->hParamIsmRendering->proto_matrix ); - hParamIsmDec->hParamIsmRendering->proto_matrix = NULL; - } -#ifndef FIX_FLOAT_1526_DIRAC_MEM_LEAK + free( hParamIsmDec->hParamIsmRendering->interpolator ); + hParamIsmDec->hParamIsmRendering->interpolator = NULL; + } + if ( hParamIsmDec->hParamIsmRendering->proto_matrix != NULL ) + { + free( hParamIsmDec->hParamIsmRendering->proto_matrix ); + hParamIsmDec->hParamIsmRendering->proto_matrix = NULL; } -#endif if ( hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc != NULL ) { @@ -714,19 +691,6 @@ void ivas_param_ism_dec_close( *hParamIsmDec_out = NULL; } -#ifndef FIX_FLOAT_1526_DIRAC_MEM_LEAK - if ( hSpatParamRendCom_out != NULL && *hSpatParamRendCom_out != NULL ) - { - if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) - { - ivas_dirac_deallocate_parameters( *hSpatParamRendCom_out, 1 ); - ivas_dirac_deallocate_parameters( *hSpatParamRendCom_out, 2 ); - } - - free( *hSpatParamRendCom_out ); - *hSpatParamRendCom_out = NULL; - } -#endif return; } diff --git a/lib_dec/ivas_mono_dmx_renderer.c b/lib_dec/ivas_mono_dmx_renderer.c index 0ca83dfa6728147f91528ef9114bdad8a7d01aa7..73d8ce2e2c975cc5520bda23afc5c90bd0a6b722 100644 --- a/lib_dec/ivas_mono_dmx_renderer.c +++ b/lib_dec/ivas_mono_dmx_renderer.c @@ -229,14 +229,9 @@ void ivas_apply_non_diegetic_panning( { float pan_left, pan_right; -#ifdef FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning float pan = ( non_diegetic_pan_gain + 1.f ) * 0.5f; pan_left = sinf( pan * EVS_PI * 0.5f ); pan_right = cosf( pan * EVS_PI * 0.5f ); -#else - pan_left = ( non_diegetic_pan_gain + 1.f ) * 0.5f; - pan_right = 1.f - pan_left; -#endif v_multc( input_f, pan_right, output_f[1], output_frame ); v_multc( input_f, pan_left, output_f[0], output_frame ); diff --git a/lib_dec/ivas_sba_dirac_stereo_dec.c b/lib_dec/ivas_sba_dirac_stereo_dec.c index ea3355769d01eefa04e51aa8886f802519616c40..e074d13f7e8756427e3e6d8c6ab2e3a070e8c437 100644 --- a/lib_dec/ivas_sba_dirac_stereo_dec.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec.c @@ -910,11 +910,7 @@ void ivas_sba_dirac_stereo_dec( synchro_synthesis( st_ivas->hDecoderConfig->ivas_total_brate, hCPE, output, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/ ); /* output scaling */ -#ifdef FIX_FLOAT_1518 if ( !sba_mono_flag && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_NONE ) ) -#else - if ( !sba_mono_flag ) -#endif { v_multc( output[0], 0.5f, output[0], output_frame ); v_multc( output[1], 0.5f, output[1], output_frame ); diff --git a/lib_dec/ivas_stereo_mdct_core_dec.c b/lib_dec/ivas_stereo_mdct_core_dec.c index 4ba86bc7bd2d14c2a6adfb1871bd4e6a840c92d5..e96fc3e58c7ce991d20d0cf03282a03da784f504 100644 --- a/lib_dec/ivas_stereo_mdct_core_dec.c +++ b/lib_dec/ivas_stereo_mdct_core_dec.c @@ -349,11 +349,7 @@ void stereo_mdct_core_dec( run_min_stats( sts, x ); -#ifdef FIX_FLOAT_1518 if ( hCPE->nchan_out == 1 && ( !bfi || ( bfi && sts[0]->core != ACELP_CORE && sts[1]->core != ACELP_CORE ) ) && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_NONE ) ) -#else - if ( hCPE->nchan_out == 1 && ( !bfi || ( bfi && sts[0]->core != ACELP_CORE && sts[1]->core != ACELP_CORE ) ) ) -#endif { apply_dmx_weights( hCPE, x, sts[0]->transform_type, sts[1]->transform_type ); } diff --git a/lib_dec/post_dec.c b/lib_dec/post_dec.c index 35d8dae700d472164487cf0ed5541a5a05aa5caa..4871a1439522f5980294052e1bd35f563959abf9 100644 --- a/lib_dec/post_dec.c +++ b/lib_dec/post_dec.c @@ -109,7 +109,6 @@ void post_decoder( residu( A, M, synth, synth_buf, L_subfr ); syn_filt( A, M, synth_buf, synth2, L_subfr, st->hPFstat->mem_stp + L_SYN_MEM - M, 0 ); scale_st( synth, synth2, &st->hPFstat->gain_prec, L_subfr, -1 ); -#ifdef FIX_FLOAT_1533_BLEND_SUBFR2 if ( st->element_mode == EVS_MONO ) { blend_subfr2( synth2 + L_subfr / 2, synth + L_subfr / 2, L_SUBFR, synth2 + L_subfr / 2 ); @@ -118,9 +117,6 @@ void post_decoder( { blend_subfr2( synth2 + L_subfr / 2, synth + L_subfr / 2, L_subfr, synth2 + L_subfr / 2 ); } -#else - blend_subfr2( synth2 + L_subfr / 2, synth + L_subfr / 2, synth2 + L_subfr / 2 ); -#endif } } else diff --git a/lib_enc/acelp_core_enc.c b/lib_enc/acelp_core_enc.c index e51121e93392a3664007e6e3f38f7c217c7cbd43..7c3f48f9f3b6faae1d5296c9c0a0f13a0df5f59a 100644 --- a/lib_enc/acelp_core_enc.c +++ b/lib_enc/acelp_core_enc.c @@ -57,11 +57,8 @@ *--------------------------------------------------------------------*/ ivas_error acelp_core_enc( - Encoder_State *st, /* i/o: encoder state structure */ - const float inp[], /* i : input signal of the current frame */ -#ifndef ALIGN_ACELP_CORE - const float ener, /* i : residual energy from Levinson-Durbin*/ -#endif + Encoder_State *st, /* i/o: encoder state structure */ + const float inp[], /* i : input signal of the current frame */ float A[NB_SUBFR16k * ( M + 1 )], /* i : A(z) unquantized for the 4 subframes*/ float Aw[NB_SUBFR16k * ( M + 1 )], /* i : weighted A(z) unquant. for subframes*/ const float epsP[M + 1], /* i : LP prediction errors */ @@ -296,11 +293,7 @@ ivas_error acelp_core_enc( cng_params_postupd( st->hTdCngEnc->ho_circ_ptr, &st->hTdCngEnc->cng_buf_cnt, st->hTdCngEnc->cng_exc2_buf, st->hTdCngEnc->cng_brate_buf, st->hTdCngEnc->ho_env_circ, st->element_mode, st->hFdCngEnc->hFdCngCom->CngBandwidth ); /* encode CNG parameters */ -#ifdef ALIGN_ACELP_CORE CNG_enc( st, Aq, inp, lsp_mid, lsp_new, lsf_new, &allow_cn_step, q_env, &sid_bw ); -#else - CNG_enc( st, Aq, inp, ener, lsp_mid, lsp_new, lsf_new, &allow_cn_step, q_env, &sid_bw ); -#endif /* comfort noise generation */ CNG_exc( st->core_brate, st->L_frame, &st->hTdCngEnc->Enew, &st->hTdCngEnc->cng_seed, exc, exc2, &st->hTdCngEnc->lp_ener, st->last_core_brate, &st->hDtxEnc->first_CNG, &st->hTdCngEnc->cng_ener_seed, bwe_exc, allow_cn_step, &st->hTdCngEnc->last_allow_cn_step, st->hTdCngEnc->num_ho, q_env, st->hTdCngEnc->lp_env, st->hTdCngEnc->old_env, st->hTdCngEnc->exc_mem, st->hTdCngEnc->exc_mem1, &sid_bw, &st->hTdCngEnc->cng_ener_seed1, exc3, st->Opt_AMR_WB, EVS_MONO ); diff --git a/lib_enc/amr_wb_enc.c b/lib_enc/amr_wb_enc.c index 7a505bfaf7ac7d36a4d4cd0482469c409d0e97c7..017b2cf13ad15c8dd768cda902eaea1734da014a 100644 --- a/lib_enc/amr_wb_enc.c +++ b/lib_enc/amr_wb_enc.c @@ -410,11 +410,7 @@ void amr_wb_enc( if ( st->core_brate == SID_1k75 || st->core_brate == FRAME_NO_DATA ) { /* encode CNG parameters */ -#ifdef ALIGN_ACELP_CORE CNG_enc( st, Aq, inp, isp_new, isp_new, isf_new, &allow_cn_step, q_env, &sid_bw ); -#else - CNG_enc( st, Aq, inp, ener, isp_new, isp_new, isf_new, &allow_cn_step, q_env, &sid_bw ); -#endif /* comfort noise generation */ CNG_exc( st->core_brate, L_FRAME, &st->hTdCngEnc->Enew, &st->hTdCngEnc->cng_seed, exc, exc2, &st->hTdCngEnc->lp_ener, st->last_core_brate, &st->hDtxEnc->first_CNG, &st->hTdCngEnc->cng_ener_seed, dummy_buf, allow_cn_step, &st->hTdCngEnc->last_allow_cn_step, st->hTdCngEnc->num_ho, q_env, st->hTdCngEnc->lp_env, st->hTdCngEnc->old_env, st->hTdCngEnc->exc_mem, st->hTdCngEnc->exc_mem1, &sid_bw, &st->hTdCngEnc->cng_ener_seed1, exc3, st->Opt_AMR_WB, EVS_MONO ); diff --git a/lib_enc/cng_enc.c b/lib_enc/cng_enc.c index 3de8fa7869e799745ee4a76a287413db69444bea..ded92009218e2c11912b9718b79a1ccaa0c8805d 100644 --- a/lib_enc/cng_enc.c +++ b/lib_enc/cng_enc.c @@ -69,12 +69,9 @@ static void shb_CNG_encod( Encoder_State *st, const int16_t update ); *---------------------------------------------------------------------*/ void CNG_enc( - Encoder_State *st, /* i/o: State structure */ - float Aq[], /* o : LP coefficients */ - const float *speech, /* i : pointer to current frame input speech buffer */ -#ifndef ALIGN_ACELP_CORE - float enr, /* i : residual energy from Levinson-Durbin */ -#endif + Encoder_State *st, /* i/o: State structure */ + float Aq[], /* o : LP coefficients */ + const float *speech, /* i : pointer to current frame input speech buffer */ const float *lsp_mid, /* i : mid frame LSPs */ float *lsp_new, /* i/o: current frame ISPs */ float *lsf_new, /* i/o: current frame ISFs */ @@ -115,9 +112,7 @@ void CNG_enc( int16_t force_cn_step = 0; float st_lp_sp_enr; float lp_ener_thr_scale; -#ifdef ALIGN_ACELP_CORE float enr; -#endif BSTR_ENC_HANDLE hBstr = st->hBstr; TD_CNG_ENC_HANDLE hTdCngEnc = st->hTdCngEnc; diff --git a/lib_enc/evs_enc.c b/lib_enc/evs_enc.c index f7bf386f336f622802f8267b90ba4a79a0bfffa9..7a3bb4b43774d04f665898e59b9bb0c3e0a20871 100644 --- a/lib_enc/evs_enc.c +++ b/lib_enc/evs_enc.c @@ -242,11 +242,7 @@ ivas_error evs_enc( if ( st->core == ACELP_CORE ) { -#ifdef ALIGN_ACELP_CORE if ( ( error = acelp_core_enc( st, inp, A, Aw, epsP, lsp_new, lsp_mid, vad_hover_flag, attack_flag, bwe_exc_extended, voice_factors, old_syn_12k8_16k, pitch_buf, &unbits, NULL, NULL ) ) != IVAS_ERR_OK ) -#else - if ( ( error = acelp_core_enc( st, inp, ener, A, Aw, epsP, lsp_new, lsp_mid, vad_hover_flag, attack_flag, bwe_exc_extended, voice_factors, old_syn_12k8_16k, pitch_buf, &unbits, NULL, NULL ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_enc/ivas_core_enc.c b/lib_enc/ivas_core_enc.c index abd0e6a1746c5d10cce14476128885ea9a2b4eb7..c58eeb4e859358b37739332d1dcf4ba1ca6a7dbe 100644 --- a/lib_enc/ivas_core_enc.c +++ b/lib_enc/ivas_core_enc.c @@ -239,11 +239,7 @@ ivas_error ivas_core_enc( if ( st->core == ACELP_CORE ) { /* ACELP core encoder */ -#ifdef ALIGN_ACELP_CORE if ( ( error = acelp_core_enc( st, inp[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], vad_hover_flag[0], attack_flag[n], bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], pitch_buf[n], &unbits[n], hStereoTD, tdm_lsfQ_PCh ) ) != IVAS_ERR_OK ) -#else - if ( ( error = acelp_core_enc( st, inp[n], ener[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], vad_hover_flag[0], attack_flag[n], bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], pitch_buf[n], &unbits[n], hStereoTD, tdm_lsfQ_PCh ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_rend/ivas_dirac_rend.c b/lib_rend/ivas_dirac_rend.c index 2c924011848d6634477543b45f872f5b1efe253a..b56fe1ac0c6dbc7ac5bee5ae3292ad23a5469d6f 100644 --- a/lib_rend/ivas_dirac_rend.c +++ b/lib_rend/ivas_dirac_rend.c @@ -225,7 +225,6 @@ ivas_error ivas_spat_hSpatParamRendCom_config( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC meta\n" ) ); } -#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK /* initialize buffers in handle with NULL - this handle is also used by other DirAC technologies, and not every technology is initializing all buffers */ hSpatParamRendCom->azimuth = NULL; hSpatParamRendCom->elevation = NULL; @@ -237,7 +236,6 @@ ivas_error ivas_spat_hSpatParamRendCom_config( hSpatParamRendCom->spreadCoherence = NULL; hSpatParamRendCom->spreadCoherence2 = NULL; hSpatParamRendCom->surroundingCoherence = NULL; -#endif *hSpatParamRendCom_out = hSpatParamRendCom; } diff --git a/lib_rend/ivas_objectRenderer_hrFilt.c b/lib_rend/ivas_objectRenderer_hrFilt.c index 7cfbbc5ed51b8667dd0bdf73311b42f3e3ceea23..411c3d11b6d333a12f775f18a19d2aae5934b0eb 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt.c +++ b/lib_rend/ivas_objectRenderer_hrFilt.c @@ -461,12 +461,8 @@ static void getStandardBSplineSampVec( { d = 2 * ( BsLen[shape_idx] - 1 ) - d; } -#ifdef FIX_2235_TD_RENDERER_WORD16 assert( d >= 0 && d < BsLen[shape_idx] ); BfVec[i] = BsShape[BsStart[shape_idx] + d]; -#else - BfVec[i] = BsShape[BsStart[shape_idx] + (int16_t) abs( d )]; /*TT, verify if abs is needed */ -#endif NzIdx[i] = nI + i; }