Commit 508f6326 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Revert changes in SynthesisSTFT_dirac_fx()

parent c42dc44e
Loading
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -3241,8 +3241,7 @@ void SynthesisSTFT_fx(
void SynthesisSTFT_dirac_fx(
    Word32 *fftBuffer,
    /* i  : FFT bins */ // hFdCngCom->fftBuffer_exp
    Word16 *timeDomainOutput,
    // Word32 *timeDomainOutput,
    Word32 *timeDomainOutput,
    Word32 *olapBuffer, // Q_in
    const Word16 *olapWin,
    const Word16 samples_out,
@@ -3299,13 +3298,7 @@ void SynthesisSTFT_dirac_fx(
    }

    /* Get time-domain signal */
    Copy_Scale_sig_32_16( olapBuffer + shr( hFdCngCom->frameSize, 2 ), timeDomainOutput, samples_out, -Q15 ); // Q_in - 15
    FOR( i = 0; i < samples_out; i++ )
    {
        timeDomainOutput[i] = extract_l( Mpy_32_16_1( fftScale, timeDomainOutput[i] ) );
        move16();
    }
    // v_multc_fx( olapBuffer + shr( hFdCngCom->frameSize, 2 ), fftScale, timeDomainOutput, samples_out );       // Q_in - 9
    v_multc_fx( olapBuffer + shr( hFdCngCom->frameSize, 2 ), fftScale, timeDomainOutput, samples_out );       // Q_in - 9

    /* Get excitation */
    v_multc_fx( olapBuffer + sub( shr( hFdCngCom->frameSize, 2 ), ( M + 1 ) ), fftScale, buf, add( M + 1, hFdCngCom->frameSize ) );
+1 −2
Original line number Diff line number Diff line
@@ -9814,8 +9814,7 @@ void generate_masking_noise_ivas_fx(

void SynthesisSTFT_dirac_fx(
    Word32 *fftBuffer, /* i  : FFT bins */
    Word16 *timeDomainOutput,
    // Word32 *timeDomainOutput,
    Word32 *timeDomainOutput,
    Word32 *olapBuffer,
    const Word16 *olapWin,
    const Word16 samples_out,
+8 −2
Original line number Diff line number Diff line
@@ -4972,7 +4972,10 @@ void generate_masking_noise_lb_dirac_fx(
                move32();

                /* Perform STFT synthesis */
                SynthesisSTFT_dirac_fx( fftBuffer, tdBuffer + n_samples_start, hFdCngCom->olapBufferSynth2, hFdCngCom->olapWinSyn_fx, n_samples_out_loop, hFdCngCom );
                Word32 olapBufferSynth2_fx[FFTLEN]; /*Q_olapBufferSynth2*/
                Copy_Scale_sig_16_32_no_sat( hFdCngCom->olapBufferSynth2, olapBufferSynth2_fx, FFTLEN, Q15 );
                SynthesisSTFT_dirac_fx( fftBuffer, tdBuffer + n_samples_start, olapBufferSynth2_fx, hFdCngCom->olapWinSyn_fx, n_samples_out_loop, hFdCngCom );
                Copy_Scale_sig_32_16( olapBufferSynth2_fx, hFdCngCom->olapBufferSynth2, FFTLEN, -Q15 );
                // SynthesisSTFT_dirac_fx( fftBuffer, tdBuffer + n_samples_start, hFdCngCom->olapBufferSynth2_fx, hFdCngCom->olapWinSyn_fx, n_samples_out_loop, hFdCngCom );
                scale_sig32( tdBuffer + n_samples_start, n_samples_out_loop, Q9 ); // Q2 -> Q11
            }
@@ -4984,7 +4987,10 @@ void generate_masking_noise_lb_dirac_fx(

                set32_fx( fftBuffer, 0, hFdCngCom->fftlen );
                /* Perform STFT synthesis */
                SynthesisSTFT_dirac_fx( fftBuffer, tdBuffer + n_samples_start, hFdCngCom->olapBufferSynth2, hFdCngCom->olapWinSyn_fx, n_samples_out_loop, hFdCngCom );
                Word32 olapBufferSynth2_fx[FFTLEN]; /*Q_olapBufferSynth2*/
                Copy_Scale_sig_16_32_no_sat( hFdCngCom->olapBufferSynth2, olapBufferSynth2_fx, FFTLEN, Q15 );
                SynthesisSTFT_dirac_fx( fftBuffer, tdBuffer + n_samples_start, olapBufferSynth2_fx, hFdCngCom->olapWinSyn_fx, n_samples_out_loop, hFdCngCom );
                Copy_Scale_sig_32_16( olapBufferSynth2_fx, hFdCngCom->olapBufferSynth2, FFTLEN, -Q15 );
                // SynthesisSTFT_dirac_fx( fftBuffer, tdBuffer + n_samples_start, hFdCngCom->olapBufferSynth2_fx, hFdCngCom->olapWinSyn_fx, n_samples_out_loop, hFdCngCom );
            }
            hFdCngCom->fftBuffer_exp = 31 - 11;