Commit 1f8c7615 authored by Manuel Jander's avatar Manuel Jander
Browse files

Make FIX_2402_REPL_EVS_ARI_CODEC_DEC2 independently switchable and disable...

Make FIX_2402_REPL_EVS_ARI_CODEC_DEC2 independently switchable and disable FIX_2402_REPL_EVS_ARI_CODEC_DEC2.
parent acec7f40
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@
#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_DEC2                /* FhG: basop issue 2402: replace EVS arith decoder with IVAS arith decoder in IGF SCF coder */
#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*/
+6 −6
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ Word32 ari_decode_overflow_fx( Tastat *s )
 * \param[i/o] st
 * \param[o] s
 */
#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#if !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC) || !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC2)
void ari_start_decoding_14bits_fx(
    Decoder_State *st,
    Tastat *s )
@@ -187,7 +187,7 @@ static Word16 ari_lookup_s17_fx(
}
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#if !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC) || !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC2)
static Word16 ari_lookup_s27_fx(
    Word32 cum,
    Word32 range,
@@ -324,7 +324,7 @@ static Word16 ari_lookup_s27_fx(
}
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#if !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC) || !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC2)
static Word16 ari_lookup_bit_fx(
    Word32 cum,
    Word32 range,
@@ -360,7 +360,7 @@ static Word16 ari_lookup_bit_fx(
}
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_DEC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#if !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC) || !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC2)
static Word16 ari_decode_14bits_ext_fx(
    Decoder_State *st,
    Tastat *s,
@@ -446,7 +446,7 @@ Word16 ari_decode_14bits_s17_ext_fx( Decoder_State *st, Tastat *s, UWord16 const
/**
 * \brief Only for 27 symbols with new extended Tables
 */
#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#if !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC) || !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC2)
Word16 ari_decode_14bits_s27_ext_fx( Decoder_State *st, Tastat *s, UWord16 const *cum_freq )
{
    return ari_decode_14bits_ext_fx( st, s, cum_freq, ari_lookup_s27_fx );
@@ -457,7 +457,7 @@ Word16 ari_decode_14bits_s27_ext_fx( Decoder_State *st, Tastat *s, UWord16 const
 * \brief Only for decoding one bit with uniform probability:
 * the equivalent cum_freq table used is {16384, 8192, 0}
 */
#ifndef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#if !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC) || !defined(FIX_2402_REPL_EVS_ARI_CODEC_DEC2)
Word16 ari_decode_14bits_bit_ext_fx( Decoder_State *st, Tastat *s )
{
    static const UWord16 cum_freq[3] = { 16384, 8192, 0 };
+6 −5
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ static Word16 arith_decode_bits_fx(
    {
        x = lshl( x, 1 );
        /* decode one bit using the new raw AC function */
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
        static const UWord16 cum_freq[3] = { 16384, 8192, 0 };
        bit = ivas_ari_decode_14bits_bit_ext_1_lfe( st, &hPrivateData->acState, cum_freq, extra_bits_read );
#else
@@ -120,7 +120,7 @@ static Word16 arith_decode_residual_fx(
    move16();

    /* decode one of the IGF_SYMBOLS_IN_TABLE == 27 alphabet symbols using the new raw AC function */
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
    val = ivas_ari_decode_14bits_bit_ext_1_lfe( st, &hPrivateData->acState, cumulativeFrequencyTable, extra_bits_read ); // Q0
#else
    val = ari_decode_14bits_s27_ext_fx( st, &hPrivateData->acState, cumulativeFrequencyTable ); // Q0
@@ -192,7 +192,7 @@ static void arith_decode_flush_fx(
#endif
)
{
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
    ivas_ari_done_decoding_14bits_ext_1_lfe( st, *extra_bits_read );
#else
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
@@ -244,7 +244,7 @@ static void decode_sfe_vector_fx(
                /* (t == 0) && (f == 0) */
                /* decode one of the IGF_SYMBOLS_IN_TABLE == 27 alphabet symbols using the new raw AC function */
                /* NOTE: the float equivalent uses a tmp variable + explicit cast here to avoid undefined behaviour here. This BASOP version does not need it as it already uses signed Word16 return value here. */
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
                res = ivas_ari_decode_14bits_bit_ext_1_lfe( st, &hPrivateData->acState, (const UWord16 *) hPrivateData->cf_se00, extra_bits_read ); // Q0
#else
                res = ari_decode_14bits_s27_ext_fx( st, &hPrivateData->acState, (const UWord16 *) hPrivateData->cf_se00 );
@@ -411,8 +411,9 @@ void IGFSCFDecoderDecode(
    move16();
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
    Word16 extra_bits_read = 0;
    move16();
#endif
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
    ivas_ari_start_decoding_14bits_ext_1_lfe( st, &hPublicData->acState, &extra_bits_read );
#else
    ari_start_decoding_14bits_fx( st, &hPublicData->acState ); /* start AC decoding */