Commit 8c5156c9 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_754_fix' into 'main'

Fix for issue 754: Concealment artifacts at 48kbps stereo

See merge request !376
parents fed51b91 a9f77f0f
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] )
            {
+6 −6
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. */
+2 −2
Original line number Diff line number Diff line
@@ -490,7 +490,7 @@ void con_acelp_fx(
    l = add( st->L_frame, sub( l_fir_fer, 1 ) );
    FOR( i = 0; i < l; i++ )
    {
        tmpSeed = own_random2_fx( tmpSeed );
        Random( &tmpSeed );
        noise_buf[i] = tmpSeed; /*Q0*/
        move16();
    }
@@ -500,7 +500,7 @@ void con_acelp_fx(
    l = add( add( st->L_frame, shr( st->L_frame, 1 ) ), sub( l_fir_fer, 1 ) );
    FOR( ; i < l; i++ )
    {
        tmpSeed = own_random2_fx( tmpSeed );
        Random( &tmpSeed );
        noise_buf[i] = tmpSeed; /*Q0*/
        move16();
    }
+9 −9
Original line number Diff line number Diff line
@@ -692,7 +692,7 @@ void con_tcx_fx(
        tmp_loop = add( L_frame, L_FIR_FER2 - 1 );
        FOR( i = 0; i < tmp_loop; i++ )
        {
            tmpSeed = own_random2_fx( tmpSeed );
            Random( &tmpSeed );
            noise[i] = shr( tmpSeed, noise_e );
            move16();
        }
@@ -702,7 +702,7 @@ void con_tcx_fx(
        tmp_loop = add( add( L_frame, shr( L_frame, 1 ) ), shl( L_FIR_FER2, 1 ) );
        FOR( ; i < tmp_loop; i++ )
        {
            tmpSeed = own_random2_fx( tmpSeed );
            Random( &tmpSeed );
            noise[i] = shr( tmpSeed, noise_e );
            move16();
        }
@@ -1622,7 +1622,7 @@ void con_tcx_ivas_fx(

        tmpSeed1 = *noise_seed;
        noise = buf;
        noise_e = 1;
        noise_e = 2;
        move16();
        e = 0;
        move16();
@@ -1640,8 +1640,8 @@ void con_tcx_ivas_fx(

        FOR( i = 0; i < add( L_frame, L_FIR_FER2 - 1 ); i++ )
        {
            random1 = own_random2_fx( tmpSeed1 );
            random2 = own_random2_fx( tmpSeed1 );
            random1 = Random( &tmpSeed1 );
            random2 = Random( &tmpSeed1 );
            noise[i] = add( shr( random1, noise_e ), shr( mult( alpha_coh, random2 ), noise_e ) );
            move16();
        }
@@ -1655,8 +1655,8 @@ void con_tcx_ivas_fx(

        FOR( ; i < add( add( L_frame, shr( L_frame, 1 ) ), 2 * L_FIR_FER2 ); i++ )
        {
            random1 = own_random2_fx( tmpSeed1 );
            random2 = own_random2_fx( tmpSeed1 );
            random1 = Random( &tmpSeed1 );
            random2 = Random( &tmpSeed1 );
            noise[i] = add( shr( random1, noise_e ), shr( mult( alpha_coh, random2 ), noise_e ) );
            move16();
        }
@@ -1673,7 +1673,7 @@ void con_tcx_ivas_fx(
        tmp_loop = add( L_frame, L_FIR_FER2 - 1 );
        FOR( i = 0; i < tmp_loop; i++ )
        {
            tmpSeed = own_random2_fx( tmpSeed );
            Random( &tmpSeed );
            noise[i] = shr( tmpSeed, noise_e );
            move16();
        }
@@ -1683,7 +1683,7 @@ void con_tcx_ivas_fx(
        tmp_loop = add( add( L_frame, shr( L_frame, 1 ) ), shl( L_FIR_FER2, 1 ) );
        FOR( ; i < tmp_loop; i++ )
        {
            tmpSeed = own_random2_fx( tmpSeed );
            Random( &tmpSeed );
            noise[i] = shr( tmpSeed, noise_e );
            move16();
        }
+3 −3
Original line number Diff line number Diff line
@@ -268,13 +268,13 @@ void gaus_L2_dec(
    move16();
    FOR( i = 0; i < L_SUBFR; i++ )
    {
        seed = own_random2_fx( seed );
        Random( &seed );
        tmp32 = L_mac( 0, seed, 1 << 9 );

        seed = own_random2_fx( seed );
        Random( &seed );
        tmp32 = L_mac( tmp32, seed, 1 << 9 );

        seed = own_random2_fx( seed );
        Random( &seed );
        code[i] = mac_r( tmp32, seed, 1 << 9 );
        move16();
    }
Loading