Commit d2caaa9c authored by JÜRGEN Gerstacker's avatar JÜRGEN Gerstacker
Browse files

added function ari_decode_overflow_ivas_fx()

parent 9dbb2bf6
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7565,6 +7565,9 @@ void IGFSCFDecoderDecode(
Word32 ari_decode_overflow_fx(
    Tastat *s );

Word32 ari_decode_overflow_ivas_fx(
    Tastat *s );

void ari_start_decoding_14bits_fx(
    Decoder_State *st,
    Tastat *s );
+5 −0
Original line number Diff line number Diff line
@@ -32,6 +32,11 @@ Word32 ari_decode_overflow_fx( Tastat *s )
#endif
}

Word32 ari_decode_overflow_ivas_fx( Tastat *s )
{
    return ( L_sub( s->high, s->low ) <= 0 );
}

/**
 * \brief     Start ArCo decoding
 *
+12 −0
Original line number Diff line number Diff line
@@ -52,7 +52,11 @@ static Word16 tcx_arith_decode_fx(
            exp_k = round_fx( expfp( envelope[k], tmp ) );
        }
        /* decode line magnitude */
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC3
        bp = ari_decode_14bits_pow_ivas( prm, bp, target_bits, &q, &as, exp_k );
#else
        bp = ari_decode_14bits_pow_fx( prm, bp, target_bits, &q, &as, exp_k );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC3 */

        IF( q == 0 )
        {
@@ -61,7 +65,11 @@ static Word16 tcx_arith_decode_fx(
        }
        IF( q != 0 ) /* line is non-zero, decode sign */
        {
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC3
            bp = ari_decode_14bits_sign_ivas( prm, bp, target_bits, &s, &as );
#else
            bp = ari_decode_14bits_sign_fx( prm, bp, target_bits, &s, &as );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC3 */

            W_tmp = W_mac_16_16( W_tmp, q, k );

@@ -72,7 +80,11 @@ static Word16 tcx_arith_decode_fx(
            move32();
        }

#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC3
        IF( ari_decode_overflow_ivas_fx( &as ) )
#else
        IF( ari_decode_overflow_fx( &as ) )
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC3 */
        {
            if ( LT_16( bp, target_bits ) ) /* safety check in case of bit errors */
            {