diff --git a/lib_com/options.h b/lib_com/options.h index d03261715a8d9a3ea4d6587ca01f40d133d7f93d..99fec7e7cc0d5a3c2c6cf34f093ee4d092915dca 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,4 +172,5 @@ #define DOT_PROD_CHOLESKY_64BIT /* FhG: Issue 1323, optimized 64 bit implementation of dot_product_cholesky() */ #define OPT_BASOP_ADD_v1 /* optimizations to avoid usage of BASOP_Util_Add_MantExp */ #define FIX_ISSUE_1327 /* Ittiam: Fix for issue 1327: Glitch when stereo is switching from TD to FD*/ +#define NONBE_FIX_1402_WAVEADJUST /* VA: BASOP iisue 1402: fix waveform adjustment decoder PLC */ #endif diff --git a/lib_dec/dec_tcx_fx.c b/lib_dec/dec_tcx_fx.c index 49a6b6f3b4b9003d6a23c734b575db6561908acb..87fe6c6a402313d51c6c0d9eb4582999d6a1fb24 100644 --- a/lib_dec/dec_tcx_fx.c +++ b/lib_dec/dec_tcx_fx.c @@ -4410,7 +4410,11 @@ void decoder_tcx_noisefilling_fx( /* get the starting location of the subframe in the frame */ IF( EQ_16( st->core, TCX_10_CORE ) ) { +#ifdef NONBE_FIX_1402_WAVEADJUST + st->hPlcInfo->subframe_fx = extract_l( L_mult0( frame_cnt, L_frameTCX_glob ) ); +#else st->hPlcInfo->subframe = extract_l( L_mult0( frame_cnt, L_frameTCX_glob ) ); +#endif move16(); } } diff --git a/lib_dec/ivas_core_dec_fx.c b/lib_dec/ivas_core_dec_fx.c index 180e582f1b57f99a8de01946bc3dd14c35f9aa39..a37b12f2d7a4bfd8dc68edd6bb136ff93f18a307 100644 --- a/lib_dec/ivas_core_dec_fx.c +++ b/lib_dec/ivas_core_dec_fx.c @@ -1329,8 +1329,11 @@ ivas_error ivas_core_dec_fx( waveform_adj2_fix( st->hTonalMDCTConc->secondLastPcmOut, synth_16_fx[n] + tmps, st->plcInfo.data_noise, &st->plcInfo.outx_new_n1_fx, &st->plcInfo.nsapp_gain_fx, &st->plcInfo.nsapp_gain_n_fx, &st->plcInfo.recovery_gain, st->plcInfo.step_concealgain_fx, st->plcInfo.Pitch_fx, st->plcInfo.FrameSize, tmps, add( st->hPlcInfo->nbLostCmpt, 1 ), st->bfi ); - +#ifdef NONBE_FIX_1402_WAVEADJUST + st->hPlcInfo->Pitch_fx = 0; +#else st->hPlcInfo->Pitch = 0; +#endif move16(); } } diff --git a/lib_dec/ivas_tcx_core_dec_fx.c b/lib_dec/ivas_tcx_core_dec_fx.c index 07eba9e6420b1fb940e78273467317b8d61ae136..18a2818398a5c5f3fc1a7997a87bd694b9b9c5f4 100644 --- a/lib_dec/ivas_tcx_core_dec_fx.c +++ b/lib_dec/ivas_tcx_core_dec_fx.c @@ -644,13 +644,21 @@ void stereo_tcx_core_dec_fx( test(); test(); test(); +#ifdef NONBE_FIX_1402_WAVEADJUST + IF( ( bfi || st->prev_bfi ) && st->hPlcInfo->Pitch_fx && EQ_16( st->hPlcInfo->concealment_method, TCX_NONTONAL ) ) +#else IF( ( bfi || st->prev_bfi ) && st->hPlcInfo->Pitch && EQ_16( st->hPlcInfo->concealment_method, TCX_NONTONAL ) ) +#endif { lerp( synthFB_fx, synth_fx, st->L_frame, hTcxDec->L_frameTCX ); if ( !bfi && st->prev_bfi ) { +#ifdef NONBE_FIX_1402_WAVEADJUST + st->hPlcInfo->Pitch_fx = 0; +#else st->hPlcInfo->Pitch = 0; +#endif move16(); } } diff --git a/lib_dec/stat_dec.h b/lib_dec/stat_dec.h index 530cd41d0fed9de98c364a56729a24119db8dc23..7b3c9269b291075ff078341597c99c593ac10629 100644 --- a/lib_dec/stat_dec.h +++ b/lib_dec/stat_dec.h @@ -176,10 +176,13 @@ typedef struct Word16 L_frameTCX; Word16 FrameSize; +#ifndef NONBE_FIX_1402_WAVEADJUST Word16 Pitch; +#endif Word16 Pitch_fx; - +#ifndef NONBE_FIX_1402_WAVEADJUST Word16 T_bfi; +#endif Word8 T_bfi_fx; Word16 Transient[MAX_POST_LEN]; @@ -194,14 +197,18 @@ typedef struct Word32 ener_mean_fx; Word32 ener_fx; +#ifndef NONBE_FIX_1402_WAVEADJUST Word16 zp; +#endif Word16 zp_fx; Word16 recovery_gain; /*outside waveformadjustment: Q14 - insinde waveformadjustment: Q15*/ Word16 step_concealgain_fx; Word16 concealment_method; +#ifndef NONBE_FIX_1402_WAVEADJUST Word16 subframe; +#endif Word16 subframe_fx; Word16 nbLostCmpt; diff --git a/lib_dec/waveadjust_fec_dec_fx.c b/lib_dec/waveadjust_fec_dec_fx.c index 80241a24c9f79d528f9c4e7004e9ab7a54348e6a..c1d9da1f73f91ff55b648d3fc20e9573b9a8639b 100644 --- a/lib_dec/waveadjust_fec_dec_fx.c +++ b/lib_dec/waveadjust_fec_dec_fx.c @@ -833,12 +833,16 @@ void concealment_init_ivas_fx( move16(); hPlcInfo->FrameSize = L_frameTCX; move16(); +#ifndef NONBE_FIX_1402_WAVEADJUST hPlcInfo->Pitch = 0; move16(); +#endif hPlcInfo->Pitch_fx = 0; move16(); +#ifndef NONBE_FIX_1402_WAVEADJUST hPlcInfo->T_bfi = 0; move16(); +#endif hPlcInfo->T_bfi_fx = 0; move16(); hPlcInfo->outx_new_n1_fx = 0; @@ -849,8 +853,10 @@ void concealment_init_ivas_fx( move16(); hPlcInfo->ener_mean_fx = L_deposit_l( 15213 ); hPlcInfo->ener_fx = L_deposit_l( 0 ); +#ifndef NONBE_FIX_1402_WAVEADJUST hPlcInfo->zp = L_frameTCX; move16(); +#endif hPlcInfo->zp_fx = L_frameTCX; move16(); hPlcInfo->recovery_gain = 0; @@ -859,8 +865,10 @@ void concealment_init_ivas_fx( move16(); hPlcInfo->concealment_method = TCX_NONTONAL; move16(); +#ifndef NONBE_FIX_1402_WAVEADJUST hPlcInfo->subframe = 0; move16(); +#endif hPlcInfo->subframe_fx = 0; move16(); hPlcInfo->nbLostCmpt = (Word16) L_deposit_l( 0 );