From bbdeb03c2cd6ac1d5759dadf088a7d72df1ccf1e Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 23 Apr 2024 12:29:30 +0530 Subject: [PATCH] [non-BE] 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 | 16 +++++++++++++++- lib_dec/ivas_mc_param_dec.c | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 3fb633b7f..ae0d5eb98 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 9f19d4396..1e729c7d9 100644 --- a/lib_dec/dec_tcx_fx.c +++ b/lib_dec/dec_tcx_fx.c @@ -4354,6 +4354,7 @@ void decoder_tcx_noisefilling_fx( } pInfoTCXNoise = NULL; +#ifndef FIX_ISSUE_723_INFO_TCX_NOISE Word16 tmp_infoTCXNoiseBuf[IGF_START_MX]; if ( st->igf ) { @@ -4364,15 +4365,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(); } diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 23f2cbeb9..c57ddaac4 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -471,7 +471,7 @@ ivas_error ivas_param_mc_dec_open( /* output synthesis */ #ifdef IVAS_FLOAT_FIXED - floatToFixed_arrL( proto_matrix, proto_matrix_fx ,Q30,64); + floatToFixed_arrL( proto_matrix, proto_matrix_fx, Q30, MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS ); if ( ( error = ivas_dirac_dec_output_synthesis_cov_open_fx( &( hParamMC->h_output_synthesis_params ), &( hParamMC->h_output_synthesis_cov_state ), hParamMC->max_band_decorr, PARAM_MC_MAX_NSLOTS, hParamMC->hMetadataPMC->num_parameter_bands, max_param_band_residual, nchan_transport, nchan_out_cov, proto_matrix_fx ) ) != IVAS_ERR_OK ) { return error; -- GitLab