Commit 67d7fc1b authored by vaillancour's avatar vaillancour
Browse files

more fixes for hi-level content

parent ff8d86db
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -548,7 +548,11 @@ void CNG_exc_fx(
            {
                L_tmp = L_mult0(*pt_fft_io, *pt_fft_io);
                pt_fft_io++;
#ifdef BASOP_NOGLOB
                L_tmp = L_mac0_sat( L_tmp, *pt_fft_io, *pt_fft_io ); /* 2*(Q_exc) */
#else
                L_tmp = L_mac0( L_tmp, *pt_fft_io, *pt_fft_io ); /* 2*(Q_exc) */
#endif
                pt_fft_io++;
                L_tmp2 = L_add(L_tmp2, L_shr(Mult_32_16(L_tmp,26214 /* 256/320, Q15 */), 7)); /* 2*(Q_exc)+15+1-16+1, divide by L_frame done here */
            }
+5 −1
Original line number Diff line number Diff line
@@ -245,7 +245,11 @@ void enhancer_fx(
            L_tmp = L_msu(L_tmp, code[i + 1], tmp);
            tmp16 = msu_r(L_tmp, code[i - 1], tmp);
            L_tmp = L_shl(L_mult(gain_code_hi, tmp16), sc);
#ifdef BASOP_NOGLOB
            pt_exc2[i] = msu_r_sat( L_tmp, -32768, pt_exc2[i] );
#else
            pt_exc2[i] = msu_r( L_tmp, -32768, pt_exc2[i] );
#endif
            move16(); /* in Q_exc */
        }

+10 −2
Original line number Diff line number Diff line
@@ -2169,7 +2169,11 @@ void AnalysisSTFT (
        move32();
        move32();
        fftBuffer[i+len]      = L_mult(shr(timeDomainInput[i],Q),      mult_r(olapWin[i].v.re, 23170/*1.4142135623730950488016887242097 Q14*/));
#ifdef BASOP_NOGLOB
        fftBuffer[i + len + len2] = L_mult( shr_sat( timeDomainInput[i + len2], Q ), mult_r( olapWin[len2 - 1 - i].v.im, 23170 /*1.4142135623730950488016887242097 Q14*/ ) );
#else
        fftBuffer[i + len + len2] = L_mult( shr( timeDomainInput[i + len2], Q ), mult_r( olapWin[len2 - 1 - i].v.im, 23170 /*1.4142135623730950488016887242097 Q14*/ ) );
#endif
    }

    /* Perform FFT */
@@ -2177,7 +2181,11 @@ void AnalysisSTFT (

    FOR (i=0; i <len ; i++)
    {
#ifdef BASOP_NOGLOB
        olapBuffer[i] = shr_sat( timeDomainInput[sub( hFdCngCom->frameSize, len ) + i], Q );
#else
        olapBuffer[i] = shr( timeDomainInput[sub( hFdCngCom->frameSize, len ) + i], Q );
#endif
        move16();
    }

+10 −2
Original line number Diff line number Diff line
@@ -1251,7 +1251,11 @@ void interpolate_3_over_1_allpass_fx(
        move16();
        Vm[1] = add(mem_fx[4], mult_r(filt_coeff_fx[4], sub(Vm[0], mem_fx[5])));
        move16();
#ifdef BASOP_NOGLOB
        mem_fx[6] = add_sat( mem_fx[5], mult_r( filt_coeff_fx[5], sub_sat( Vm[1], mem_fx[6] ) ) );
#else
        mem_fx[6] = add( mem_fx[5], mult_r( filt_coeff_fx[5], sub( Vm[1], mem_fx[6] ) ) );
#endif
        move16();

        mem_fx[4] = Vm[0];
@@ -1269,7 +1273,11 @@ void interpolate_3_over_1_allpass_fx(
        move16();
        Vl[1] = add(mem_fx[7], mult_r(filt_coeff_fx[7], sub(Vl[0], mem_fx[8])));
        move16();
#ifdef BASOP_NOGLOB
        mem_fx[9] = add_sat( mem_fx[8], mult_r( filt_coeff_fx[8], sub_sat( Vl[1], mem_fx[9] ) ) );
#else
        mem_fx[9] = add( mem_fx[8], mult_r( filt_coeff_fx[8], sub( Vl[1], mem_fx[9] ) ) );
#endif
        move16();

        mem_fx[0] = input_fx[i];
+6 −1
Original line number Diff line number Diff line
@@ -118,8 +118,13 @@ void phase_dispersion(
        scale2 = getScaleFactor32(x32, L_subfr);
        FOR (i=0; i<L_subfr/2-1; i++)
        {
#ifdef BASOP_NOGLOB
            code[i] = round_fx_sat( L_shl_sat( x32[2 * i + 0], scale2 ) );
            code[L_subfr - 1 - i] = round_fx_sat( L_shl_sat( x32[2 * i + 3], scale2 ) );
#else
            code[i] = round_fx( L_shl( x32[2 * i + 0], scale2 ) );
            code[L_subfr-1-i] = round_fx(L_shl(x32[2*i+3], scale2));
#endif
        }

        code[L_subfr/2-1] = round_fx(L_shl(x32[L_subfr-2], scale2));
Loading