Commit 27f9e45b authored by Manuel Jander's avatar Manuel Jander
Browse files

Cleanup, remove DEBUGGING_2402 and place all switches into options.h

parent 7f939161
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -97,8 +97,8 @@
#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 */
#define FIX_2402_REPL_IVAS_ARI_CODEC_DEC                /* FhG: basop issue 2402: replace EVS arith decoder with IVAS arith decoder */
#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_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*/
+0 −16
Original line number Diff line number Diff line
@@ -139,14 +139,8 @@ Word16 ACcontextMapping_decode2_no_mem_s17_LC(
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
    Word16 extra_bits_read = 0;
    ivas_ari_start_decoding_14bits_ext_1_lfe( st, &as, &extra_bits_read );
#ifdef DEBUGGING_2402
    printf( "ivas_ari_start\n" );
#endif
#else
    ari_start_decoding_14bits_fx( st, &as );
#ifdef DEBUGGING_2402
    printf( "ari_start\n" );
#endif
#endif

    overflow_bit_pos = st->next_bit_pos;
@@ -198,15 +192,8 @@ Word16 ACcontextMapping_decode2_no_mem_s17_LC(
            move16();
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
            r = ivas_ari_decode_14bits_bit_ext_1_lfe( st, &as, ari_pk_s17_LC_ext[pki], &extra_bits_read );
#ifdef DEBUGGING_2402
            printf( "r=%d, nbp=%d, ebr=%d\n", r, st->next_bit_pos, extra_bits_read );
#endif
#else
            r = ari_decode_14bits_s17_ext_fx( st, &as, ari_pk_s17_LC_ext[pki] );

#ifdef DEBUGGING_2402
            printf( "r=%d, nbp=%d, ebr=0\n", r, st->next_bit_pos );
#endif
#endif
            IF( LT_16( r, VAL_ESC ) )
            {
@@ -319,9 +306,6 @@ Word16 ACcontextMapping_decode2_no_mem_s17_LC(
        /* Set bitstream position to (start_bit_pos+nbbits-rest_bits) */
        get_next_indice_tmp_fx( st, sub( ( sub( add( start_bit_pos, nbbits ), rest_bits ) ), st->next_bit_pos ) );
    }
#ifdef DEBUGGING_2402
    printf( "loop exit, nbp=%d\n", st->next_bit_pos );
#endif

    /*Decode signs*/
    if ( hm_cfg )
+1 −35
Original line number Diff line number Diff line
@@ -12,12 +12,8 @@
#include "stat_dec.h"
#include "basop_util.h"
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
#define FIX_2402_REPL_EVS_ARI_CODEC_DEC2
#include "ivas_prot_fx.h"
#endif
#ifdef DEBUGGING_2402
#define FIX_2402_REPL_EVS_ARI_CODEC_DEC2
#endif

/**********************************************************************/ /**
initialization of an instance of this module
@@ -95,9 +91,6 @@ static Word16 arith_decode_bits_fx(
        bit = ivas_ari_decode_14bits_bit_ext_1_lfe( st, &hPrivateData->acState, cum_freq, extra_bits_read );
#else
        bit = ari_decode_14bits_bit_ext_fx( st, &hPrivateData->acState );
#endif
#ifdef DEBUGGING_2402
        printf( "decode %d: nbp=%d ebr=%d\n", __LINE__, st->next_bit_pos, *extra_bits_read );
#endif
        if ( bit != 0 )
        {
@@ -130,9 +123,6 @@ static Word16 arith_decode_residual_fx(
#else
    val = ari_decode_14bits_s27_ext_fx( st, &hPrivateData->acState, cumulativeFrequencyTable ); // Q0
#endif
#ifdef DEBUGGING_2402
    printf( "decode %d: nbp=%d ebr=%d\n", __LINE__, st->next_bit_pos, *extra_bits_read );
#endif

    /* meaning of the values of val: */
    /* esc_{0} IGF_MIN_ENC_SEPARATE ... IGF_MAX_ENC_SEPARATE esc_{IGF_SYMBOLS_IN_TABLE - 1} */
@@ -155,13 +145,6 @@ static Word16 arith_decode_residual_fx(
                                  extra_bits_read
#endif
    );                       // Q0
#ifdef DEBUGGING_2402
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
    printf( "extra=%d, extra_bits_read=%d\n", extra, *extra_bits_read );
#else
    printf( "extra=%d, extra_bits_read=%d\n", extra, 0 );
#endif
#endif
    IF( EQ_16( extra, 15 ) ) /* escape code 15 to indicate extra >= 15 */
    {
        /* decode addtional extra with 6 bits */
@@ -413,24 +396,13 @@ void IGFSCFDecoderDecode(
    /* insert data */
    hPublicData->bitsRead = st->next_bit_pos;
    move16();
#ifdef DEBUGGING_2402
    static Word16 cnt123 = 0;
#endif
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
    Word16 extra_bits_read = 0;
#endif
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC
    ivas_ari_start_decoding_14bits_ext_1_lfe( st, &hPublicData->acState, &extra_bits_read );
#ifdef DEBUGGING_2402
    printf( "ivas_ari_start\n" );
    printf( "start %d\n", ++cnt123 );
#endif
#else
    ari_start_decoding_14bits_fx( st, &hPublicData->acState ); /* start AC decoding */
#ifdef DEBUGGING_2402
    printf( "ari_start\n" );
    printf( "start %d\n", ++cnt123 );
#endif
#endif

    /* check if coder needs a reset and do it if necessary */
@@ -447,18 +419,12 @@ void IGFSCFDecoderDecode(
#endif
    );

#ifdef DEBUGGING_2402
    printf( "finish nbp=%d ebr=%d\n", st->next_bit_pos, extra_bits_read );
#endif
    arith_decode_flush_fx( st
#ifdef FIX_2402_REPL_EVS_ARI_CODEC_DEC2
                           ,
                           &extra_bits_read
#endif
    ); /* finish AC decoding */
#ifdef DEBUGGING_2402
    printf( "finish2 nbp=%d ebr=%d\n", st->next_bit_pos, extra_bits_read );
#endif

    /* advance history */
    Copy( sfe, hPublicData->prev, hPublicData->scfCountLongBlock[igfGridIdx] );