From abf38678810eff7b0aa6157681472564304b30a4 Mon Sep 17 00:00:00 2001 From: det Date: Mon, 13 Jan 2025 13:15:22 +0100 Subject: [PATCH 1/3] UNABLE TO PATCH MR1276 into main-pc. --- lib_com/options.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_com/options.h b/lib_com/options.h index a914c8e66..aa07af880 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -101,5 +101,6 @@ #define FIX_1109_OPTIM_MCT_STEREO_IGF_DEC /* FhG: optimize mctStereoIGF_dec_fx() */ #define FIX_1110_OPTIM_DIRAC_DECORR_PROC /* FhG: optimize ivas_dirac_dec_decorr_process() */ #define FIX_1100_REMOVE_LPC_RESCALING /* VA: Remove the rescaling of LPC coefficient to Q12 as residu and syn-filt are already taking care of it*/ +#define NONBE_FIX_931_IGF_STEREO_DEC_NOISE /* FhG: issue #931: fix noise substitution in the stereo IGF decoder */ #endif -- GitLab From b1b0d9639bad6cdcd3b9ad863792ce643aac863f Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 1 Apr 2025 15:09:41 +0200 Subject: [PATCH 2/3] port fix 1117 from float repo igf stereo TCX noise filling substitution done on the wrong spectra --- lib_dec/igf_dec_fx.c | 56 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/lib_dec/igf_dec_fx.c b/lib_dec/igf_dec_fx.c index 5bfa7476a..694eef3f2 100644 --- a/lib_dec/igf_dec_fx.c +++ b/lib_dec/igf_dec_fx.c @@ -895,10 +895,10 @@ static void IGF_prepStereo( Word16 *igf_specL_e_arr, /* i/o: prepared left IGF spectrum exponents for each index */ Word32 *igf_specR_fx, /* i/o: prepared right IGF spectrum */ Word16 *igf_specR_e_arr, /* i/o: prepared right IGF spectrum exponents for each index */ - const Word32 *src_specL_fx, /* i : left source spectrum */ - const Word16 src_specL_e, /* i : left source spectrum exp */ - const Word32 *src_specR_fx, /* i : right source spectrum */ - const Word16 src_specR_e, /* i : right source spectrum exp */ + Word32 *src_specL_fx, /* i : left source spectrum */ + Word16 src_specL_e, /* i : left source spectrum exp */ + Word32 *src_specR_fx, /* i : right source spectrum */ + Word16 src_specR_e, /* i : right source spectrum exp */ const Word16 *coreMsMask /* i : line wise ms Mask Q0 */ ) { @@ -964,6 +964,17 @@ static void IGF_prepStereo( { IF( hPrivateDataL->n_noise_bands_off ) { +#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE + IGF_replaceTCXNoise_2_new_ivas( src_specL_fx, + src_specL_e, + TCXNoiseL, + strt_cpy, + stop, + hPrivateDataL->totalNoiseNrg_off, + hPrivateDataL->totalNoiseNrg_off_exp, + hPrivateDataL->n_noise_bands_off, + hInfoL->nfSeed ); +#else IGF_replaceTCXNoise_2_new_ivas_with_var_shift( igf_specL_fx, igf_specL_e_arr, TCXNoiseL, @@ -973,6 +984,7 @@ static void IGF_prepStereo( hPrivateDataL->totalNoiseNrg_off_exp, hPrivateDataL->n_noise_bands_off, hInfoL->nfSeed ); +#endif } selectionL = 1; move16(); @@ -999,6 +1011,17 @@ static void IGF_prepStereo( { IF( hPrivateDataR->n_noise_bands_off ) { +#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE + IGF_replaceTCXNoise_2_new_ivas( src_specR_fx, + src_specR_e, + TCXNoiseR, + strt_cpy, + stop, + hPrivateDataR->totalNoiseNrg_off, + hPrivateDataR->totalNoiseNrg_off_exp, + hPrivateDataR->n_noise_bands_off, + hInfoR->nfSeed ); +#else IGF_replaceTCXNoise_2_new_ivas_with_var_shift( igf_specR_fx, igf_specR_e_arr, TCXNoiseR, @@ -1008,6 +1031,7 @@ static void IGF_prepStereo( hPrivateDataR->totalNoiseNrg_off_exp, hPrivateDataR->n_noise_bands_off, hInfoR->nfSeed ); +#endif } selectionR = 1; move16(); @@ -1129,6 +1153,17 @@ static void IGF_prepStereo( { IF( hPrivateDataL->n_noise_bands_off ) { +#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE + IGF_replaceTCXNoise_2_new_ivas( src_specL_fx, + src_specL_e, + TCXNoiseL, + strt_cpy, + stop, + hPrivateDataL->totalNoiseNrg_off, + hPrivateDataL->totalNoiseNrg_off_exp, + hPrivateDataL->n_noise_bands_off, + hInfoL->nfSeed ); +#else IGF_replaceTCXNoise_2_new_ivas_with_var_shift( igf_specL_fx, igf_specL_e_arr, TCXNoiseL, @@ -1138,6 +1173,7 @@ static void IGF_prepStereo( hPrivateDataL->totalNoiseNrg_off_exp, hPrivateDataL->n_noise_bands_off, hInfoL->nfSeed ); +#endif } selectionL = 1; move16(); @@ -1164,6 +1200,17 @@ static void IGF_prepStereo( { IF( hPrivateDataR->n_noise_bands_off ) { +#ifdef NONBE_FIX_931_IGF_STEREO_DEC_NOISE + IGF_replaceTCXNoise_2_new_ivas( src_specR_fx, + src_specR_e, + TCXNoiseR, + strt_cpy, + stop, + hPrivateDataR->totalNoiseNrg_off, + hPrivateDataR->totalNoiseNrg_off_exp, + hPrivateDataR->n_noise_bands_off, + hInfoR->nfSeed ); +#else IGF_replaceTCXNoise_2_new_ivas_with_var_shift( igf_specR_fx, igf_specR_e_arr, TCXNoiseR, @@ -1173,6 +1220,7 @@ static void IGF_prepStereo( hPrivateDataR->totalNoiseNrg_off_exp, hPrivateDataR->n_noise_bands_off, hInfoR->nfSeed ); +#endif } selectionR = 1; move16(); -- GitLab From 300da65aa177e81d581fc85562c79552891731f0 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 1 Apr 2025 15:28:24 +0200 Subject: [PATCH 3/3] make exponents for src spec const again --- lib_dec/igf_dec_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/igf_dec_fx.c b/lib_dec/igf_dec_fx.c index 694eef3f2..c39c69752 100644 --- a/lib_dec/igf_dec_fx.c +++ b/lib_dec/igf_dec_fx.c @@ -896,9 +896,9 @@ static void IGF_prepStereo( Word32 *igf_specR_fx, /* i/o: prepared right IGF spectrum */ Word16 *igf_specR_e_arr, /* i/o: prepared right IGF spectrum exponents for each index */ Word32 *src_specL_fx, /* i : left source spectrum */ - Word16 src_specL_e, /* i : left source spectrum exp */ + const Word16 src_specL_e, /* i : left source spectrum exp */ Word32 *src_specR_fx, /* i : right source spectrum */ - Word16 src_specR_e, /* i : right source spectrum exp */ + const Word16 src_specR_e, /* i : right source spectrum exp */ const Word16 *coreMsMask /* i : line wise ms Mask Q0 */ ) { -- GitLab