Commit d3b3c803 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Testing branch

parent c521a983
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1787,7 +1787,7 @@ void tcx_noise_filling(
                win = add( win, 1 );
            }

            seed = own_random2_fx( seed );
            Random( &seed );
            Q[i] = L_mult0( mult( seed, fac_ns ), win );
            move32();

@@ -1952,7 +1952,7 @@ void tcx_noise_filling_with_shift(

            Word16 nrm = 31;

            seed = own_random2_fx( seed );
            Random( &seed );
            Q[i] = L_mult0( mult( seed, fac_ns ), win );
            IF( Q[i] )
            {
+4 −4
Original line number Diff line number Diff line
@@ -2383,7 +2383,7 @@ static void ivas_subst_spec_fx(
            IF( NE_16( ph_dith, 0 ) )
            {
                Xph = *pCorrPhase;               /* in Q16. 2*PI is not included. */
                *seed = own_random2_fx( *seed ); /* in Q0 */
                Random( seed );                  /* in Q0 */
                acc = L_mult( *seed, ph_dith );  /* N.B. ph_dith[i] is in Q15, i.e., in between 0 and 1.0 (2*PI not included) */
                acc = L_shr( acc, PHASE_DITH_SCALE_SHIFT );
                Xph = L_add( Xph, acc ); /* in Q16. */
@@ -2783,7 +2783,7 @@ static void subst_spec_fx(
            IF( ph_dith != 0 )
            {
                Xph = *pCorrPhase;              /* in Q16. 2*PI is not included. */
                *seed = own_random2_fx( *seed ); /* in Q0 */
                Random( seed );                 /* in Q0 */
                acc = L_mult( *seed, ph_dith ); /* N.B. ph_dith[i] is in Q15, i.e., in between 0 and 1.0 (2*PI not included) */
                acc = L_shr( acc, PHASE_DITH_SCALE_SHIFT );
                Xph = L_add( Xph, acc ); /* in Q16. */
+116 −94

File changed.

Preview size limit exceeded, changes collapsed.

+189 −153

File changed.

Preview size limit exceeded, changes collapsed.

+10 −10
Original line number Diff line number Diff line
@@ -37,17 +37,18 @@ Word16 Damping_fact_fx( /* o : damping factor
    Word32 gain32;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
#endif


    IF( core == ACELP_CORE )
    IF( EQ_16( core, ACELP_CORE ) )
    {
        alpha = mult_r( _ALPHA_VT_FX, 16384 ); /* rapid convergence to 0 */ /*Q14*/
        test();
        test();
        test(); /*ELSEIF*/
        test();
        test();                                                               /*ELSEIF*/
        test();
        test();
        IF( ( EQ_16( coder_type, UNVOICED ) ) && ( LE_16( nbLostCmpt, 3 ) ) ) /* Clear unvoiced last good frame   */
        {
            alpha = mult_r( _ALPHA_UU_FX, 16384 ); /*Q14*/
@@ -78,15 +79,15 @@ Word16 Damping_fact_fx( /* o : damping factor
        {
            alpha = 13107 /*0.8f Q14*/; /*Q14*/
        }
        ELSE if ( ( ( EQ_16( last_good, VOICED_CLAS ) ) || ( EQ_16( last_good, ONSET ) ) ) && ( LE_16( nbLostCmpt, 3 ) ) )
        ELSE IF( ( ( EQ_16( last_good, VOICED_CLAS ) ) || ( EQ_16( last_good, ONSET ) ) ) && ( LE_16( nbLostCmpt, 3 ) ) )
        {
            alpha = mult_r( _ALPHA_V_FX, 16384 ); /* constant for the first 3 erased frames */
        }

        IF( GE_16( last_good, VOICED_CLAS ) )
        {
            move16();
            lp_tmp = *lp_gainp;
            move32();

            IF( EQ_16( nbLostCmpt, 1 ) ) /* if first erased frame in a block, reset harmonic gain */
            {
@@ -95,7 +96,6 @@ Word16 Damping_fact_fx( /* o : damping factor
                /*gain = (float)sqrt( *lp_gainp );*/ /* move pitch gain towards 1 for voiced to remove energy fluctuations */
                /*BASOP_Util_Sqrt_MantExp(lp_gainp,&lp_gainp_E);*/
                s_gainp = 31 - 29;
                move16();
                gain32 = Sqrt32( lp_tmp, &s_gainp );

#ifdef BASOP_NOGLOB
@@ -114,22 +114,22 @@ Word16 Damping_fact_fx( /* o : damping factor
            }
            ELSE
            {
                /*0.7 + 0.2*stab_fac*/ move16();
                /*0.7 + 0.2*stab_fac*/
                lp_tmp = Mpy_32_16_1( lp_tmp, mac_r( 1503238528l /*0.7f Q31*/, 6554 /*0.2f Q15*/, stab_fac ) ); /*2Q29*/
                alpha = round_fx( L_shl( lp_tmp, 1 ) );                                                         /*1Q14*/
            }
            move16();
            *lp_gainp = lp_tmp; /*store*/
            move32();
        }
    }
    ELSE
    {
        alpha = mac_r( 375809632l /*0.35f Q30*/, 6554 /*0.4f Q14*/, stab_fac ); /*Q14*/
        if ( LT_16( nbLostCmpt, 2 ) )
        IF( LT_16( nbLostCmpt, 2 ) )
        {
            alpha = mac_r( 751619264l /*0.70f Q30*/, 4915 /*0.3f Q14*/, stab_fac ); /*Q14*/
        }
        if ( EQ_16( nbLostCmpt, 2 ) )
        IF( EQ_16( nbLostCmpt, 2 ) )
        {
            alpha = mac_r( 483183808l /*0.45f Q30*/, 6554 /*0.4f Q14*/, stab_fac ); /*Q14*/
        }
Loading