Commit de46490b authored by Fabian Bauer's avatar Fabian Bauer
Browse files

arith_coder_fx.c : changed void tcx_arith_scale_envelope

parent 87aee119
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -194,10 +194,12 @@ void tcx_arith_scale_envelope(
    Word16 statesi, bits;
    Word32 mean, a, s, L_tmp;
    Word16 mean_e, tmp, tmp2;
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
#endif


    lob_bits = 0;
@@ -223,7 +225,11 @@ void tcx_arith_scale_envelope(

        tmp = norm_l( env[k] );
        tmp2 = sub( 15, tmp );
#ifdef ISSUE_1836_replace_overflow_libcom
        tmp = Inv16( round_fx_sat( L_shl( env[k], tmp ) ), &tmp2 ); /* exp(tmp2) */
#else
        tmp = Inv16( round_fx_o( L_shl_o( env[k], tmp, &Overflow ), &Overflow ), &tmp2 ); /* exp(tmp2) */
#endif
        ienv[k] = L_shl( L_deposit_h( tmp ), sub( tmp2, 15 ) );                           /* Q16 */
        move32();
        mean = L_add( mean, ienv[k] ); /* Q16 */