Commit a8ffd97e authored by malenov's avatar malenov
Browse files

enable the support of -force TCX10|TCX20 on the encoder command-line

parent 909f10c3
Loading
Loading
Loading
Loading
Loading
+32 −1
Original line number Diff line number Diff line
@@ -998,7 +998,24 @@ static bool parseCmdlIVAS_enc(
            }
            else
            {
#ifdef SUPPORT_FORCE_TCX10_TCX20
                if ( arg->forcedMode == IVAS_ENC_FORCE_TCX10 )
                {
                    strcpy( stmp, "TCX10" );
                }
                else if ( arg->forcedMode == IVAS_ENC_FORCE_TCX20 )
                {
                    strcpy( stmp, "TCX20" );
                }
                else
                {
                    strncpy( stmp, argv[i + 1], sizeof( stmp ) );
                }

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

            i += 2;
@@ -1919,10 +1936,24 @@ static IVAS_ENC_FORCED_MODE parseForcedMode(
    {
        return IVAS_ENC_FORCE_GSC;
    }
    if ( ( strcmp( forcedModeChar, "TCX" ) == 0 ) || ( strcmp( forcedModeChar, "'TCX'" ) == 0 ) )
    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;
+6 −0
Original line number Diff line number Diff line
@@ -190,8 +190,14 @@
#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
+2 −1
Original line number Diff line number Diff line
@@ -45,12 +45,13 @@
#pragma warning(disable:4310)     /* cast truncates constant value this affects mainly constants tables*/
#endif

/*#define DEBUGGING*/                             /* Allows debugging message to be printed out during runtime */
#define DEBUGGING                             /* Allows debugging message to be printed out during runtime */
#ifdef DEBUGGING
#define DEBUG_MODE_INFO                       /* Define to output most important parameters to the subdirectory "res/" */
#define DEBUG_MODE_INFO_TWEAK                 /* Enable command line switch to specify subdirectory for debug info output inside "./res/" */
#define DEBUG_FORCE_MDCT_STEREO_MODE      /* Force stereo mode decision for MDCT stereo: -stereo 3 1 forces L/R coding and -stereo 3 2 forces full M/S coding */
/*#define DBG_WAV_WRITER*/                    /* Enable dbgwrite_wav() function for generating ".wav" files */
#define SUPPORT_FORCE_TCX10_TCX20             /* VA: Enable -force tcx10|tcx20 command-line option */
#endif

#define SUPPORT_JBM_TRACEFILE                   /* Support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */
+0 −1
Original line number Diff line number Diff line
@@ -989,7 +989,6 @@ static void init_modes_ivas_fx(
        move16();
    }


    /* TCX mode (TCX20 TCX10_10 or NO_TCX) */
    if ( st->hTcxEnc != NULL )
    {
+11 −0
Original line number Diff line number Diff line
@@ -244,10 +244,21 @@ void ivas_decision_matrix_enc_fx(
        {
            st->core = ACELP_CORE;
        }
#ifdef SUPPORT_FORCE_TCX10_TCX20
        else if ( st->force == FORCE_TCX10 )
        {
            st->core = TCX_10_CORE;
        }
        else if ( st->force == FORCE_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;
Loading