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

Merge branch '3gpp_issue_1375_fix' into 'main'

Fix for 3GPP issue 1375: Underflow observed in the quantize_pars_fx() function...

See merge request !1575
parents c93084e6 361e8c5a
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -2640,10 +2640,16 @@ Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */
    */

    if ( !a_m )
        a_e = add( b_e, 0 );
    {
        a_e = b_e;
        move16();
    }

    if ( !b_m )
        b_e = add( a_e, 0 );
    {
        b_e = a_e;
        move16();
    }

    shift = sub( a_e, b_e );
    shift = s_max( -31, shift );
@@ -2664,7 +2670,10 @@ Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */
    if ( shift )
        L_tmp = L_shl( L_tmp, shift );
    if ( L_tmp == 0 )
        a_e = add( 0, 0 );
    {
        a_e = 0;
        move16();
    }
    if ( L_tmp != 0 )
        a_e = sub( a_e, shift );
    *ptr_e = a_e;