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

Merge branch '3gpp_issue_1097_fix' into 'main'

Fix for 3GPP issue 1097: Crash when using force HQ in ISM-1

See merge request !890
parents 81362cee 146af86a
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -586,14 +586,10 @@ void core_switching_post_enc_ivas_fx(
        /* Fade towards init value for non HQ_CORE */
        IF( st->hHQ_core != NULL )
        {
            st->hHQ_core->crest_lp_fx = L_add( Mpy_32_32( HQ_CREST_FAC_SM_FX, st->hHQ_core->crest_lp_fx ), Mpy_32_32( L_sub( ONE_IN_Q31, HQ_CREST_FAC_SM_FX ), HQ_CREST_THRESHOLD_FX ) ); /*Q28*/
            st->hHQ_core->crest_lp_fx = L_add( Mpy_32_32( HQ_CREST_FAC_SM_FX, st->hHQ_core->crest_lp_fx ), Mpy_32_32( L_sub( ONE_IN_Q31, HQ_CREST_FAC_SM_FX ), L_shr( HQ_CREST_THRESHOLD_FX, sub( Q28, st->hHQ_core->crest_lp_q ) ) ) ); /*crest_lp_q*/
            move32();
            st->hHQ_core->crest_lp_q = Q28;
            move16();
            st->hHQ_core->crest_mod_lp_fx = L_add( Mpy_32_32( HQ_CREST_FAC_SM_FX, st->hHQ_core->crest_mod_lp_fx ), Mpy_32_32( L_sub( ONE_IN_Q31, HQ_CREST_FAC_SM_FX ), HQ_CREST_MOD_THRESHOLD_FX ) ); /*Q29*/
            st->hHQ_core->crest_mod_lp_fx = L_add( Mpy_32_32( HQ_CREST_FAC_SM_FX, st->hHQ_core->crest_mod_lp_fx ), Mpy_32_32( L_sub( ONE_IN_Q31, HQ_CREST_FAC_SM_FX ), L_shr( HQ_CREST_MOD_THRESHOLD_FX, sub( Q29, st->hHQ_core->crest_mod_lp_q ) ) ) ); /*crest_mod_lp_q*/
            move32();
            st->hHQ_core->crest_mod_lp_q = Q29;
            move16();
        }
    }

+4 −0
Original line number Diff line number Diff line
@@ -372,8 +372,12 @@ void HQ_core_enc_init_fx(
#ifdef MSAN_FIX
    hHQ_core->crest_lp_fx = HQ_CREST_THRESHOLD_FX;
    move32();
    hHQ_core->crest_lp_q = Q28;
    move16();
    hHQ_core->crest_mod_lp_fx = HQ_CREST_MOD_THRESHOLD_FX;
    move32();
    hHQ_core->crest_mod_lp_q = Q29;
    move16();
#endif

    return;