Commit 53c9dce2 authored by malenov's avatar malenov
Browse files

cleanup SUPPORT_FORCE_TCX10_TCX20

parent da5e4409
Loading
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -384,13 +384,11 @@ int main(
        goto cleanup;
    }

#ifdef SUPPORT_FORCE_TCX10_TCX20
#ifdef DEBUGGING
    if ( arg.forcedMode == IVAS_ENC_FORCE_TCX10 && totalBitrate < 48000 )
    {
        fprintf( stderr, "Warning: Enforcing the TCX10 mode is only supported for bitrates higher or equal than 48 kbps!\n\n" );
    }
#endif
#endif

    /*------------------------------------------------------------------------------------------*
@@ -1111,7 +1109,6 @@ static bool parseCmdlIVAS_enc(
            }
            else
            {
#ifdef SUPPORT_FORCE_TCX10_TCX20
                if ( arg->forcedMode == IVAS_ENC_FORCE_TCX10 )
                {
                    strcpy( stmp, "TCX10" );
@@ -1126,9 +1123,6 @@ static bool parseCmdlIVAS_enc(
                }

                fprintf( stdout, "Forcing codec to:       %s\n", stmp );
#else
                fprintf( stdout, "Forcing codec to:       %s\n", argv[i + 1] );
#endif
            }
#endif

@@ -2115,23 +2109,15 @@ static IVAS_ENC_FORCED_MODE parseForcedMode(
        return IVAS_ENC_FORCE_GSC;
    }
    if ( ( strcmp( forcedModeChar, "TCX" ) == 0 ) || ( strcmp( forcedModeChar, "'TCX'" ) == 0 )
#ifdef SUPPORT_FORCE_TCX10_TCX20
         || ( strcmp( forcedModeChar, "TCX20" ) == 0 ) || ( strcmp( forcedModeChar, "'TCX20'" ) == 0 )
#endif
    )
    {
#ifdef SUPPORT_FORCE_TCX10_TCX20
        return IVAS_ENC_FORCE_TCX20;
#else
        return IVAS_ENC_FORCE_TCX;
#endif
    }
#ifdef SUPPORT_FORCE_TCX10_TCX20
    if ( ( strcmp( forcedModeChar, "TCX10" ) == 0 ) || ( strcmp( forcedModeChar, "'TCX10'" ) == 0 ) )
    {
        return IVAS_ENC_FORCE_TCX10;
    }
#endif
    else if ( ( strcmp( forcedModeChar, "HQ" ) == 0 ) || ( strcmp( forcedModeChar, "'HQ'" ) == 0 ) )
    {
        return IVAS_ENC_FORCE_HQ;
@@ -2175,23 +2161,15 @@ static IVAS_ENC_FORCED_MODE parseForcedMode(
        return IVAS_ENC_FORCE_GSC;
    }
    if ( ( strcmp( forcedModeChar, "TCX" ) == 0 ) || ( strcmp( forcedModeChar, "'TCX'" ) == 0 )
#ifdef SUPPORT_FORCE_TCX10_TCX20
         || ( strcmp( forcedModeChar, "TCX20" ) == 0 ) || ( strcmp( forcedModeChar, "'TCX20'" ) == 0 )
#endif
    )
    {
#ifdef SUPPORT_FORCE_TCX10_TCX20
        return IVAS_ENC_FORCE_TCX20;
#else
        return IVAS_ENC_FORCE_TCX;
#endif
    }
#ifdef SUPPORT_FORCE_TCX10_TCX20
    if ( ( strcmp( forcedModeChar, "TCX10" ) == 0 ) || ( strcmp( forcedModeChar, "'TCX10'" ) == 0 ) )
    {
        return IVAS_ENC_FORCE_TCX10;
    }
#endif
    if ( ( strcmp( forcedModeChar, "HQ" ) == 0 ) || ( strcmp( forcedModeChar, "'HQ'" ) == 0 ) )
    {
        return IVAS_ENC_FORCE_HQ;
+0 −5
Original line number Diff line number Diff line
@@ -81,14 +81,9 @@
#define FORCE_MUSIC                     101             /* debugging - force music on the command line */
#define FORCE_ACELP                     102             /* debugging - force ACELP core on the command line */
#define FORCE_GSC                       103             /* debugging - force GSC core on the command line */
#ifdef SUPPORT_FORCE_TCX10_TCX20
#define FORCE_TCX10                     104             /* debugging - force TCX10 core on the command line */
#define FORCE_TCX20                     105             /* debugging - force TCX20 core on the command line */
#define FORCE_HQ                        106             /* debugging - force HQ core on the command line */
#else
#define FORCE_TCX                       104             /* debugging - force TCX core on the command line */
#define FORCE_HQ                        105             /* debugging - force HQ core on the command line */
#endif
#define FORCE_TD_RENDERER               201
#define FORCE_CLDFB_RENDERER            202
#endif
+0 −1
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@
/*#define DEBUG_MODE_LFE */                     /* define to output LFE relevant parameters */
/*#define DEBUG_FORCE_DIR*/                       /* Force modes/parameters by reading from external binary files */
#endif
#define SUPPORT_FORCE_TCX10_TCX20              /* VA: Enable -force tcx10|tcx20 command-line option */

#ifdef DEBUG_MODE_MDCT
#define DEBUG_PLOT_BITS
+0 −7
Original line number Diff line number Diff line
@@ -211,17 +211,10 @@ void ivas_decision_matrix_enc(
        {
            st->core = ACELP_CORE;
        }
#ifdef SUPPORT_FORCE_TCX10_TCX20
        else if ( st->force == FORCE_TCX20 || st->force == FORCE_TCX10 ) /* Initalizations should always happen with TCX20*/
        {
            st->core = TCX_20_CORE;
        }
#else
        else if ( st->force == FORCE_TCX )
        {
            st->core = TCX_20_CORE;
        }
#endif
        else if ( st->force == FORCE_HQ && st->element_mode != IVAS_CPE_MDCT && element_brate >= IVAS_24k4 )
        {
            st->core = HQ_CORE;
+0 −6
Original line number Diff line number Diff line
@@ -2358,18 +2358,12 @@ static ivas_error forcedModeApiToInternal(
        case IVAS_ENC_FORCE_GSC:
            *forcedModeInternal = FORCE_GSC;
            break;
#ifdef SUPPORT_FORCE_TCX10_TCX20
        case IVAS_ENC_FORCE_TCX10:
            *forcedModeInternal = FORCE_TCX10;
            break;
        case IVAS_ENC_FORCE_TCX20:
            *forcedModeInternal = FORCE_TCX20;
            break;
#else
        case IVAS_ENC_FORCE_TCX:
            *forcedModeInternal = FORCE_TCX;
            break;
#endif
        case IVAS_ENC_FORCE_HQ:
            *forcedModeInternal = FORCE_HQ;
            break;
Loading