Commit bfde19ea authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Adjust the exponent of hFdCngCom->olapBufferSynth2 in generate_masking_noise_ivas_fx()

parent fbaf40cc
Loading
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1645,9 +1645,7 @@ ivas_error acelp_core_dec_fx(
                                generate_masking_noise_ivas_fx( psyn_32_fx, &exp, st->hFdCngDec->hFdCngCom, st->hFdCngDec->hFdCngCom->frameSize, 0, 0, 0, st->element_mode, hStereoCng, nchan_out );

                                Copy_Scale_sig_32_16( psyn_32_fx, psyn_fx, st->hFdCngDec->hFdCngCom->frameSize, sub( st->Q_syn, exp ) ); // Q = st->Q_syn
#ifdef FIX_REMOVE_SYNTH2_FX
                                Scale_sig( st->hFdCngDec->hFdCngCom->olapBufferSynth2, shl( st->hFdCngDec->hFdCngCom->frameSize, 1 ), Q1 );
#else
#ifndef FIX_REMOVE_SYNTH2_FX
                                Copy_Scale_sig_32_16( st->hFdCngDec->hFdCngCom->olapBufferSynth2_fx, st->hFdCngDec->hFdCngCom->olapBufferSynth2, shl( st->hFdCngDec->hFdCngCom->frameSize, 1 ), -Q15 ); // Q0
#endif
                            }
+2 −2
Original line number Diff line number Diff line
@@ -4646,9 +4646,9 @@ void generate_masking_noise_ivas_fx(
    {
#ifdef FIX_REMOVE_SYNTH2_FX
        Word32 olapBufferSynth2_fx[FFTLEN];
        Copy_Scale_sig_16_32_no_sat( hFdCngCom->olapBufferSynth2, olapBufferSynth2_fx, FFTLEN, Q8 );
        Copy_Scale_sig_16_32_no_sat( hFdCngCom->olapBufferSynth2, olapBufferSynth2_fx, FFTLEN, Q15 );
        SynthesisSTFT_fx( fftBuffer_fx, maskingNoise_fx, olapBufferSynth2_fx, hFdCngCom->olapWinSyn_fx, 0, hFdCngCom, element_mode, nchan_out );
        Copy_Scale_sig_32_16( olapBufferSynth2_fx, hFdCngCom->olapBufferSynth2, FFTLEN, -Q8 );
        Copy_Scale_sig_32_16( olapBufferSynth2_fx, hFdCngCom->olapBufferSynth2, FFTLEN, -Q15 );
#else
        SynthesisSTFT_fx( fftBuffer_fx, maskingNoise_fx, hFdCngCom->olapBufferSynth2_fx, hFdCngCom->olapWinSyn_fx, 0, hFdCngCom, element_mode, nchan_out );
#endif
+1 −3
Original line number Diff line number Diff line
@@ -875,9 +875,7 @@ void stereo_tcx_core_dec_fx(
                Copy_Scale_sig_16_32_no_sat( signal_out_fx, signal_out_32_fx, st->hFdCngDec->hFdCngCom->frameSize, Q6 );
                generate_masking_noise_ivas_fx( signal_out_32_fx, &exp, st->hFdCngDec->hFdCngCom, st->hFdCngDec->hFdCngCom->frameSize, 0, 0, 0, st->element_mode, hStereoCng, nchan_out );
                Copy_Scale_sig_32_16( signal_out_32_fx, signal_out_fx, st->hFdCngDec->hFdCngCom->frameSize, negate( exp ) ); // Q0
#ifdef FIX_REMOVE_SYNTH2_FX
                Scale_sig( st->hFdCngDec->hFdCngCom->olapBufferSynth2, shl( st->hFdCngDec->hFdCngCom->frameSize, 1 ), -Q1 );
#else
#ifndef FIX_REMOVE_SYNTH2_FX
                Copy_Scale_sig_32_16( st->hFdCngDec->hFdCngCom->olapBufferSynth2_fx, st->hFdCngDec->hFdCngCom->olapBufferSynth2, shl( st->hFdCngDec->hFdCngCom->frameSize, 1 ), -Q15 ); // Q0
#endif
            }