From 2bf4f1fd99229a93919504bf1702ed7d1c17459f Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Fri, 19 Apr 2024 13:51:11 +0200 Subject: [PATCH 1/2] fix for issue 723, set the correct InfoTCXNoise buffer for the IGF noise filling --- lib_com/options.h | 2 ++ lib_dec/dec_tcx_fx.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 3536ef9cc..793d8e74e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -113,6 +113,8 @@ #define CR_2109_to_2112_cd0_ce0 /* This is related to the CRs include in the 26.444 package of 21-12. Concerns lead_deindexing and */ +#define FIX_ISSUE_723_INFO_TCX_NOISE /*FhG: Issue 723: fix for IGF that introduces wrong noise filling behavion*/ + /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/dec_tcx_fx.c b/lib_dec/dec_tcx_fx.c index acdba363c..855e390a4 100644 --- a/lib_dec/dec_tcx_fx.c +++ b/lib_dec/dec_tcx_fx.c @@ -4352,6 +4352,7 @@ void decoder_tcx_noisefilling_fx( nf_seed = extract_l( tmp32 ); } +#ifndef FIX_ISSUE_723_INFO_TCX_NOISE pInfoTCXNoise = NULL; Word16 tmp_infoTCXNoiseBuf[IGF_START_MX]; if ( st->igf ) @@ -4363,14 +4364,28 @@ void decoder_tcx_noisefilling_fx( pInfoTCXNoise = tmp_infoTCXNoiseBuf; move16(); } +#else + if ( st->igf ) + { + pInfoTCXNoise = st->hIGFDec->infoTCXNoise_evs; + move16(); + } +#endif tcx_noise_filling_with_shift( x, x_e, nf_seed, firstLine, noiseFillingSize, noiseTransWidth, L_frame, noiseTiltFactor, fac_ns, pInfoTCXNoise, st->element_mode ); + +#ifndef FIX_ISSUE_723_INFO_TCX_NOISE if ( pInfoTCXNoise ) { for ( int j = 0; j < IGF_START_MX; j++ ) { +#ifndef FIX_ISSUE_723_INFO_TCX_NOISE st->hIGFDec->infoTCXNoise[j] = (UWord8) tmp_infoTCXNoiseBuf[j]; +#else + st->hIGFDec->infoTCXNoise_evs[j] = (UWord8) tmp_infoTCXNoiseBuf[j]; +#endif } } +#endif st->seed_tcx_plc = nf_seed; move16(); -- GitLab From b1a703d26ade04b2ad7f04f90565acd71c4cbbdf Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Mon, 22 Apr 2024 10:11:28 -0400 Subject: [PATCH 2/2] fix initialization issue crashing decoder --- lib_dec/dec_tcx_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/dec_tcx_fx.c b/lib_dec/dec_tcx_fx.c index 855e390a4..380fa6734 100644 --- a/lib_dec/dec_tcx_fx.c +++ b/lib_dec/dec_tcx_fx.c @@ -4352,8 +4352,8 @@ void decoder_tcx_noisefilling_fx( nf_seed = extract_l( tmp32 ); } -#ifndef FIX_ISSUE_723_INFO_TCX_NOISE pInfoTCXNoise = NULL; +#ifndef FIX_ISSUE_723_INFO_TCX_NOISE Word16 tmp_infoTCXNoiseBuf[IGF_START_MX]; if ( st->igf ) { -- GitLab