From 771e2951c94ec99a59c94665b2f6e40c95a4ec89 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Tue, 14 Apr 2026 13:37:08 +0200 Subject: [PATCH 01/12] use SetTCXModeInfo also for EVS --- lib_com/options.h | 1 + lib_enc/pre_proc_fx.c | 4 ++++ lib_enc/prot_fx_enc.h | 3 ++- lib_enc/transient_detection_fx.c | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 058bc845a..73414a5db 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -95,6 +95,7 @@ #define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ #define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ #define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ +#define HARMONIZE_2537_SetTCXModeInfo /* FhG: Harmonize SetTCXModeInfo */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/pre_proc_fx.c b/lib_enc/pre_proc_fx.c index c5cc50341..12b6532ad 100644 --- a/lib_enc/pre_proc_fx.c +++ b/lib_enc/pre_proc_fx.c @@ -1264,7 +1264,11 @@ void pre_proc_fx( * TCX mode decision *---------------------------------------------------------------*/ +#ifdef HARMONIZE_2537_SetTCXModeInfo + SetTCXModeInfo_ivas_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); +#else SetTCXModeInfo_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); +#endif } /*-----------------------------------------------------------------* diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h index d59870610..f9d6af8b6 100644 --- a/lib_enc/prot_fx_enc.h +++ b/lib_enc/prot_fx_enc.h @@ -954,6 +954,7 @@ void SetTCXModeInfo_ivas_fx( Word16 *tcxModeOverlap /* o : window overlap of current frame */ ); +#ifndef HARMONIZE_2537_SetTCXModeInfo /** Set TCX window length and overlap configuration * @param prevEnergyHF previous HF energy. Exponent must be the same as for currEnergyHF. * @param currEnergyHF current HF energy. Exponent must be the same as for prevEnergyHF. @@ -962,7 +963,7 @@ void SetTCXModeInfo_fx( Encoder_State *st, TRAN_DET_HANDLE hTranDet, Word16 *tcxModeOverlap ); - +#endif void GSC_enc_init_fx( GSC_ENC_HANDLE hGSCEnc /* i/o: GSC data handle */ ); diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index f671b8d9e..9a141685c 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -908,7 +908,7 @@ void SetTCXModeInfo_ivas_fx( return; } - +#ifndef HARMONIZE_2537_SetTCXModeInfo /*-------------------------------------------------------------------* * SetTCXModeInfo() * @@ -1037,7 +1037,7 @@ void SetTCXModeInfo_fx( return; } - +#endif /************************************************/ /* */ -- GitLab From 584c3f5fcabd992654497b3f5b47fd3e003ffcb5 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Tue, 14 Apr 2026 14:45:57 +0200 Subject: [PATCH 02/12] add HARMONIZE_2537_GetTCXMaxenergyChange macro and code - inactive --- lib_com/options.h | 1 + lib_enc/cod_tcx_fx.c | 8 +++++ lib_enc/prot_fx_enc.h | 9 ++++++ lib_enc/tcx_ltp_enc_fx.c | 12 ++++++++ lib_enc/tns_base_enc_fx.c | 4 +++ lib_enc/transient_detection_fx.c | 53 ++++++++++++++++++++++++++++---- 6 files changed, 81 insertions(+), 6 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 91b90b57b..8ec77df0c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -96,6 +96,7 @@ #define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ #define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ #define HARMONIZE_2537_SetTCXModeInfo /* FhG: Harmonize SetTCXModeInfo */ +//#define HARMONIZE_2537_GetTCXMaxenergyChange /* FhG: Harmonize GetTCXMaxenergyChange*/ /* #################### End BE switches ################################## */ diff --git a/lib_enc/cod_tcx_fx.c b/lib_enc/cod_tcx_fx.c index 72a8d01d3..3c77a6d3b 100644 --- a/lib_enc/cod_tcx_fx.c +++ b/lib_enc/cod_tcx_fx.c @@ -4906,7 +4906,11 @@ void TNSAnalysisStereo_fx( ELSE { Word16 maxEnergyChange_fx; +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + maxEnergyChange_fx = mac_r( L_mult( GetTCXMaxenergyChange_fx( sts[0]->hTranDet, isTCX10, NSUBBLOCKS, 3, 1 /*non-EVS*/ ), 16384 ), GetTCXMaxenergyChange_fx( sts[1]->hTranDet, isTCX10, NSUBBLOCKS, 3, 1 /*non-EVS*/ ), 16384 ); +#else maxEnergyChange_fx = mac_r( L_mult( GetTCXMaxenergyChange_ivas_fx( sts[0]->hTranDet, isTCX10, NSUBBLOCKS, 3 ), 16384 ), GetTCXMaxenergyChange_ivas_fx( sts[1]->hTranDet, isTCX10, NSUBBLOCKS, 3 ), 16384 ); +#endif IF( GE_16( maxEnergyChange_fx, shl( pTnsParameters[0]->minEnergyChange, Q3 - Q7 ) ) ) { @@ -5200,7 +5204,11 @@ void TNSAnalysisStereo_fx( } ELSE { +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + Word16 maxEnergyChange_fx = GetTCXMaxenergyChange_fx( sts[ch]->hTranDet, isTCX10, NSUBBLOCKS, 3, 1 /*non-EVS*/ ); +#else Word16 maxEnergyChange_fx = GetTCXMaxenergyChange_ivas_fx( sts[ch]->hTranDet, isTCX10, NSUBBLOCKS, 3 ); +#endif IF( GE_16( maxEnergyChange_fx, shl( pTnsParameters->minEnergyChange, Q3 - Q7 ) ) ) { diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h index f9d6af8b6..21220546c 100644 --- a/lib_enc/prot_fx_enc.h +++ b/lib_enc/prot_fx_enc.h @@ -932,6 +932,14 @@ Word32 GetTCXAvgTemporalFlatnessMeasure_ivas_fx( * @param nPrevSubblocks Number of subblocks from the previous frames to use for the calculation. * @param maximum energy change with exponent NRG_CHANGE_E */ +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange +Word16 GetTCXMaxenergyChange_fx( + TRAN_DET_HANDLE hTranDet, + const Word8 isTCX10, + const Word16 nCurrentSubblocks, + const Word16 nPrevSubblocks, + Word16 element_mode); +#else Word16 GetTCXMaxenergyChange_fx( TRAN_DET_HANDLE hTranDet, const Word8 isTCX10, @@ -943,6 +951,7 @@ Word16 GetTCXMaxenergyChange_ivas_fx( const Word8 isTCX10, const Word16 nCurrentSubblocks, const Word16 nPrevSubblocks ); +#endif /** Set TCX window length and overlap configuration * @param prevEnergyHF previous HF energy. Exponent must be the same as for currEnergyHF. diff --git a/lib_enc/tcx_ltp_enc_fx.c b/lib_enc/tcx_ltp_enc_fx.c index 5247f3604..f564c855f 100644 --- a/lib_enc/tcx_ltp_enc_fx.c +++ b/lib_enc/tcx_ltp_enc_fx.c @@ -418,7 +418,11 @@ void tcx_ltp_encode_fx( tempFlatness = GetTCXAvgTemporalFlatnessMeasure_fx( hTranDet, NSUBBLOCKS, nPrevSubblocks ); +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + maxEnergyChange = GetTCXMaxenergyChange_fx( hTranDet, (const Word8) isTCX10, NSUBBLOCKS, nPrevSubblocks, EVS_MONO ); +#else maxEnergyChange = GetTCXMaxenergyChange_fx( hTranDet, (const Word8) isTCX10, NSUBBLOCKS, nPrevSubblocks ); +#endif /* Switch LTP on */ test(); @@ -768,12 +772,20 @@ void tcx_ltp_encode_ivas_fx( IF( EQ_16( st->element_mode, IVAS_CPE_DFT ) ) { tempFlatness_fx = extract_h( L_shl_sat( GetTCXAvgTemporalFlatnessMeasure_ivas_fx( st->hTranDet, NSUBBLOCKS - NSUBBLOCKS_SHIFT, add( nPrevSubblocks, NSUBBLOCKS_SHIFT ) ), 2 ) ); +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + maxEnergyChange_fx = GetTCXMaxenergyChange_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS - NSUBBLOCKS_SHIFT, add( nPrevSubblocks, NSUBBLOCKS_SHIFT ), st->element_mode ); // Q3 +#else maxEnergyChange_fx = GetTCXMaxenergyChange_ivas_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS - NSUBBLOCKS_SHIFT, add( nPrevSubblocks, NSUBBLOCKS_SHIFT ) ); // Q3 +#endif } ELSE { tempFlatness_fx = extract_h( L_shl_sat( ( GetTCXAvgTemporalFlatnessMeasure_ivas_fx( st->hTranDet, NSUBBLOCKS, nPrevSubblocks ) ), 2 ) ); // Q7 +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + maxEnergyChange_fx = GetTCXMaxenergyChange_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS, nPrevSubblocks, st->element_mode ); // Q3 +#else maxEnergyChange_fx = GetTCXMaxenergyChange_ivas_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS, nPrevSubblocks ); // Q3 +#endif } /* Switch LTP on */ diff --git a/lib_enc/tns_base_enc_fx.c b/lib_enc/tns_base_enc_fx.c index 0ad30427b..08793acf4 100644 --- a/lib_enc/tns_base_enc_fx.c +++ b/lib_enc/tns_base_enc_fx.c @@ -405,7 +405,11 @@ Word16 DetectTnsFilt_fx( } ELSE { +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + maxEnergyChange = GetTCXMaxenergyChange_fx( hTranDet, isTCX10, NSUBBLOCKS, 3, 1 /*non-EVS*/ ); +#else maxEnergyChange = GetTCXMaxenergyChange_ivas_fx( hTranDet, isTCX10, NSUBBLOCKS, 3 ); +#endif IF( sub( maxEnergyChange, shl( pTnsParameters->minEnergyChange, Q3 - Q7 ) ) >= 0 ) { diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index 9a141685c..e4c10341f 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -434,6 +434,7 @@ Word32 GetTCXAvgTemporalFlatnessMeasure_ivas_fx( return i; } +#ifndef HARMONIZE_2537_GetTCXMaxenergyChange Word16 GetTCXMaxenergyChange_fx( TRAN_DET_HANDLE hTranDet, const Word8 isTCX10, @@ -510,21 +511,36 @@ Word16 GetTCXMaxenergyChange_fx( return i; } +#endif - +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange +Word16 GetTCXMaxenergyChange_fx( + TRAN_DET_HANDLE hTranDet, + const Word8 isTCX10, + const Word16 nCurrentSubblocks, + const Word16 nPrevSubblocks, + Word16 element_mode ) +#else Word16 GetTCXMaxenergyChange_ivas_fx( TRAN_DET_HANDLE hTranDet, const Word8 isTCX10, const Word16 nCurrentSubblocks, const Word16 nPrevSubblocks ) +#endif { Word16 i; TransientDetector const *pTransientDetector; SubblockEnergies const *pSubblockEnergies; Word16 nDelay; Word16 nRelativeDelay; +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + Word16 const *pSubblockNrgChange_16; + Word32 const *pSubblockNrgChange_32; + Word16 const *pSubblockNrgChange_32_exp; +#else Word32 const *pSubblockNrgChange; Word16 const *pSubblockNrgChange_exp; +#endif Word16 maxEnergyChange; Word16 nTotBlocks; @@ -533,15 +549,27 @@ Word16 GetTCXMaxenergyChange_ivas_fx( move16(); nDelay = pTransientDetector->nDelay; nRelativeDelay = sub( pSubblockEnergies->nDelay, nDelay ); +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + pSubblockNrgChange_16 = NULL; + pSubblockNrgChange_32 = NULL; +#else pSubblockNrgChange = NULL; +#endif nTotBlocks = add( nCurrentSubblocks, nPrevSubblocks ); assert( nTotBlocks > 0 ); - maxEnergyChange = 0 /*0.0f Q3*/; + maxEnergyChange = 0; move16(); + assert( ( nPrevSubblocks <= nRelativeDelay ) && ( nCurrentSubblocks <= NSUBBLOCKS + nDelay ) ); +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + pSubblockNrgChange_16 = &pSubblockEnergies->subblockNrgChange[nRelativeDelay - nPrevSubblocks]; + pSubblockNrgChange_32 = &pSubblockEnergies->subblockNrgChange_32fx[nRelativeDelay - nPrevSubblocks]; + pSubblockNrgChange_32_exp = &pSubblockEnergies->subblockNrgChange_exp[nRelativeDelay - nPrevSubblocks]; +#else pSubblockNrgChange = &pSubblockEnergies->subblockNrgChange_32fx[nRelativeDelay - nPrevSubblocks]; pSubblockNrgChange_exp = &pSubblockEnergies->subblockNrgChange_exp[nRelativeDelay - nPrevSubblocks]; +#endif IF( s_or( pTransientDetector->bIsAttackPresent, isTCX10 ) ) /* frame is TCX-10 */ { @@ -578,13 +606,26 @@ Word16 GetTCXMaxenergyChange_ivas_fx( } } - FOR( i = 0; i < nTotBlocks; i++ ) +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange + IF( GT_16( element_mode, EVS_MONO ) ) { - maxEnergyChange = s_max( maxEnergyChange, extract_l( L_shl_sat( pSubblockNrgChange[i], sub( pSubblockNrgChange_exp[i], 28 ) ) ) ); // Q3 +#endif + FOR( i = 0; i < nTotBlocks; i++ ) + { + maxEnergyChange = s_max( maxEnergyChange, extract_l( L_shl_sat( pSubblockNrgChange_32[i], sub( pSubblockNrgChange_32_exp[i], 28 ) ) ) ); // Q3 + } +#ifdef HARMONIZE_2537_GetTCXMaxenergyChange } - + ELSE + { + FOR( i = 0; i < nTotBlocks; i++ ) + { + maxEnergyChange = s_max( maxEnergyChange, pSubblockNrgChange_16[i] ); + } + } +#endif move16(); - i = maxEnergyChange; // Q3 + i = maxEnergyChange; return i; } -- GitLab From 5c71267238093dfa4bc24387bddd61296c8b28d1 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Tue, 14 Apr 2026 14:47:13 +0200 Subject: [PATCH 03/12] deactivate HARMONIZE_2537_SetTCXModeInfo, activate HARMONIZE_2537_GetTCXMaxenergyChange --- lib_com/options.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 8ec77df0c..73a6652f1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -95,8 +95,8 @@ #define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ #define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ #define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ -#define HARMONIZE_2537_SetTCXModeInfo /* FhG: Harmonize SetTCXModeInfo */ -//#define HARMONIZE_2537_GetTCXMaxenergyChange /* FhG: Harmonize GetTCXMaxenergyChange*/ +//#define HARMONIZE_2537_SetTCXModeInfo /* FhG: Harmonize SetTCXModeInfo - IVAS_VERSION OBVIOUSLY NOT FITTING FOR EVS*/ +#define HARMONIZE_2537_GetTCXMaxenergyChange /* FhG: Harmonize GetTCXMaxenergyChange*/ /* #################### End BE switches ################################## */ -- GitLab From 734c0677789922a37e7076770d747a3df36d75a8 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Tue, 14 Apr 2026 14:49:46 +0200 Subject: [PATCH 04/12] clang format patch --- lib_com/options.h | 4 +++- lib_enc/prot_fx_enc.h | 2 +- lib_enc/tcx_ltp_enc_fx.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 73a6652f1..eb34c0008 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -95,7 +95,9 @@ #define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ #define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ #define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ -//#define HARMONIZE_2537_SetTCXModeInfo /* FhG: Harmonize SetTCXModeInfo - IVAS_VERSION OBVIOUSLY NOT FITTING FOR EVS*/ + +/*Harmonize SetTCXModeInfo, GetTCXMaxenergyChange, GetTCXAvgTemporalFlatnessMeasure*/ +//#define HARMONIZE_2537_SetTCXModeInfo /* FhG: Harmonize SetTCXModeInfo - IVAS_VERSION OBVIOUSLY NOT FITTING FOR EVS - pipes not green*/ #define HARMONIZE_2537_GetTCXMaxenergyChange /* FhG: Harmonize GetTCXMaxenergyChange*/ /* #################### End BE switches ################################## */ diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h index 21220546c..5729d5067 100644 --- a/lib_enc/prot_fx_enc.h +++ b/lib_enc/prot_fx_enc.h @@ -938,7 +938,7 @@ Word16 GetTCXMaxenergyChange_fx( const Word8 isTCX10, const Word16 nCurrentSubblocks, const Word16 nPrevSubblocks, - Word16 element_mode); + Word16 element_mode ); #else Word16 GetTCXMaxenergyChange_fx( TRAN_DET_HANDLE hTranDet, diff --git a/lib_enc/tcx_ltp_enc_fx.c b/lib_enc/tcx_ltp_enc_fx.c index f564c855f..dde520d3a 100644 --- a/lib_enc/tcx_ltp_enc_fx.c +++ b/lib_enc/tcx_ltp_enc_fx.c @@ -784,7 +784,7 @@ void tcx_ltp_encode_ivas_fx( #ifdef HARMONIZE_2537_GetTCXMaxenergyChange maxEnergyChange_fx = GetTCXMaxenergyChange_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS, nPrevSubblocks, st->element_mode ); // Q3 #else - maxEnergyChange_fx = GetTCXMaxenergyChange_ivas_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS, nPrevSubblocks ); // Q3 + maxEnergyChange_fx = GetTCXMaxenergyChange_ivas_fx( st->hTranDet, (const Word8) isTCX10, NSUBBLOCKS, nPrevSubblocks ); // Q3 #endif } -- GitLab From a8233b842885268ae094739637edaa7e5c49c42f Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Tue, 14 Apr 2026 16:05:53 +0200 Subject: [PATCH 05/12] re-setup macro HARMONIZE_2537_SetTCXModeInfo and code --- lib_com/options.h | 6 +- lib_enc/ivas_core_pre_proc_fx.c | 4 ++ lib_enc/ivas_mdct_core_enc_fx.c | 4 ++ lib_enc/ivas_stereo_mdct_core_enc_fx.c | 4 ++ lib_enc/pre_proc_fx.c | 4 -- lib_enc/prot_fx_enc.h | 5 +- lib_enc/transient_detection_fx.c | 94 +++++++++++++++++++++----- 7 files changed, 94 insertions(+), 27 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index eb34c0008..be211f0a6 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -96,9 +96,9 @@ #define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ #define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ -/*Harmonize SetTCXModeInfo, GetTCXMaxenergyChange, GetTCXAvgTemporalFlatnessMeasure*/ -//#define HARMONIZE_2537_SetTCXModeInfo /* FhG: Harmonize SetTCXModeInfo - IVAS_VERSION OBVIOUSLY NOT FITTING FOR EVS - pipes not green*/ -#define HARMONIZE_2537_GetTCXMaxenergyChange /* FhG: Harmonize GetTCXMaxenergyChange*/ +/*Harmonize SetTCXModeInfo, GetTCXMaxenergyChange*/ +#define HARMONIZE_2537_SetTCXModeInfo /* FhG: Harmonize SetTCXModeInfo - IVAS_VERSION OBVIOUSLY NOT FITTING FOR EVS - pipes not green */ +#define HARMONIZE_2537_GetTCXMaxenergyChange /* FhG: Harmonize GetTCXMaxenergyChange */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/ivas_core_pre_proc_fx.c b/lib_enc/ivas_core_pre_proc_fx.c index 019ccca6e..8f1a7b60b 100644 --- a/lib_enc/ivas_core_pre_proc_fx.c +++ b/lib_enc/ivas_core_pre_proc_fx.c @@ -380,7 +380,11 @@ void pre_proc_ivas_fx( } IF( NE_16( st->element_mode, IVAS_CPE_MDCT ) ) { +#ifdef HARMONIZE_2537_SetTCXModeInfo + SetTCXModeInfo_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); +#else SetTCXModeInfo_ivas_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); +#endif } } ELSE IF( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) diff --git a/lib_enc/ivas_mdct_core_enc_fx.c b/lib_enc/ivas_mdct_core_enc_fx.c index 99ff751e4..3e1b3bc96 100644 --- a/lib_enc/ivas_mdct_core_enc_fx.c +++ b/lib_enc/ivas_mdct_core_enc_fx.c @@ -1290,7 +1290,11 @@ void ivas_mdct_core_whitening_enc_fx( FOR( ch = 0; ch < CPE_CHANNELS; ch++ ) { st = sts[ch]; +#ifdef HARMONIZE_2537_SetTCXModeInfo + SetTCXModeInfo_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); +#else SetTCXModeInfo_ivas_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); +#endif } } diff --git a/lib_enc/ivas_stereo_mdct_core_enc_fx.c b/lib_enc/ivas_stereo_mdct_core_enc_fx.c index 37996fe42..74ccb14fc 100644 --- a/lib_enc/ivas_stereo_mdct_core_enc_fx.c +++ b/lib_enc/ivas_stereo_mdct_core_enc_fx.c @@ -211,7 +211,11 @@ void stereo_mdct_core_enc_fx( FOR( ch = 0; ch < CPE_CHANNELS; ch++ ) { st = sts[ch]; +#ifdef HARMONIZE_2537_SetTCXModeInfo + SetTCXModeInfo_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); +#else SetTCXModeInfo_ivas_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); +#endif } /* adaptively sync tcx modes*/ test(); diff --git a/lib_enc/pre_proc_fx.c b/lib_enc/pre_proc_fx.c index 12b6532ad..c5cc50341 100644 --- a/lib_enc/pre_proc_fx.c +++ b/lib_enc/pre_proc_fx.c @@ -1264,11 +1264,7 @@ void pre_proc_fx( * TCX mode decision *---------------------------------------------------------------*/ -#ifdef HARMONIZE_2537_SetTCXModeInfo - SetTCXModeInfo_ivas_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); -#else SetTCXModeInfo_fx( st, st->hTranDet, &st->hTcxCfg->tcx_curr_overlap_mode ); -#endif } /*-----------------------------------------------------------------* diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h index 5729d5067..52e00e612 100644 --- a/lib_enc/prot_fx_enc.h +++ b/lib_enc/prot_fx_enc.h @@ -953,6 +953,7 @@ Word16 GetTCXMaxenergyChange_ivas_fx( const Word16 nPrevSubblocks ); #endif +#ifndef HARMONIZE_2537_SetTCXModeInfo /** Set TCX window length and overlap configuration * @param prevEnergyHF previous HF energy. Exponent must be the same as for currEnergyHF. * @param currEnergyHF current HF energy. Exponent must be the same as for prevEnergyHF. @@ -962,8 +963,8 @@ void SetTCXModeInfo_ivas_fx( TRAN_DET_HANDLE hTranDet, /* i/o: transient detection handle */ Word16 *tcxModeOverlap /* o : window overlap of current frame */ ); +#endif -#ifndef HARMONIZE_2537_SetTCXModeInfo /** Set TCX window length and overlap configuration * @param prevEnergyHF previous HF energy. Exponent must be the same as for currEnergyHF. * @param currEnergyHF current HF energy. Exponent must be the same as for prevEnergyHF. @@ -972,7 +973,7 @@ void SetTCXModeInfo_fx( Encoder_State *st, TRAN_DET_HANDLE hTranDet, Word16 *tcxModeOverlap ); -#endif + void GSC_enc_init_fx( GSC_ENC_HANDLE hGSCEnc /* i/o: GSC data handle */ ); diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index e4c10341f..95bdb7b09 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -776,18 +776,35 @@ static Word16 isLongTermTransient_fx( } +/*HARMONIZATION DONE...*/ +#ifdef HARMONIZE_2537_SetTCXModeInfo +void SetTCXModeInfo_fx( + Encoder_State *st, /* i/o: encoder state structure */ + TRAN_DET_HANDLE hTranDet, /* i/o: transient detection handle */ + Word16 *tcxModeOverlap /* o : window overlap of current frame */ +) +#else void SetTCXModeInfo_ivas_fx( Encoder_State *st, /* i/o: encoder state structure */ TRAN_DET_HANDLE hTranDet, /* i/o: transient detection handle */ Word16 *tcxModeOverlap /* o : window overlap of current frame */ ) +#endif { TCX_ENC_HANDLE hTcxEnc = st->hTcxEnc; Word16 tmp, exp_diff; test(); test(); +#ifdef HARMONIZE_2537_SetTCXModeInfo + test(); + test(); + test(); + IF( ( GT_16( st->element_mode, EVS_MONO ) ) && ( EQ_16( st->codec_mode, MODE2 ) || ( GT_16( st->element_mode, EVS_MONO ) && NE_16( st->core, HQ_CORE ) ) ) + || ( ( EQ_16( st->element_mode, EVS_MONO ) ) && ( EQ_16( st->codec_mode, MODE2 ) ) ) ) +#else IF( EQ_16( st->codec_mode, MODE2 ) || ( GT_16( st->element_mode, EVS_MONO ) && NE_16( st->core, HQ_CORE ) ) ) +#endif { assert( hTranDet != NULL ); @@ -796,6 +813,24 @@ void SetTCXModeInfo_ivas_fx( IF( st->tcx10Enabled && st->tcx20Enabled ) { /* window switching based on transient detector output */ +#ifdef HARMONIZE_2537_SetTCXModeInfo + Word16 currNrgGTprevNrg; + IF( GT_16( st->element_mode, EVS_MONO ) ) + { + test(); + currNrgGTprevNrg = ( EQ_32( BASOP_Util_Cmp_Mant32Exp( Mpy_32_32( st->currEnergyHF_fx, 55063683 /*1.0f/39.0f Q31*/ ), st->currEnergyHF_e_fx, st->prevEnergyHF_fx, 17 ), 1 ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) ); + } + ELSE + { + currNrgGTprevNrg = ( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, 840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); + } + test(); + test(); + test(); + /* window switching based on transient detector output */ + IF( ( ( hTranDet->transientDetector.bIsAttackPresent ) || currNrgGTprevNrg ) && + ( ( NE_16( st->last_core, ACELP_CORE ) ) && ( NE_16( st->last_core, AMR_WB_CORE ) ) ) ) +#else test(); test(); test(); @@ -803,6 +838,7 @@ void SetTCXModeInfo_ivas_fx( /* window switching based on transient detector output */ IF( ( ( hTranDet->transientDetector.bIsAttackPresent ) || ( EQ_32( BASOP_Util_Cmp_Mant32Exp( Mpy_32_32( st->currEnergyHF_fx, 55063683 /*1.0f/39.0f Q31*/ ), st->currEnergyHF_e_fx, st->prevEnergyHF_fx, 17 ), 1 ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) ) ) && ( ( NE_16( st->last_core, ACELP_CORE ) ) && ( NE_16( st->last_core, AMR_WB_CORE ) ) ) ) +#endif { hTcxEnc->tcxMode = TCX_10; move16(); @@ -882,16 +918,21 @@ void SetTCXModeInfo_ivas_fx( move16(); } } - tmp = BASOP_Util_Divide3232_Scale( ONE_IN_Q21, GetTCXAvgTemporalFlatnessMeasure_ivas_fx( hTranDet, NSUBBLOCKS, 0 ), &exp_diff ); - tmp = shl_sat( tmp, exp_diff ); // Q15 - test(); - IF( isLongTermTransient_fx( L_deposit_h( tmp ), &hTcxEnc->tfm_mem_fx ) && EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) +#ifdef HARMONIZE_2537_SetTCXModeInfo + IF( GT_16( st->element_mode, EVS_MONO ) ) +#endif { + tmp = BASOP_Util_Divide3232_Scale( ONE_IN_Q21, GetTCXAvgTemporalFlatnessMeasure_ivas_fx( hTranDet, NSUBBLOCKS, 0 ), &exp_diff ); + tmp = shl_sat( tmp, exp_diff ); // Q15 test(); - IF( NE_16( *tcxModeOverlap, MIN_OVERLAP ) && LT_16( hTcxEnc->tcxltp_norm_corr_past, 18432 /* 0.5625f in Q15 */ ) ) + IF( isLongTermTransient_fx( L_deposit_h( tmp ), &hTcxEnc->tfm_mem_fx ) && EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) { - *tcxModeOverlap = HALF_OVERLAP; - move16(); + test(); + IF( NE_16( *tcxModeOverlap, MIN_OVERLAP ) && LT_16( hTcxEnc->tcxltp_norm_corr_past, 18432 /* 0.5625f in Q15 */ ) ) + { + *tcxModeOverlap = HALF_OVERLAP; + move16(); + } } } } @@ -912,16 +953,21 @@ void SetTCXModeInfo_ivas_fx( *tcxModeOverlap = ALDO_WINDOW; move16(); } - tmp = BASOP_Util_Divide3232_Scale( ONE_IN_Q21, GetTCXAvgTemporalFlatnessMeasure_ivas_fx( hTranDet, NSUBBLOCKS, 0 ), &exp_diff ); - tmp = shl_sat( tmp, exp_diff ); // Q15 - test(); - IF( isLongTermTransient_fx( L_deposit_h( tmp ), &hTcxEnc->tfm_mem_fx ) && EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) +#ifdef HARMONIZE_2537_SetTCXModeInfo + IF( GT_16( st->element_mode, EVS_MONO ) ) +#endif { + tmp = BASOP_Util_Divide3232_Scale( ONE_IN_Q21, GetTCXAvgTemporalFlatnessMeasure_ivas_fx( hTranDet, NSUBBLOCKS, 0 ), &exp_diff ); + tmp = shl_sat( tmp, exp_diff ); // Q15 test(); - if ( NE_16( *tcxModeOverlap, MIN_OVERLAP ) && LT_16( hTcxEnc->tcxltp_norm_corr_past, 18432 /* 0.5625f in Q15 */ ) ) + IF( isLongTermTransient_fx( L_deposit_h( tmp ), &hTcxEnc->tfm_mem_fx ) && EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) { - *tcxModeOverlap = HALF_OVERLAP; - move16(); + test(); + if ( NE_16( *tcxModeOverlap, MIN_OVERLAP ) && LT_16( hTcxEnc->tcxltp_norm_corr_past, 18432 /* 0.5625f in Q15 */ ) ) + { + *tcxModeOverlap = HALF_OVERLAP; + move16(); + } } } } @@ -930,20 +976,32 @@ void SetTCXModeInfo_ivas_fx( /* NO_TCX */ *tcxModeOverlap = TRANSITION_OVERLAP; move16(); - if ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) +#ifdef HARMONIZE_2537_SetTCXModeInfo + IF( GT_16( st->element_mode, EVS_MONO ) ) +#endif { - hTcxEnc->tfm_mem_fx = 1610612736; /* 0.75f in Q31 */ - move16(); + if ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) + { + hTcxEnc->tfm_mem_fx = 1610612736; /* 0.75f in Q31 */ + move16(); + } } } /* for the ACELP -> TCX transition frames use full right window overlap */ test(); - IF( ( EQ_16( st->hTcxCfg->tcx_last_overlap_mode, TRANSITION_OVERLAP ) ) && ( EQ_16( *tcxModeOverlap, ALDO_WINDOW ) ) ) + if ( ( EQ_16( st->hTcxCfg->tcx_last_overlap_mode, TRANSITION_OVERLAP ) ) && ( EQ_16( *tcxModeOverlap, ALDO_WINDOW ) ) ) { *tcxModeOverlap = FULL_OVERLAP; move16(); } +#ifdef HARMONIZE_2537_SetTCXModeInfo + IF( EQ_16( st->element_mode, EVS_MONO ) ) + { + /* Sanity check */ + assert( *tcxModeOverlap != 1 ); + } +#endif } return; -- GitLab From e1c2a378164081da37a886f979277592a7449921 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Tue, 14 Apr 2026 16:12:48 +0200 Subject: [PATCH 06/12] clang format patch --- lib_enc/transient_detection_fx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index 95bdb7b09..6e0b8734e 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -800,8 +800,7 @@ void SetTCXModeInfo_ivas_fx( test(); test(); test(); - IF( ( GT_16( st->element_mode, EVS_MONO ) ) && ( EQ_16( st->codec_mode, MODE2 ) || ( GT_16( st->element_mode, EVS_MONO ) && NE_16( st->core, HQ_CORE ) ) ) - || ( ( EQ_16( st->element_mode, EVS_MONO ) ) && ( EQ_16( st->codec_mode, MODE2 ) ) ) ) + IF( ( GT_16( st->element_mode, EVS_MONO ) ) && ( EQ_16( st->codec_mode, MODE2 ) || ( GT_16( st->element_mode, EVS_MONO ) && NE_16( st->core, HQ_CORE ) ) ) || ( ( EQ_16( st->element_mode, EVS_MONO ) ) && ( EQ_16( st->codec_mode, MODE2 ) ) ) ) #else IF( EQ_16( st->codec_mode, MODE2 ) || ( GT_16( st->element_mode, EVS_MONO ) && NE_16( st->core, HQ_CORE ) ) ) #endif -- GitLab From 6ac69fbec5d5853a9db1f6439eb2e33a3cae8f15 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Wed, 15 Apr 2026 08:32:00 +0200 Subject: [PATCH 07/12] fix warning --- lib_enc/transient_detection_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index 6e0b8734e..6be319b0b 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -821,7 +821,7 @@ void SetTCXModeInfo_ivas_fx( } ELSE { - currNrgGTprevNrg = ( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, 840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); + currNrgGTprevNrg = ( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, (Word16)840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); } test(); test(); -- GitLab From a0f60cddb1fac26412443e0c2413530dc457a317 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Wed, 15 Apr 2026 09:58:58 +0200 Subject: [PATCH 08/12] clang format patch --- lib_enc/transient_detection_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index 6be319b0b..b6238e0f3 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -821,7 +821,7 @@ void SetTCXModeInfo_ivas_fx( } ELSE { - currNrgGTprevNrg = ( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, (Word16)840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); + currNrgGTprevNrg = ( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, (Word16) 840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); } test(); test(); -- GitLab From 4279af6622f09810283f51e4cc752d3a5563205a Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Wed, 15 Apr 2026 10:17:08 +0200 Subject: [PATCH 09/12] fix warning --- lib_enc/transient_detection_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index b6238e0f3..295d39fe6 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -817,11 +817,11 @@ void SetTCXModeInfo_ivas_fx( IF( GT_16( st->element_mode, EVS_MONO ) ) { test(); - currNrgGTprevNrg = ( EQ_32( BASOP_Util_Cmp_Mant32Exp( Mpy_32_32( st->currEnergyHF_fx, 55063683 /*1.0f/39.0f Q31*/ ), st->currEnergyHF_e_fx, st->prevEnergyHF_fx, 17 ), 1 ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) ); + currNrgGTprevNrg = (Word16)( EQ_32( BASOP_Util_Cmp_Mant32Exp( Mpy_32_32( st->currEnergyHF_fx, 55063683 /*1.0f/39.0f Q31*/ ), st->currEnergyHF_e_fx, st->prevEnergyHF_fx, 17 ), 1 ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) ); } ELSE { - currNrgGTprevNrg = ( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, (Word16) 840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); + currNrgGTprevNrg = (Word16)( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, 840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); } test(); test(); -- GitLab From 177025979c72de5979f35fa20aeaf49ffc0ecbe1 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Wed, 15 Apr 2026 10:36:58 +0200 Subject: [PATCH 10/12] clang format patch --- lib_enc/transient_detection_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index 295d39fe6..d4729e753 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -817,11 +817,11 @@ void SetTCXModeInfo_ivas_fx( IF( GT_16( st->element_mode, EVS_MONO ) ) { test(); - currNrgGTprevNrg = (Word16)( EQ_32( BASOP_Util_Cmp_Mant32Exp( Mpy_32_32( st->currEnergyHF_fx, 55063683 /*1.0f/39.0f Q31*/ ), st->currEnergyHF_e_fx, st->prevEnergyHF_fx, 17 ), 1 ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) ); + currNrgGTprevNrg = (Word16) ( EQ_32( BASOP_Util_Cmp_Mant32Exp( Mpy_32_32( st->currEnergyHF_fx, 55063683 /*1.0f/39.0f Q31*/ ), st->currEnergyHF_e_fx, st->prevEnergyHF_fx, 17 ), 1 ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) ); } ELSE { - currNrgGTprevNrg = (Word16)( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, 840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); + currNrgGTprevNrg = (Word16) ( GT_32( Mpy_32_16_1( st->currEnergyHF_fx, 840 /*1.0f/39.0f Q15*/ ), st->prevEnergyHF_fx ) ); } test(); test(); -- GitLab From 94768b61361b291972dfe2d6e07367bb93af2f5c Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 17 Apr 2026 15:49:18 +0200 Subject: [PATCH 11/12] harmonize conditions --- lib_enc/transient_detection_fx.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index d4729e753..a1c9fb483 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -799,11 +799,8 @@ void SetTCXModeInfo_ivas_fx( #ifdef HARMONIZE_2537_SetTCXModeInfo test(); test(); - test(); - IF( ( GT_16( st->element_mode, EVS_MONO ) ) && ( EQ_16( st->codec_mode, MODE2 ) || ( GT_16( st->element_mode, EVS_MONO ) && NE_16( st->core, HQ_CORE ) ) ) || ( ( EQ_16( st->element_mode, EVS_MONO ) ) && ( EQ_16( st->codec_mode, MODE2 ) ) ) ) -#else - IF( EQ_16( st->codec_mode, MODE2 ) || ( GT_16( st->element_mode, EVS_MONO ) && NE_16( st->core, HQ_CORE ) ) ) #endif + IF( EQ_16( st->codec_mode, MODE2 ) || ( GT_16( st->element_mode, EVS_MONO ) && NE_16( st->core, HQ_CORE ) ) ) { assert( hTranDet != NULL ); @@ -975,16 +972,11 @@ void SetTCXModeInfo_ivas_fx( /* NO_TCX */ *tcxModeOverlap = TRANSITION_OVERLAP; move16(); -#ifdef HARMONIZE_2537_SetTCXModeInfo - IF( GT_16( st->element_mode, EVS_MONO ) ) -#endif - { - if ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) - { - hTcxEnc->tfm_mem_fx = 1610612736; /* 0.75f in Q31 */ - move16(); - } - } + if ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) + { + hTcxEnc->tfm_mem_fx = 1610612736; /* 0.75f in Q31 */ + move16(); + } } /* for the ACELP -> TCX transition frames use full right window overlap */ -- GitLab From dfd3a8824affaaf7bb273ff9d92b507794282b27 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 17 Apr 2026 15:57:31 +0200 Subject: [PATCH 12/12] formatting --- lib_enc/transient_detection_fx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib_enc/transient_detection_fx.c b/lib_enc/transient_detection_fx.c index a1c9fb483..2b906828d 100644 --- a/lib_enc/transient_detection_fx.c +++ b/lib_enc/transient_detection_fx.c @@ -972,11 +972,11 @@ void SetTCXModeInfo_ivas_fx( /* NO_TCX */ *tcxModeOverlap = TRANSITION_OVERLAP; move16(); - if ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) - { - hTcxEnc->tfm_mem_fx = 1610612736; /* 0.75f in Q31 */ - move16(); - } + if ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ) + { + hTcxEnc->tfm_mem_fx = 1610612736; /* 0.75f in Q31 */ + move16(); + } } /* for the ACELP -> TCX transition frames use full right window overlap */ -- GitLab