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

Bug fix: Scaling issue fix in CNG_enc_ivas_fx

Link #1775
Fixes issue at time frame 16s-18s in #1775
parent 7e820311
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1261,11 +1261,11 @@ void CNG_enc_ivas_fx(
    move16();
    /* Temp variables for floating point functions */

    lp_ener_thr_scale = 8; /* 4.0f*/ /* Q2  */
    lp_ener_thr_scale = 8; /* 4.0f*/ /* Q1  */
    move16();
    if ( st_fx->element_mode != EVS_MONO )
    {
        lp_ener_thr_scale = 7; /* 3.5f;*/ /* Q2  */
        lp_ener_thr_scale = 7; /* 3.5f;*/ /* Q1  */
        move16();
    }

@@ -1634,7 +1634,7 @@ void CNG_enc_ivas_fx(
        IF( hTdCngEnc->burst_ho_cnt > 0 )
        {
            /**allow_cn_step |= ( hDtxEnc->first_CNG || st->element_mode == EVS_MONO ) && ( hTdCngEnc->ho_ener_hist[hTdCngEnc->ho_hist_ptr] > lp_ener_thr_scale * hTdCngEnc->lp_ener );*/
            w_temp = W_msu_32_16( W_shl( W_deposit32_l( hTdCngEnc->ho_ener_hist_fx[hTdCngEnc->ho_hist_ptr] ), 1 ), hTdCngEnc->lp_ener_fx, lp_ener_thr_scale ); /*Q7*/
            w_temp = W_msu_32_16( W_shl( W_deposit32_l( hTdCngEnc->ho_ener_hist_fx[hTdCngEnc->ho_hist_ptr] ), 2 ), hTdCngEnc->lp_ener_fx, lp_ener_thr_scale ); /*Q8*/

            test();
            test();