Commit 7f29e919 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1348_fix' into 'main'

Fix for 3GPP issue 1348: Increased noise level in BASOP decoder for...

See merge request !1327
parents 87eac66a b7437cd5
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2636,10 +2636,10 @@ void IMDCT_ivas_fx(
    {
        Word32 fac;
        // fac = shl_sat( mult_r( extract_h( L_shr_sat( hTcxDec->conceal_eof_gain32, sub( 1, hTcxDec->conceal_eof_gain_e ) ) ), st->last_concealed_gain_syn_deemph ), 1 );
        fac = Mpy_32_16_1( hTcxDec->conceal_eof_gain32, st->last_concealed_gain_syn_deemph ); // q = 31 - hTcxDec->conceal_eof_gain_e
        fac = Mpy_32_16_1( hTcxDec->conceal_eof_gain32, st->last_concealed_gain_syn_deemph ); // q = 31 - hTcxDec->conceal_eof_gain_e - last_concealed_gain_syn_deemph_e
        FOR( Word16 ind = 0; ind < overlap; ind++ )
        {
            old_syn_overl_fx[ind] = extract_l( L_shl_sat( Mpy_32_32( old_syn_overl_fx[ind], fac ), hTcxDec->conceal_eof_gain_e ) ); // Q(-2)
            old_syn_overl_fx[ind] = extract_h( L_shl_sat( Mpy_32_16_1( fac, old_syn_overl_fx[ind] ), add( hTcxDec->conceal_eof_gain_e, st->last_concealed_gain_syn_deemph_e ) ) ); // Q(-2)
            move16();
        }
    }
+3 −1
Original line number Diff line number Diff line
@@ -1623,6 +1623,8 @@ void ivas_mdct_core_tns_ns_fx(
            }
            q_2 = q_x;
            move16();
            Word16 length2 = length;
            move16();
            sns_shape_spectrum_fx( x_fx[ch][k], &q_x, st->hTcxCfg->psychParamsCurrent, sns_int_scf_fx, q_sns_int_scf, st->hTcxCfg->psychParamsCurrent->nBins, &length );
            IF( LT_16( q_2, add( q_x, 1 ) ) ) /*scaling to q_2*/
            {
@@ -1632,7 +1634,7 @@ void ivas_mdct_core_tns_ns_fx(
            }
            ELSE /*scaling to q_x+1*/
            {
                Scale_sig32( &x_fx[ch][k][0] + length, sub( L_spec[ch], length ), sub( add( q_x, 1 ), q_2 ) );
                Scale_sig32( &x_fx[ch][k][0] + length, sub( length2, length ), sub( add( q_x, 1 ), q_2 ) );
                q_x = add( q_x, 1 );
            }
            x_e[ch][k] = sub( 31, q_x );