diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index ba65afec02816a7ff13a61885e29a07ccc4bc2bf..f3703e7214d917674e039ff39f8e238828dd0e0c 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -1890,9 +1890,11 @@ void TonalMDCTConceal_Detect_ivas_fx( Word16 element_mode ); +#ifndef HARMONIZE_2427_GETPLC Word16 GetPLCModeDecision_ivas_fx( Decoder_State *st /* i/o: decoder memory state pointer */ ); +#endif // !HARMONIZE_2427_GETPLC void ivas_DetectTonalComponents_fx( Word16 indexOfTonalPeak[], diff --git a/lib_com/options.h b/lib_com/options.h index 6f0d8e55eecabd7851829ca66e771ef0e0d4ba91..66e4e2bf98560d7f01e8b1d17cde38321dec172a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -89,8 +89,9 @@ #define FIX_2425_REMOVE_RC_DUPLICATES /* VA: basop issue 2425: Remove duplicated RC encoder functions */ #define HARM_LEV_DURBIN /* VA: basop issue 2423: harmonize levinson-Durbin algorithm */ #define HARMONIZE_TBE2 /* VA: basop issue 2399: Remove duplicated code: TBE, step 2 */ +#define HARMONIZE_2427_GETPLC /* FhG: basop issue : 2427 Harmonizing getPLCDecision functions:*/ #define HARM_FD_BWE /* VA: harmonize core-coder FD BWE function duplications */ -#define FIX_2411_Harmonize_TNSANALYSIS_DETECTTNSFILT /* FhG: basop issue 2411: harmonize TNSAnalysis*_fx(), DetectTnsFilt*_fx()*/ +#define FIX_2411_Harmonize_TNSANALYSIS_DETECTTNSFILT /* FhG: basop issue 2411: harmonize TNSAnalysis*_fx(), DetectTnsFilt*_fx()*/ #define HARMONIZE_READ_DECODE_TNS /* FhG basop 2389: Harm between two pairs of functions. */ /* #################### End BE switches ################################## */ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index 49e042e2db19e255f9c8204595d6a34082816bba..c07c7628f57e2c69747b00d2e8a5e62b3c2dc35e 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -8474,9 +8474,13 @@ void highPassFiltering_fx( const Word16 hp_filt[], /* i: Q15 high pass filter coefficients */ const Word16 l_fir_fer ); /* i: high pass filter length */ - +#ifndef HARMONIZE_2427_GETPLC Word16 GetPLCModeDecision_fx( Decoder_State *st ); +#else +Word16 GetPLCModeDecision_ivas_fx( + Decoder_State *st ); +#endif // !HARMONIZE_2427_GETPLC void lpc_unquantize_fx( Decoder_State *st, diff --git a/lib_dec/dec_LPD_fx.c b/lib_dec/dec_LPD_fx.c index 0bc96a369d3551a2a9e869b5b34e8a8e4a82bbb6..81be4557c607d9659191bad5fabb99efa9e9d497 100644 --- a/lib_dec/dec_LPD_fx.c +++ b/lib_dec/dec_LPD_fx.c @@ -174,7 +174,13 @@ void decoder_LPD_fx( move16(); st->core_brate = st->last_core_brate; move16(); +#ifndef HARMONIZE_2427_GETPLC st->core = GetPLCModeDecision_fx( st ); +#else + st->core = GetPLCModeDecision_ivas_fx( st ); +#endif // !HARMONIZE_2427_GETPLC + + move16(); } } @@ -199,7 +205,13 @@ void decoder_LPD_fx( * PLC: Decide which Concealment to use. Update pitch lags if needed */ IF( bfi != 0 ) { +#ifndef HARMONIZE_2427_GETPLC st->core = GetPLCModeDecision_fx( st ); +#else + st->core = GetPLCModeDecision_ivas_fx( st ); +#endif // !HARMONIZE_2427_GETPLC + + move16(); } diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 8e28dc546dec062e6312996c594534b9c502bd0f..6dacc00962f5071afc3d9791d0b74a1ef2f09f41 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -448,8 +448,18 @@ Word16 GetPLCModeDecision_ivas_fx( { pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } - +#ifndef HARMONIZE_2427_GETPLC TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); +#else + IF( st->element_mode != 0 ) + { + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); + } + ELSE + { + TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); + } +#endif // !1 test(); test(); @@ -486,6 +496,7 @@ Word16 GetPLCModeDecision_ivas_fx( return core; /*Q0*/ } +#ifndef HARMONIZE_2427_GETPLC Word16 GetPLCModeDecision_fx( Decoder_State *st /* i/o: decoder memory state pointer */ ) @@ -574,9 +585,20 @@ Word16 GetPLCModeDecision_fx( { pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } - +#ifndef HARMONIZE_2427_GETPLC TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); +#else + // IVAS version + IF( st->element_mode != 0 ) + { + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, st->hTcxCfg->psychParamsCurrent, st->element_mode ); + } + ELSE + { + TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); + } +#endif // !HARMONIZE_2427_GETPLC test(); test(); test(); @@ -611,3 +633,4 @@ Word16 GetPLCModeDecision_fx( } return core; } +#endif // !HARMONIZE_2427_GETPLC