Commit ac6a8c27 authored by norvell's avatar norvell
Browse files

Merge branch 'main' into fix-usan-l-deposit-h

parents 9d3a3315 b4c3b18f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -759,6 +759,7 @@ enum
#define PIT_FIR_SIZE6_2                     ( PIT_UP_SAMP6 * PIT_L_INTERPOL6_2 + 1 )
#define E_MIN                               0.0035f                /* minimum allowable energy */
#define E_MIN_Q11_FX                            7                      /* minimum allowable energy in Q11*/
#define E_MIN_Q27_FX                            469762                      /* minimum allowable energy in Q27*/
#define STEP_DELTA                          0.0625f                /* quantization step for tilt compensation of gaussian cb. excitation */
#define GAMMA_EV                            0.92f                  /* weighting factor for core synthesis error weighting */
#define FORMANT_SHARPENING_NOISE_THRESHOLD  21.0f                  /* lp_noise level above which formant sharpening is deactivated */
+123 −49
Original line number Diff line number Diff line
@@ -120,6 +120,8 @@ void ivas_initFdCngCom_fx( HANDLE_FD_CNG_COM hFdCngCom, Word16 scale )
    move16();
    hFdCngCom->CngBitrate = -1;
    move16();
    hFdCngCom->olapBufferSynth_exp = 0;
    move16();

    /* Initialize noise estimation algorithm */
    set32_fx( hFdCngCom->periodog, 0, PERIODOGLEN );
@@ -481,6 +483,54 @@ void expand_range(
    move16();
}

void expand_range_fx(
    Word32 *in,  // Q25
    Word32 *out, // exp:out_exp
    Word16 *out_exp,
    const Word16 len )
{
    Word16 i, tmp_e;
    Word32 maxVal, tmp32;
    Word16 maxOutExp;

    const Word32 low_lim = 726940; /* 0.0003385080526823181f in Q31 */
    move32();

    /* Find max possible output exponent. */
    maxVal = 0;
    move32();
    FOR( i = 0; i < len; i++ )
    {
        maxVal = L_max( maxVal, in[i] );
    }
    tmp32 = BASOP_util_Pow2( maxVal, Q31 - Q25, &tmp_e );
    maxOutExp = tmp_e;
    move16();

    /* out = (2^(in) - 1) */
    FOR( i = 0; i < len; i++ )
    {
        tmp32 = BASOP_util_Pow2( in[i], Q31 - Q25, &tmp_e );  // 2^x
        tmp32 = L_sub( tmp32, L_shl( 1, sub( 31, tmp_e ) ) ); // 2^x - 1
        tmp32 = L_shr( tmp32, sub( maxOutExp, tmp_e ) );      // make exp same as maxExpOut

        out[i] = tmp32;
        move32();

        Word32 tmp_low_lim = L_shr( low_lim, maxOutExp );
        if ( LT_32( out[i], tmp_low_lim ) )
        {
            out[i] = tmp_low_lim;
            move32();
        }
    }

    *out_exp = maxOutExp;
    move16();

    return;
}

/*-------------------------------------------------------------------
 * expand_range_var_e()
 *
@@ -1143,10 +1193,10 @@ void minimum_statistics(
void minimum_statistics_fx(
    Word16 len,                    /* i  : Total number of partitions (CLDFB or FFT)                   */
    Word16 lenFFT,                 /* i  : Number of FFT partitions                                  */
    Word16 *psize,                 /* i  : Partition sizes, fractional                               */
    Word16 *psize,                 /* i  : Partition sizes, fractional                             Q9*/
    Word16 *msPeriodog,            /* i  : Periodogram (energies)                                    */
    Word16 *msNoiseFloor,          /* i/o: Noise floors (energies)                                   */
    Word16 *msNoiseEst,            /* i/o: Noise estimates (energies)                                */
    Word32 *msNoiseFloor,          /* i/o: Noise floors (energies)                                Q25*/
    Word32 *msNoiseEst,            /* i/o: Noise estimates (energies)                             Q25*/
    Word32 *msAlpha,               /* i/o: Forgetting factors                                        */
    Word16 *msPsd,                 /* i/o: Power Spectral Density (smoothed periodogram => energies) */
    Word16 *msPsdFirstMoment,      /* i/o: PSD statistics of 1st order (energy means)                */
@@ -1221,8 +1271,8 @@ void minimum_statistics_fx(
    IF( LT_16( hFdCngCom->msFrCnt_init_counter, hFdCngCom->msFrCnt_init_thresh ) )
    {
        Copy( msPeriodog, msPsd, len );                                    /* 6Q9 */
        Copy( msPeriodog, msNoiseFloor, len );     /* 6Q9 */
        Copy( msPeriodog, msNoiseEst, len );       /* 6Q9 */
        Copy_Scale_sig_16_32_no_sat( msPeriodog, msNoiseFloor, len, Q16 ); /* Q25 */
        Copy_Scale_sig_16_32_no_sat( msPeriodog, msNoiseEst, len, Q16 );   /* Q25 */
        Copy( msPeriodog, msPsdFirstMoment, len );                         /* 6Q9 */

        set32_fx( msPsdSecondMoment, 0l /*0.0 Q31*/, len );
@@ -1333,7 +1383,16 @@ void minimum_statistics_fx(
            /* Compute SNR */

            /* msPeriodogSum[cnt] with format 16Q15 */
            snr = dotp_s_fx( msNoiseFloor + start, psize + start, current_len, CNG_HS );
            Word16 msNoiseFloor16tmp[NPART_SHAPING];
            IF( enc_dec == ENC )
            {
                Copy_Scale_sig32_16( msNoiseFloor, msNoiseFloor16tmp, NPART, 0 );
            }
            ELSE
            {
                Copy_Scale_sig32_16( msNoiseFloor, msNoiseFloor16tmp, NPART_SHAPING, 0 );
            }
            snr = dotp_s_fx( &msNoiseFloor16tmp[start], psize + start, current_len, CNG_HS );

            IF( GT_32( L_shr( Mpy_32_16_1( msPsdSum[cnt], 18431 /*0.56246299817 Q15*/ ), 13 ), snr ) )
            {
@@ -1364,16 +1423,16 @@ void minimum_statistics_fx(
                    /* calculate scalar2 with normalized msNoiseFloor[j], exponent -2*s1 */
                    s1 = WORD16_BITS - 1;
                    move16();
                    if ( msNoiseFloor[j] != 0 )
                    if ( msNoiseFloor16tmp[j] != 0 )
                    {
                        s1 = norm_s( msNoiseFloor[j] );
                        s1 = norm_s( msNoiseFloor16tmp[j] );
                    }
                    msNoiseFloor16 = shl( msNoiseFloor[j], s1 );
                    msNoiseFloor16 = shl( msNoiseFloor16tmp[j], s1 );
                    scalar2 = L_mult( msNoiseFloor16, msNoiseFloor16 );

                    /* calculate difference, both elements in 6Q9 format, use absolute value
                       to avoid -1.0 x -1.0 multiplications later */
                    scalar316 = abs_s( sub( msPsd[j], msNoiseFloor[j] ) );
                    scalar316 = abs_s( sub( msPsd[j], msNoiseFloor16tmp[j] ) );

                    s2 = WORD16_BITS - 1;
                    move16();
@@ -1473,7 +1532,7 @@ void minimum_statistics_fx(

                IF( msNoiseFloor[j] != 0 /*0.0 Q15*/ )
                {
                    tmp = L_mult( msNoiseFloor[j], msNoiseFloor[j] );
                    tmp = Mpy_32_32( msNoiseFloor[j], msNoiseFloor[j] );
                    tmp16 = BASOP_Util_Divide3232_uu_1616_Scale( msPsdSecondMoment[j], tmp, &s );
                    /* consider factor of 2 */
                    s = s_min( s_max( sub( s, 1 ), -( WORD16_BITS - 1 ) ), ( WORD16_BITS - 1 ) );
@@ -1584,7 +1643,7 @@ void minimum_statistics_fx(
                }
            }
            /* Get the current noise floor */
            Copy_Scale_sig_32_16( msCurrentMinOut, msNoiseFloor, len, -16 );
            Copy32( msCurrentMinOut, msNoiseFloor, len );
        }
        ELSE /* sub window complete */
        {
@@ -1642,7 +1701,7 @@ void minimum_statistics_fx(
                set32_fx( msCurrentMin, 2147483647l /*1.0 Q31*/, len );

                /* Get the current noise floor */
                Copy_Scale_sig_32_16( msCurrentMinOut, msNoiseFloor, len, -16 );
                Copy32( msCurrentMinOut, msNoiseFloor, len );
            }
        }

@@ -1699,18 +1758,19 @@ void minimum_statistics_fx(
            hFdCngCom->msFrCnt = add( hFdCngCom->msFrCnt, 1 );
            move16();
        }

        Word64 tmp64;
        /* Smooth noise estimate during CNG phases */
        FOR( j = 0; j < len; j++ )
        {
            msNoiseEst[j] = round_fx( L_mac( L_mult( 31130 /*0.95 Q15*/, msNoiseEst[j] ), 1638 /*0.05 Q15*/, msNoiseFloor[j] ) );
            move16();
            tmp64 = W_add( W_mult_32_16( msNoiseEst[j], 31130 /*0.95 Q15*/ ), W_mult_32_16( msNoiseFloor[j], 1638 /*0.05 Q15*/ ) );
            msNoiseEst[j] = W_extract_h( W_shl( tmp64, 16 ) ); // Q25
            move32();
        }
    }
    IF( EQ_16( enc_dec, DEC ) && EQ_16( element_mode, IVAS_CPE_TD ) )
    {
        // v_multc(msNoiseEst, 1.4125f, msNoiseEst, NPART_SHAPING);
        v_multc_att( msNoiseEst, 23142, msNoiseEst, NPART_SHAPING );
        v_multc_att32( msNoiseEst, 23142, msNoiseEst, NPART_SHAPING );
    }
    /* Collect buffers */
    Copy( msPeriodog, msPeriodogBuf + len * ( *msPeriodogBufPtr ), len );
@@ -1732,17 +1792,15 @@ void minimum_statistics_fx(
        {
            scalar = L_mac( scalar, msPeriodogBuf[i], 6554 /*1.0/MSBUFLEN Q15*/ );
        }
        scalar16 = round_fx( scalar );
        if ( GT_16( msNoiseEst[j], scalar16 ) /*0.0 Q15*/ )
        if ( GT_32( msNoiseEst[j], scalar ) /*0.0 Q15*/ )
        {
            msNoiseEst[j] = scalar16;
            move16();
            msNoiseEst[j] = scalar;
            move32();
        }

        assert( msNoiseEst[j] >= 0 /*0.0 Q15*/ );
    }
}

/*-------------------------------------------------------------------
 * apply_scale()
 *
@@ -2653,9 +2711,10 @@ void SynthesisSTFT_ivas_fx(
    const Word16 nchan_out     /* i  : number of output channels */
)
{
    Word16 i, len, scale, tmp;
    Word16 i, len, scale, tmp, sft, exp, tmp1;
    Word16 len2, len3, len4;
    Word16 buf[M + 1 + L_FRAME16k];
    Word32 L_olapBuffer[FFTLEN];


    /* Perform IFFT */
@@ -2666,6 +2725,12 @@ void SynthesisSTFT_ivas_fx(
    hFdCngCom->fftBuffer_exp = fftBufferExp;
    move16();

    sft = getScaleFactor32( fftBuffer, hFdCngCom->fftlen );
    scale_sig32( fftBuffer, hFdCngCom->fftlen, sft );
    fftBufferExp = sub( fftBufferExp, sft );
    hFdCngCom->fftBuffer_exp = fftBufferExp;
    move16();

    fftBufferExp = add( fftBufferExp, hFdCngCom->fftlenShift );

    /* Perform overlap-add */
@@ -2679,48 +2744,58 @@ void SynthesisSTFT_ivas_fx(
    }
    ELSE
    {
        Copy( olapBuffer + hFdCngCom->frameSize, olapBuffer, hFdCngCom->frameSize );
        Copy_Scale_sig_16_32_no_sat( olapBuffer + hFdCngCom->frameSize, L_olapBuffer, hFdCngCom->frameSize, add( sub( hFdCngCom->olapBufferSynth_exp, sub( 15, hFdCngCom->fftlenShift ) ), 16 ) ); /* exp: hFdCngCom->olapBufferSynth_exp -> (15 - fftlenShift) */
        set16_fx( olapBuffer + hFdCngCom->frameSize, 0, hFdCngCom->frameSize );
    }
    len2 = shr( hFdCngCom->fftlen, 2 );
    len4 = shr( hFdCngCom->fftlen, 3 );
    len3 = add( len2, len4 );
    len = add( hFdCngCom->frameSize, len4 );
    tmp1 = sub( fftBufferExp, 15 );
    IF( tcx_transition )
    {
        FOR( i = 0; i < len; i++ )
        {
            olapBuffer[i] = round_fx_sat( L_shl_sat( fftBuffer[i], fftBufferExp - 15 ) ); // Q(15 - fftBufferExp)
            move16();
            L_olapBuffer[i] = L_shl_sat( fftBuffer[i], tmp1 ); /* Q(31 - (15 - fftlenShift) ) */
            move32();
        }
    }
    ELSE
    {
        FOR( i = 0; i < len4; i++ )
        {
            olapBuffer[i + 1 * len4] = add_sat( olapBuffer[i + 1 * len4], mult_r( round_fx_sat( L_shl_sat( fftBuffer[i + 1 * len4], fftBufferExp - 15 ) ), olapWin[i].v.im ) );
            move16();
            olapBuffer[i + 2 * len4] = add_sat( olapBuffer[i + 2 * len4], mult_r( round_fx_sat( L_shl_sat( fftBuffer[i + 2 * len4], fftBufferExp - 15 ) ), olapWin[len4 - 1 - i].v.re ) );
            move16();
            L_olapBuffer[i + 1 * len4] = Madd_32_16( L_olapBuffer[i + 1 * len4], L_shl_sat( fftBuffer[i + 1 * len4], tmp1 ), olapWin[i].v.im ); /* Q(31 - (15 - fftlenShift) ) */
            move32();
            L_olapBuffer[i + 2 * len4] = Madd_32_16( L_olapBuffer[i + 2 * len4], L_shl_sat( fftBuffer[i + 2 * len4], tmp1 ), olapWin[len4 - 1 - i].v.re ); /* Q(31 - (15 - fftlenShift) ) */
            move32();
        }
        FOR( i = len3; i < len; i++ )
        {
            olapBuffer[i] = round_fx_sat( L_shl_sat( fftBuffer[i], fftBufferExp - 15 ) );
            L_olapBuffer[i] = L_shl_sat( fftBuffer[i], tmp1 ); /* Q(31 - (15 - fftlenShift) ) */
            move32();
        }
    }

    FOR( i = 0; i < len4; i++ )
    {
        olapBuffer[i + 5 * len4] = mult_r( round_fx_sat( L_shl_sat( fftBuffer[i + 5 * len4], fftBufferExp - 15 ) ), olapWin[i].v.re );
        move16();
        olapBuffer[i + 6 * len4] = mult_r( round_fx_sat( L_shl_sat( fftBuffer[i + 6 * len4], fftBufferExp - 15 ) ), olapWin[len4 - 1 - i].v.im );
        move16();
        L_olapBuffer[i + 5 * len4] = Mpy_32_16_1( L_shl_sat( fftBuffer[i + 5 * len4], tmp1 ), olapWin[i].v.re ); /* Q(31 - (15 - fftlenShift) ) */
        move32();
        L_olapBuffer[i + 6 * len4] = Mpy_32_16_1( L_shl_sat( fftBuffer[i + 6 * len4], tmp1 ), olapWin[len4 - 1 - i].v.im ); /* Q(31 - (15 - fftlenShift) ) */
        move32();
    }

    len = add( len, len2 );
    FOR( i = len; i < hFdCngCom->fftlen; i++ )
    {
        olapBuffer[i] = 0;
        L_olapBuffer[i] = 0;
        move32();
    }

    sft = L_norm_arr( L_olapBuffer, hFdCngCom->fftlen );
    IF( NE_16( sft, 31 ) )
    {
        Copy_Scale_sig32_16( L_olapBuffer, olapBuffer, hFdCngCom->fftlen, sft );
        hFdCngCom->olapBufferSynth_exp = sub( sub( 15, hFdCngCom->fftlenShift ), sft );
        move16();
    }

@@ -2737,24 +2812,23 @@ void SynthesisSTFT_ivas_fx(
            buf[i] = mult_r( olapBuffer[i + len4 - M - 1], hFdCngCom->fftlenFac );
            move16();
        }
        exp = add( hFdCngCom->olapBufferSynth_exp, hFdCngCom->fftlenShift );
        tmp = buf[0];
    }
    IF( EQ_16( gen_exc, 1 ) )
    {
        Word16 s = getScaleFactor16( buf + 1, M + hFdCngCom->frameSize );
        if ( GT_16( *Q_new, s ) )
        {
            *Q_new = s;
        E_UTIL_f_preemph2( 0, buf + 1, PREEMPH_FAC, add( M, hFdCngCom->frameSize ), &tmp );
        Residu3_fx( hFdCngCom->A_cng, buf + 1 + M, hFdCngCom->exc_cng, hFdCngCom->frameSize, 0 );
        *Q_new = sub( 15, exp );
        move16();
    }

        E_UTIL_f_preemph2( *Q_new - 1, buf + 1, PREEMPH_FAC, M + hFdCngCom->frameSize, &tmp );
        Residu3_fx( hFdCngCom->A_cng, buf + 1 + M, hFdCngCom->exc_cng, hFdCngCom->frameSize, 1 );
    }
    IF( EQ_16( gen_exc, 2 ) )
    {
        *Q_new = E_UTIL_f_preemph3( buf + 1, PREEMPH_FAC, M + hFdCngCom->frameSize, &tmp, 1 );
        Residu3_fx( hFdCngCom->A_cng, buf + 1 + M, hFdCngCom->exc_cng, hFdCngCom->frameSize, 1 );
        *Q_new = E_UTIL_f_preemph3( buf + 1, PREEMPH_FAC, add( M, hFdCngCom->frameSize ), &tmp, 0 );
        move16();
        Residu3_fx( hFdCngCom->A_cng, buf + 1 + M, hFdCngCom->exc_cng, hFdCngCom->frameSize, negate( *Q_new ) );
        *Q_new = sub( 15, exp );
        move16();
    }
}

+36 −0
Original line number Diff line number Diff line
@@ -759,6 +759,13 @@ void ivas_fb_mixer_process_fx(
    pMdft_out_fx[0] = Mdft_out_0_fx;
    pMdft_out_fx[1] = Mdft_out_1_fx;

#ifdef OPT_SBA_ENC_V1_BE
    Word16 total_guard = find_guarded_bits_fx( num_bands );
    Word16 total_guard_2 = find_guarded_bits_fx( shl( frame_len, 1 ) );
    Word16 tmp_q = sub( sub( *q_mixer_mat_fx, total_guard ), 32 ); // Q30 + hFbMixer->q_prior_mixer_fx - 31 - total_guard - 31
    Word16 len = shl( frame_len, 1 );
    Word16 res_q, q_check;
#endif
    FOR( ch = ( hFbMixer->fb_cfg->active_w_mixing == 0 ); ch < hFbMixer->fb_cfg->num_out_chans; ch++ )
    {
        /* Run a loop of 2 to calculate current frame's filterbank output and prev frame's output */
@@ -773,6 +780,12 @@ void ivas_fb_mixer_process_fx(
                IF( in_out_mixer_map[ch][j] != 0 )
                {

#ifdef OPT_SBA_ENC_V1_BE
                    res_q = add( tmp_q, hFbMixer->q_ppFilterbank_inFR[j] );
                    q_check = s_min( q_pOut_fr_fx, res_q );
                    scale_sig32( pOut_fr_re_fx, frame_len, sub( q_check, q_pOut_fr_fx ) );
                    scale_sig32( pOut_fr_im_fx, frame_len, sub( q_check, q_pOut_fr_fx ) );
#endif
                    Word32 filterbank_mixer_bins_re_fx[L_FRAME48k];
                    Word32 filterbank_mixer_bins_im_fx[L_FRAME48k];
                    Word32 *pFb_inFR_re_fx = hFbMixer->ppFilterbank_inFR_re_fx[j]; // Q(hFbMixer->q_ppFilterbank_inFR_re_fx)
@@ -781,8 +794,10 @@ void ivas_fb_mixer_process_fx(
                    set_zero_fx( filterbank_mixer_bins_re_fx, frame_len );
                    set_zero_fx( filterbank_mixer_bins_im_fx, frame_len );

#ifndef OPT_SBA_ENC_V1_BE
                    Word16 total_guard = find_guarded_bits_fx( num_bands );
                    move16();
#endif
                    FOR( i = 0; i < num_bands; i++ )
                    {
                        Word16 start_offset = pFb->fb_consts.pFilterbank_bins_start_offset[i];
@@ -808,15 +823,19 @@ void ivas_fb_mixer_process_fx(
                        hFbMixer->prior_mixer_fx[ch][j][i] = mixer_mat_fx[ch][j][i]; // Q(q_mixer_mat_fx)
                        move32();
                    }
#ifndef OPT_SBA_ENC_V1_BE
                    Word16 res_q = 0;
                    move16();
#endif
                    FOR( k = 0; k < frame_len; k++ )
                    {
                        Word32 temp_out_re_fx, temp_out_im_fx;

                        ivas_cmult_fix( filterbank_mixer_bins_re_fx[k], filterbank_mixer_bins_im_fx[k], pFb_inFR_re_fx[k],
                                        pFb_inFR_im_fx[k], &temp_out_re_fx, &temp_out_im_fx );
#ifndef OPT_SBA_ENC_V1_BE
                        res_q = sub( add( sub( sub( add( 30, *q_mixer_mat_fx ), 31 ), total_guard ), hFbMixer->q_ppFilterbank_inFR[j] ), 31 );

                        Word16 q_check = s_min( q_pOut_fr_fx, res_q );
                        IF( NE_16( q_check, q_pOut_fr_fx ) )
                        {
@@ -825,31 +844,48 @@ void ivas_fb_mixer_process_fx(
                            pOut_fr_im_fx[k] = L_shr( pOut_fr_im_fx[k], sub( q_pOut_fr_fx, q_check ) ); // q_pOut_fr_fx -> q_check
                            move32();
                        }
#endif
                        IF( NE_16( q_check, res_q ) )
                        {
                            temp_out_re_fx = L_shr( temp_out_re_fx, sub( res_q, q_check ) ); // res_q -> q_check
                            temp_out_im_fx = L_shr( temp_out_im_fx, sub( res_q, q_check ) ); // res_q -> q_check
                        }
#ifndef OPT_SBA_ENC_V1_BE
                        res_q = q_check;
                        move16();
#endif

                        pOut_fr_re_fx[k] = L_add_sat( pOut_fr_re_fx[k], temp_out_re_fx ); // res_q
                        move32();
                        pOut_fr_im_fx[k] = L_add_sat( pOut_fr_im_fx[k], temp_out_im_fx ); // res_q
                        move32();
                    }
#ifdef OPT_SBA_ENC_V1_BE
                    q_pOut_fr_fx = q_check;
#else
                    q_pOut_fr_fx = res_q;
                    move16();
#endif
                }
            }
#ifndef OPT_SBA_ENC_V1_BE
            Word16 scale = sub( s_min( L_norm_arr( pOut_fr_re_fx, frame_len ), L_norm_arr( pOut_fr_im_fx, frame_len ) ), find_guarded_bits_fx( shl( frame_len, 1 ) ) );
#else
            Word16 scale = sub( s_min( L_norm_arr( pOut_fr_re_fx, frame_len ), L_norm_arr( pOut_fr_im_fx, frame_len ) ), total_guard_2 );
#endif
            scale_sig32( pOut_fr_re_fx, frame_len, scale );
            scale_sig32( pOut_fr_im_fx, frame_len, scale );
            ivas_imdft_fx( pOut_fr_re_fx, pOut_fr_im_fx, pMdft_out_fx[hist], frame_len );
            q_pMdft_out_fx[hist] = add( q_pOut_fr_fx, scale );
            move16();
        }
#ifdef OPT_SBA_ENC_V1_BE
        scale_sig32( pMdft_out_fx[0], len, sub( s_min( q_pMdft_out_fx[0], q_pMdft_out_fx[1] ), q_pMdft_out_fx[0] ) );
        scale_sig32( pMdft_out_fx[1], len, sub( s_min( q_pMdft_out_fx[0], q_pMdft_out_fx[1] ), q_pMdft_out_fx[1] ) );
#else
        scale_sig32( pMdft_out_fx[0], shl( frame_len, 1 ), sub( s_min( q_pMdft_out_fx[0], q_pMdft_out_fx[1] ), q_pMdft_out_fx[0] ) );
        scale_sig32( pMdft_out_fx[1], shl( frame_len, 1 ), sub( s_min( q_pMdft_out_fx[0], q_pMdft_out_fx[1] ), q_pMdft_out_fx[1] ) );
#endif
        ivas_fb_mixer_cross_fading_fx( hFbMixer, ppOut_pcm_fx, pMdft_out_fx[0], pMdft_out_fx[1], ch, frame_len, frame_len );
        q_ppOut_pcm_fx[ch] = s_min( q_pMdft_out_fx[0], q_pMdft_out_fx[1] );
        move16();
+2 −2
Original line number Diff line number Diff line
@@ -2960,7 +2960,7 @@ Word16 ivas_acelp_tcx20_switching_fx(
    Word16 *inp_fx,      /* i  : new input signal                        */
    Word16 q_inp,        /* i  : i/p Q                                  */
    Word16 *wsp,         /* i  : input weighted signal                   */
    Word16 non_staX,     /* i  : unbound non-stationarity for sp/mu clas */
    Word32 non_staX,     /* i  : unbound non-stationarity for sp/mu clas */
    Word16 *pitch_fr,    /* i  : fraction pitch values                   */
    Word16 *voicing_fr,  /* i  : fractional voicing values               */
    Word32 currFlatness, /* i  : flatness                                */
@@ -3984,7 +3984,7 @@ Word16 ivas_smc_gmm_fx(
    const Word16 cor_map_sum_fx,          /* i  : correlation map sum (from multi-harmonic anal.) Q8  */
    const Word32 epsP_fx[M + 1],          /* i  : LP prediciton error                                 */
    const Word32 PS_fx[],                 /* i  : energy spectrum                                     */
    const Word16 non_sta_fx,              /* i  : unbound non-stationarity                        Q8  */
    const Word32 non_sta_fx,              /* i  : unbound non-stationarity                        Q20  */
    const Word16 relE_fx,                 /* i  : relative frame energy                           Q8  */
    Word16 *high_lpn_flag,                /* i/o: sp/mus LPN flag                                     */
    const Word16 flag_spitch,             /* i  : flag to indicate very short stable pitch            */
+75 −3

File changed.

Preview size limit exceeded, changes collapsed.

Loading