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

introduced additional macro for the encoder replacement (EVS -> IVAS arith codec)

parent fa85014d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@
#define FIX_BASOP_2530_IVAS_DECISION_MAT                /* VA: Fix ambiguous usage of extract_l() */
#define FIX_2402_SIMPLIFY_ARI_CODEC                     /* FhG: basop issue 2402: simplify processing in arithmetic decoding, symbol table lookup, all BE */
#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_ENC                 /* FhG: basop issue 2402: replace EVS arith encoder with IVAS arith encoder */


/* #################### End BE switches ################################## */
+24 −0
Original line number Diff line number Diff line
@@ -1458,17 +1458,24 @@ void encode_acelp_gains_fx(
    Word16 noisy_speech_flag /* (i) : noisy speech flag                                            */
);

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_ENC
void ari_start_encoding_14bits_fx(
    TastatEnc *s );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_ENC
void ari_copy_states_fx(
    TastatEnc *source,
    TastatEnc *dest );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifdef FIX_2402_REPL_EVS_ARI_CODEC_ENC
void ari_copy_states_ivas_fx(
    Tastat *source,
    Tastat *dest );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_encode_14bits_ext_fx(
    Word16 *ptr, /* Q0 */
    Word16 bp,   /* Q0 */
@@ -1476,6 +1483,7 @@ Word16 ari_encode_14bits_ext_fx(
    Word32 symbol,          /* Q0 */
    UWord16 const *cum_freq /* Q0 */
);
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

Word16 ari_put_bit_plus_follow(
    Word16 ptr[],          /* o  : bit-stream                              Q0*/
@@ -1484,10 +1492,12 @@ Word16 ari_put_bit_plus_follow(
    Word16 bit             /* i  : bit to send                             Q0*/
);

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_done_encoding_14bits_fx(
    Word16 *ptr, /* Q0 */
    Word16 bp,   /* Q0 */
    TastatEnc *s );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

void reset_rf_indices_fx(
    Encoder_State *st /* i  : state structure - contains partial RF indices     */
@@ -1814,12 +1824,17 @@ void find_wsp_fx(
    const Word16 nb_subfr /* i  : number of subframes                   */
);

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_encode_overflow_fx(
    TastatEnc *s );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifdef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_encode_overflow_ivas_fx(
    Tastat *s );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_encode_14bits_range_fx(
    Word16 *ptr, /* Q0 */
    Word16 bp,   /* Q0 */
@@ -1828,7 +1843,9 @@ Word16 ari_encode_14bits_range_fx(
    Word16 cum_freq_low, /* Q0 */
    Word16 cum_freq_high /* Q0 */
);
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifdef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_encode_14bits_range_ivas_fx(
    Word16 *ptr, /* Q0 */
    Word16 bp,   /* Q0 */
@@ -1837,7 +1854,9 @@ Word16 ari_encode_14bits_range_ivas_fx(
    Word16 cum_freq_low, /* Q0 */
    Word16 cum_freq_high /* Q0 */
);
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_encode_14bits_sign_fx(
    Word16 *ptr, /* Q0 */
    Word16 bp,   /* Q0 */
@@ -1845,18 +1864,23 @@ Word16 ari_encode_14bits_sign_fx(
    TastatEnc *s,
    Word16 sign /* Q0 */
);
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifndef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_done_cbr_encoding_14bits_fx(
    Word16 *ptr, /* Q0 */
    Word16 bp,   /* Q0 */
    Word16 bits, /* Q0 */
    TastatEnc *s );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

#ifdef FIX_2402_REPL_EVS_ARI_CODEC_ENC
Word16 ari_done_cbr_encoding_14bits_ivas_fx(
    Word16 *ptr, /* Q0 */
    Word16 bp,   /* Q0 */
    Word16 bits, /* Q0 */
    Tastat *s );
#endif /* FIX_2402_REPL_EVS_ARI_CODEC_ENC */

void tcx_hm_analyse_fx(
    const Word32 abs_spectrum[], /* i  : absolute spectrum            Q31-e */