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

harmonized ari_lookup_sign_fx() and ari_lookup_pow_fx()

parent 9330bc1d
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -97,8 +97,9 @@
#define FIX_BASOP_2530_IVAS_DECISION_MAT                /* VA: Fix ambiguous usage of extract_l() */
#define FIX_2402_SIMPLIFY_ARI_CODEC                     /* FhG: basop issue 2402: simplified arithmetic in TCX arithmetic coder */
#define FIX_2402_INLINE_FCT_ARI_CODEC                   /* FhG: basop issue 2402: simplify processing in arithmetic decoding, inline mul_sbc_14bits, all BE */
#define FIX_2402_REPL_EVS_ARI_CODEC_DEC                 /* FhG: basop issue 2402: replace EVS arith decoder with IVAS arith decoder in core coder */
// #define FIX_2402_REPL_EVS_ARI_CODEC_DEC2                /* FhG: basop issue 2402: replace EVS arith decoder with IVAS arith decoder in IGF SCF coder */
#define FIX_2402_REPL_EVS_ARI_CODEC_DEC                 /* FhG: basop issue 2402: replace EVS arith decoder with IVAS arith decoder */
//#define FIX_2402_REPL_EVS_ARI_CODEC_DEC2                 /* FhG: basop issue 2402: replace EVS arith decoder with IVAS arith decoder */
#define FIX_2402_REPL_EVS_ARI_CODEC_DEC3               /* FhG: basop issue 2402: replace EVS arith decoder with IVAS arith decoder */
#define FIX_2402_SIGNED_VERSION                         /* FhG: basop issue 2402: use signed operator instead of unsigned, better match for hardware */
#define FIX_2402_REPL_EVS_ARI_CODEC_ENC                 /* FhG: basop issue 2402: replace EVS arith encoder with IVAS arith encoder */
#define FIX_BASOP_2546_HARMONIZE_TCX_SCALAR             /* FhG: Fix issue 2546 Harmonize function tcx_scalar_quantization_rateloop*/
+14 −0
Original line number Diff line number Diff line
@@ -468,6 +468,7 @@ Word16 ari_decode_14bits_bit_ext_fx( Decoder_State *st, Tastat *s )
}
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC3
static Word16 ari_lookup_pow_fx( Tastat *s, Word16 base )
{
    Word32 cum, range;
@@ -561,7 +562,9 @@ static Word16 ari_lookup_pow_fx( Tastat *s, Word16 base )

    return symbol;
}
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC3 */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC3
static Word16 ari_lookup_sign_fx( Tastat *s, Word16 base )
{
    Word32 cum, range;
@@ -590,7 +593,9 @@ static Word16 ari_lookup_sign_fx( Tastat *s, Word16 base )

    return symbol;
}
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC3 */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC3
static Word16 ari_decode_14bits_notbl_fx(
    Word16 *ptr, /* Q0 */
    Word16 bp,
@@ -658,6 +663,7 @@ static Word16 ari_decode_14bits_notbl_fx(

    return bp;
}
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC3 */

/*------------------------------------------------------------------------
 * Function: ari_decode_14bits_pow_fx
@@ -672,7 +678,11 @@ static Word16 ari_decode_14bits_notbl_fx(
Word16 ari_decode_14bits_pow_fx( Word16 *ptr, Word16 bp, Word16 bits, Word16 *res, Tastat *s, Word16 base )
{
    /* There are two versions to call: pow_ivas or pow_fx (default) */
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC3
    return ari_decode_14bits_pow_ivas( ptr, bp, bits, res, s, base );
#else
    return ari_decode_14bits_notbl_fx( ptr, bp, bits, res, s, base, ari_lookup_pow_fx );
#endif
}

/*------------------------------------------------------------------------
@@ -682,7 +692,11 @@ Word16 ari_decode_14bits_pow_fx( Word16 *ptr, Word16 bp, Word16 bits, Word16 *re
 *-------------------------------------------------------------------------*/
Word16 ari_decode_14bits_sign_fx( Word16 *ptr, Word16 bp, Word16 bits, Word16 *res, Tastat *s )
{
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC3
    return ari_decode_14bits_sign_ivas( ptr, bp, bits, res, s );
#else
    return ari_decode_14bits_notbl_fx( ptr, bp, bits, res, s, 0, ari_lookup_sign_fx );
#endif
}

/*---------------------------------------------------------------