Commit 27b0ba31 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1202_fix_2' into 'main'

Fix for 3GPP issue 1202: BASOP encoder ParamISM: strong timbre differences in the noise track - 2 [allow regression]

See merge request !1261
parents 6f4a5847 22acde4d
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -444,9 +444,9 @@ void ivas_ism_coh_estim_dtx_enc_fx(
    Word16 sce_id, i;
    Word32 acorr_ene_fx[MAX_NUM_OBJECTS], xcorr_ene_fx;
    Word16 acorr_ene_e[MAX_NUM_OBJECTS], xcorr_ene_e;
    Word16 norm_inp;
    Word16 tot_exp;
    Word32 scaled_inp;
    Word16 norm_inp, norm_inp0;
    Word16 tot_exp, tot_exp2;
    Word32 scaled_inp, scaled_inp0;
    set16_fx( acorr_ene_e, 0, MAX_NUM_OBJECTS );

    IF( EQ_16( nchan_transport, 1 ) )
@@ -492,10 +492,13 @@ void ivas_ism_coh_estim_dtx_enc_fx(
        {
            norm_inp = norm_l( st->input32_fx[i] );
            scaled_inp = L_shl( st->input32_fx[i], norm_inp );
            tot_exp = shl( sub( 20, norm_inp ), 1 );
            tot_exp = shl( sub( sub( 31, st->q_inp32 ), norm_inp ), 1 );
            acorr_ene_fx[sce_id] = BASOP_Util_Add_Mant32Exp( acorr_ene_fx[sce_id], acorr_ene_e[sce_id], Mult_32_32( scaled_inp, scaled_inp ), tot_exp, &acorr_ene_e[sce_id] ); /* exp(acorr_ene_e) */
            move32();
            xcorr_ene_fx = BASOP_Util_Add_Mant32Exp( xcorr_ene_fx, xcorr_ene_e, Mult_32_32( scaled_inp, scaled_inp ), tot_exp, &xcorr_ene_e ); /* exp(xcorr_ene_e) */
            norm_inp0 = norm_l( st_id0->input32_fx[i] );
            scaled_inp0 = L_shl( st_id0->input32_fx[i], norm_inp0 );
            tot_exp2 = add( sub( sub( 31, st_id0->q_inp32 ), norm_inp0 ), sub( sub( 31, st->q_inp32 ), norm_inp ) );
            xcorr_ene_fx = BASOP_Util_Add_Mant32Exp( xcorr_ene_fx, xcorr_ene_e, Mult_32_32( scaled_inp, scaled_inp0 ), tot_exp2, &xcorr_ene_e ); /* exp(xcorr_ene_e) */
        }
        Word16 coh_e;
        Word16 temp_e = acorr_ene_e[hISMDTX->sce_id_dtx] + acorr_ene_e[sce_id];