acelp_core_dec_fx(): ApplyFdCng_fx() called twice for IVAS_CPE_DFT
# Basic info <!--- Add commit SHA used to reproduce--> - Fixed point: - Encoder (fixed): 9db396b3b378435d188bd4f574c4d45ae5b77ff6 - Decoder (fixed): 9db396b3b378435d188bd4f574c4d45ae5b77ff6 # Bug description In `acelp_core_dec_fx()`, the function `ApplyFdCng_fx()` is apparently called twice in case of `st->element_mode == IVAS_CPE_DFT` in the BASOP code: **Float:** ``` if ( st->element_mode == IVAS_CPE_DFT ) { assert( nchan_out == 1 ); for ( i = 0; i < NPART; i++ ) { st->hFdCngDec->hFdCngCom->sidNoiseEstLp[i] = STEREO_DFT_FD_FILT * st->hFdCngDec->hFdCngCom->sidNoiseEstLp[i] + ( 1 - STEREO_DFT_FD_FILT ) * st->hFdCngDec->hFdCngCom->sidNoiseEst[i]; } ApplyFdCng( syn, NULL, realBuffer, imagBuffer, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) ); } ``` **BASOP:** ``` IF( EQ_16( st->element_mode, IVAS_CPE_DFT ) ) { assert( nchan_out == 1 ); FOR( i = 0; i < NPART; i++ ) { st->hFdCngDec->hFdCngCom->sidNoiseEstLp[i] = Madd_32_32( Mpy_32_32( STEREO_DFT_FD_FILT_Q31, st->hFdCngDec->hFdCngCom->sidNoiseEstLp[i] ), STEREO_DFT_FD_FILT_COMP_Q31, st->hFdCngDec->hFdCngCom->sidNoiseEst[i] ); move32(); } ApplyFdCng_fx( psyn_fx, st->Q_syn, NULL, 0, realBuffer_fx, imagBuffer_fx, NULL, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) ); Word16 new_sidNoiseEstExp = 31 - Q4; move16(); Scale_sig32( st->hFdCngDec->hFdCngCom->sidNoiseEstLp, NPART, sub( st->hFdCngDec->hFdCngCom->sidNoiseEstExp, new_sidNoiseEstExp ) ); // Q(31-sidNoiseEstExp) Scale_sig32( st->hFdCngDec->hFdCngCom->sidNoiseEst, NPART, sub( st->hFdCngDec->hFdCngCom->sidNoiseEstExp, new_sidNoiseEstExp ) ); // Q(31-sidNoiseEstExp) st->hFdCngDec->hFdCngCom->sidNoiseEstExp = new_sidNoiseEstExp; move16(); Word16 new_cngNoiseLevelExp = 31 - Q4; move16(); Scale_sig32( st->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN, sub( st->hFdCngDec->hFdCngCom->cngNoiseLevelExp, new_cngNoiseLevelExp ) ); // Q(31-cngNoiseLevelExp) st->hFdCngDec->hFdCngCom->cngNoiseLevelExp = new_cngNoiseLevelExp; move16(); test(); ApplyFdCng_fx( psyn_fx, st->Q_syn, NULL, 0, realBuffer_fx, imagBuffer_fx, NULL, st, 0, ( EQ_16( st->coder_type, AUDIO ) && !st->GSC_noisy_speech ) ); IF( st->hFdCngDec->hFdCngCom->cngNoiseLevelExp < 0 ) { Scale_sig32( st->hFdCngDec->hFdCngCom->cngNoiseLevel, FFTCLDFBLEN, st->hFdCngDec->hFdCngCom->cngNoiseLevelExp ); // Q(31-cngNoiseLevelExp) st->hFdCngDec->hFdCngCom->cngNoiseLevelExp = 0; move16(); } } ``` <!--- Below are labels that will be added but are not shown in description. This is a template to help fill them. Add further information to the first row and remove and add labels as necessary.-->
issue