diff --git a/lib_com/options.h b/lib_com/options.h index 85f0ed654088090f2401b332b246d0267063b567..46e386b5c1a5bfdeac0a311d7a2bc71497cce205 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -94,6 +94,7 @@ #define FIX1998_APA_EXEC_SCALING /* FhG: fix scaling of apa_exec_ivas_fx(); avoid continuously worse scaling with previous data */ #define FIX2007_BASSPSFILTER_OVERFLOW /* FhG: use saturing operator, to avoid overflow in bass_psfilter_fx() */ +#define FIX_2009_HIGH_NOISE_FLOOR_FOR_FX_DEC /* FhG: Corrected the q_input in the input of generate_masking_noise_dirac_ivas_fx() */ /* #################### Start BASOP porting switches ############################ */ #define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ diff --git a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c index be1f5b9ce463ecc7f52917e75533d6099d5ae4b6..bb6cf805115c5d986cd785345558cf00c2532964 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c @@ -817,7 +817,11 @@ static void ivas_dirac_dec_binaural_internal_fx( slot, st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->hSCE[0]->hCoreCoder[0]->flag_cna, ( st_ivas->hSCE[0]->hCoreCoder[0]->core_brate == FRAME_NO_DATA || st_ivas->hSCE[0]->hCoreCoder[0]->core_brate == SID_2k40 ) && ( st_ivas->hSCE[0]->hCoreCoder[0]->cng_type == FD_CNG ) && st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag, +#ifdef FIX_2009_HIGH_NOISE_FLOOR_FOR_FX_DEC + st_ivas->hTcBuffer->q_tc_fx, &q_cldfb[2][slot] ); +#else 11, &q_cldfb[2][slot] ); +#endif generate_masking_noise_dirac_ivas_fx( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom, st_ivas->cldfbAnaDec[1], /*nothing will be analyzed, just get cnst*/ @@ -852,11 +856,18 @@ static void ivas_dirac_dec_binaural_internal_fx( { Cldfb_RealBuffer_in_fx[0][slot][b] = Mpy_32_16_1( Cldfb_RealBuffer_in_fx[0][slot][b], 23170 ); Cldfb_RealBuffer_in_fx[1][slot][b] = L_add( L_add( Cldfb_RealBuffer_in_fx[0][slot][b], L_shr( Cldfb_RealBuffer_in_fx[1][slot][b], 1 ) ), Cldfb_RealBuffer_in_fx[0][slot][b] ); +#ifdef FIX_2009_HIGH_NOISE_FLOOR_FOR_FX_DEC + Cldfb_RealBuffer_in_fx[0][slot][b] = L_add( Cldfb_RealBuffer_in_fx[0][slot][b], L_shr( Cldfb_RealBuffer_in_fx[2][slot][b], add( sub( q_cldfb[2][slot], q_input ), 6 ) ) ); +#else Cldfb_RealBuffer_in_fx[0][slot][b] = L_add( Cldfb_RealBuffer_in_fx[0][slot][b], L_shr( Cldfb_RealBuffer_in_fx[2][slot][b], 1 ) ); - +#endif Cldfb_ImagBuffer_in_fx[0][slot][b] = Mpy_32_16_1( Cldfb_ImagBuffer_in_fx[0][slot][b], 23170 ); Cldfb_ImagBuffer_in_fx[1][slot][b] = L_add( Cldfb_ImagBuffer_in_fx[0][slot][b], L_shr( Cldfb_ImagBuffer_in_fx[1][slot][b], 1 ) ); +#ifdef FIX_2009_HIGH_NOISE_FLOOR_FOR_FX_DEC + Cldfb_ImagBuffer_in_fx[0][slot][b] = L_add( Cldfb_ImagBuffer_in_fx[0][slot][b], L_shr( Cldfb_ImagBuffer_in_fx[2][slot][b], add( sub( q_cldfb[2][slot], q_input ), 6 ) ) ); +#else Cldfb_ImagBuffer_in_fx[0][slot][b] = L_add( Cldfb_ImagBuffer_in_fx[0][slot][b], L_shr( Cldfb_ImagBuffer_in_fx[2][slot][b], 1 ) ); +#endif move32(); move32(); move32();