Commit 24f29d12 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1154_fix' into 'main'

Fix for 3GPP issue 1154: Encoder crash for ParamMC 7.1 at 96kbps in ivas_param_mc_param_est_enc_fx()

See merge request !945
parents b7e64490 1dea95f5
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -112,4 +112,5 @@
#define FIX_ISSUE_1150                          /* Ittiam: Fix for Issue 1150: Assertion error observed in evs_enc_fx (with option stereo_dmx_evs) from tcx_ltp_find_gain function*/
#define FIX_ISSUE_1151                          /* Ittiam: Fix for Issue 1151: Assertion error observed in evs_enc_fx (with option stereo_dmx_evs) from sp_mus_classif_gmm_fx function*/
#define FIX_ISSUE_1153                          /* Ittiam: Fix for Issue 1153: Assertion error observed in stereo_dmx_evs_enc_fx from calc_poc_fx function*/
#define FIX_ISSUE_1154                          /* Ittiam: Fix for Issue 1154: Encoder crash for ParamMC 7.1 at 96kbps in ivas_param_mc_param_est_enc_fx() */
#endif
+8 −0
Original line number Diff line number Diff line
@@ -1015,7 +1015,11 @@ static void ivas_param_mc_param_est_enc_fx(
                        move16();
                    }
                    L_tmp = Mpy_32_16_1( ref_ener_fx, hParamMC->hMetadataPMC.ild_factors_fx[k] );
#ifdef FIX_ISSUE_1154
                    L_tmp = L_deposit_h( BASOP_Util_Divide3232_Scale( Nrg_fx[h_ild_mapping->ild_index[k]], L_add( L_tmp, EPSILLON_FX ), &tmp_e ) );
#else
                    L_tmp = L_deposit_h( BASOP_Util_Divide3232_Scale( Nrg_fx[h_ild_mapping->ild_index[k]], L_tmp, &tmp_e ) );
#endif

                    tmp_e = add( sub( Nrg_e[h_ild_mapping->ild_index[k]], ref_ener_e ), tmp_e );

@@ -1393,7 +1397,11 @@ static void ivas_param_mc_quantize_ilds_fx(
            ref_ener_fx = BASOP_Util_Add_Mant32Exp( ref_ener_fx, ref_ener_e, Cx_fx[ref_channel_idx][ref_channel_idx], Cx_e[ref_channel_idx][ref_channel_idx], &ref_ener_e );
        }
        ref_ener_fx = Mpy_32_16_1( ref_ener_fx, hParamMC->hMetadataPMC.ild_factors_fx[k] );
#ifdef FIX_ISSUE_1154
        L_tmp = L_deposit_h( BASOP_Util_Divide3232_Scale( Nrg_fx[h_ild_mapping->ild_index[k]], L_add( ref_ener_fx, EPSILLON_FX ), &tmp_e ) );
#else
        L_tmp = L_deposit_h( BASOP_Util_Divide3232_Scale( Nrg_fx[h_ild_mapping->ild_index[k]], ref_ener_fx, &tmp_e ) );
#endif
        tmp_e = add( sub( Nrg_e[h_ild_mapping->ild_index[k]], ref_ener_e ), tmp_e );
        /*10 in Q21 = 1342177280*/
        ILD_fx[k] = Mpy_32_32( 1342177280, BASOP_Util_Log10( L_tmp, tmp_e ) ); // Q21