Commit a421d715 authored by multrus's avatar multrus
Browse files

[cleanup] accept JBM_TSM_ON_TCS

parent 87f3ba37
Loading
Loading
Loading
Loading
+0 −45
Original line number Diff line number Diff line
@@ -82,9 +82,7 @@ static
#ifdef VARIABLE_SPEED_DECODING
#define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20
#endif
#ifdef JBM_TSM_ON_TCS
#define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20
#endif

typedef struct
{
@@ -136,12 +134,10 @@ typedef struct
    char *tsmScaleFileName;
    uint16_t tsmScale;
#endif
#ifdef JBM_TSM_ON_TCS
#ifdef DEBUG_JBM_CMD_OPTION
    uint16_t frontendFetchSizeMs;
#endif
#endif
#endif

} DecArguments;

@@ -389,7 +385,6 @@ int main(
        goto cleanup;
    }

#ifdef JBM_TSM_ON_TCS
    /*------------------------------------------------------------------------------------------*
     * Configure VoIP mode
     *------------------------------------------------------------------------------------------*/
@@ -414,7 +409,6 @@ int main(
    }
#endif
#endif
#endif

#ifdef DEBUGGING
    /*-----------------------------------------------------------------*
@@ -642,17 +636,6 @@ int main(

    if ( arg.voipMode )
    {
#ifndef JBM_TSM_ON_TCS
#ifdef VARIABLE_SPEED_DECODING
        if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK )
#endif
        {
            fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
        }
#endif
        error = decodeVoIP( arg, hBsReader, hIvasDec );
    }
#ifdef VARIABLE_SPEED_DECODING
@@ -905,11 +888,9 @@ static bool parseCmdlIVAS_dec(
    arg->tsmScaleFileEnabled = false;
    arg->tsmScaleFileName = NULL;
#endif
#ifdef JBM_TSM_ON_TCS
#ifdef DEBUG_JBM_CMD_OPTION
    arg->frontendFetchSizeMs = JBM_FRONTEND_FETCH_FRAMESIZE_MS;
#endif
#endif
#ifdef DEBUG_JBM_CMD_OPTION
    arg->noBadFrameDelay = false;
#endif
@@ -1078,7 +1059,6 @@ static bool parseCmdlIVAS_dec(
            }
        }
#endif
#ifdef JBM_TSM_ON_TCS
#ifdef DEBUG_JBM_CMD_OPTION
        else if ( strcmp( argv_to_upper, "-VOIP_FRAMESIZE" ) == 0 )
        {
@@ -1099,7 +1079,6 @@ static bool parseCmdlIVAS_dec(
            }
        }
#endif
#endif
#endif /* #ifdef DEBUGGING */

        else if ( strcmp( argv_to_upper, "-MIME" ) == 0 )
@@ -1388,11 +1367,9 @@ static void usage_dec( void )
    fprintf( stdout, "-VS fac             : Variable Speed mode: change speed of playout fac as integer in percent.\n" );
    fprintf( stdout, "                      50 <= fac <= 150; fac<100 faster, fac>100 slower\n" );
#endif
#ifdef JBM_TSM_ON_TCS
#ifdef DEBUG_JBM_CMD_OPTION
    fprintf( stdout, "-VOIP_framesize     : VoIP mode: acoustic frontend fetch frame size (must be multiples of 5!)\n" );
#endif
#endif
#endif
    fprintf( stdout, "-fec_cfg_file       : Optimal channel aware configuration computed by the JBM   \n" );
    fprintf( stdout, "                      as described in Section 6.3.1 of TS26.448. The output is \n" );
@@ -2077,10 +2054,8 @@ static ivas_error decodeVoIP(

    uint32_t nextPacketRcvTime_ms = 0;
    uint32_t systemTime_ms = 0;
#ifdef JBM_TSM_ON_TCS
    uint32_t systemTimeInc_ms = (uint32_t) JBM_FRONTEND_FETCH_FRAMESIZE_MS;
    int32_t nFramesWritten = 0;
#endif
    int32_t nFramesFed = 0;


@@ -2216,26 +2191,18 @@ static ivas_error decodeVoIP(
     * Main receiving/decoding loop
     *------------------------------------------------------------------------------------------*/

#ifdef JBM_TSM_ON_TCS
#ifdef DEBUG_JBM_CMD_OPTION
    systemTimeInc_ms = arg.frontendFetchSizeMs;
#endif
#endif

    while ( 1 )
    {
        int16_t nOutSamples = 0;
#if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING )
        uint16_t nSamplesAvailableNext = 0;
#endif
#ifdef JBM_TSM_ON_TCS
#ifdef DEBUG_JBM_CMD_OPTION
        nOutSamples = (int16_t) ( arg.output_Fs / 1000 * arg.frontendFetchSizeMs );
#else
        nOutSamples = (int16_t) ( arg.output_Fs / 1000 * JBM_FRONTEND_FETCH_FRAMESIZE_MS );
#endif
#else
        nOutSamples = (int16_t) ( arg.output_Fs / 50 );
#endif
        /* read all packets with a receive time smaller than the system time */
        while ( nextPacketRcvTime_ms <= systemTime_ms )
@@ -2280,12 +2247,8 @@ static ivas_error decodeVoIP(

        /* we are finished when all packets have been received and jitter buffer is empty */
        /* also stop when the input file contains less than two frames, because JBM cannot calculate a delay value and won't start decoding */
#ifdef JBM_TSM_ON_TCS
        /* last clause should make sure that for BE tests we end up with the same number of samples...*/
        if ( nextPacketRcvTime_ms == (uint32_t) ( -1 ) && ( IVAS_DEC_VoIP_IsEmpty( hIvasDec, nOutSamples ) || nFramesFed < 2 ) )
#else
        if ( nextPacketRcvTime_ms == (uint32_t) ( -1 ) && ( IVAS_DEC_VoIP_IsEmpty( hIvasDec ) || nFramesFed < 2 ) )
#endif
        {
            break;
        }
@@ -2293,10 +2256,8 @@ static ivas_error decodeVoIP(

        /* decode and get samples */
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms
#if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING )
                                                 ,
                                                 &nSamplesAvailableNext
#endif
#ifdef SUPPORT_JBM_TRACEFILE
                                                 ,
                                                 writeJbmTraceFileFrameWrapper,
@@ -2386,7 +2347,6 @@ static ivas_error decodeVoIP(
                delayNumSamples -= nOutSamples;
            }

#ifdef JBM_TSM_ON_TCS
            /* Write ISM metadata to external file(s) */
            if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT )
            {
@@ -2433,7 +2393,6 @@ static ivas_error decodeVoIP(
                    }
                }
            }
#endif
        }

        if ( !arg.quietModeEnabled )
@@ -2442,12 +2401,8 @@ static ivas_error decodeVoIP(
        }

        frame++;
#ifdef JBM_TSM_ON_TCS
        systemTime_ms += systemTimeInc_ms;
        nFramesWritten++;
#else
        systemTime_ms += 20;
#endif

#ifdef WMOPS
        update_mem();
+0 −2
Original line number Diff line number Diff line
@@ -941,7 +941,6 @@ void SynthesisSTFT(
}


#ifdef JBM_TSM_ON_TCS
/*-------------------------------------------------------------------
 * SynthesisSTFT_dirac()
 *
@@ -1007,7 +1006,6 @@ void SynthesisSTFT_dirac(

    return;
}
#endif


/*-------------------------------------------------------------------
+0 −6
Original line number Diff line number Diff line
@@ -203,7 +203,6 @@ typedef enum

#define IVAS_NUM_SUPPORTED_FS                   3                           /* number of supported sampling-rates in IVAS */

#ifdef JBM_TSM_ON_TCS
#define CLDFB_SLOT_NS                           1250000L                    /* 1.25ms: CLDFB slot length */
#define MAX_JBM_SUBFRAMES_5MS                   8
#define DEFAULT_JBM_SUBFRAMES_5MS               4
@@ -221,7 +220,6 @@ typedef enum
    TC_BUFFER_MODE_RENDERER,
    TC_BUFFER_MODE_BUFFER
} TC_BUFFER_MODE;
#endif

/*----------------------------------------------------------------------------------*
 * IVAS Bitrates
@@ -1393,11 +1391,7 @@ typedef enum
#define PARAM_MC_REG_GHAT                       (0.001f)                    /* Regularization factor for mixing matrix calculation */
#define PARAM_MC_MAX_PARAMETER_BANDS            20                          /* Maximum number of parameter bands */
#define PARAM_MC_MAX_PARAMETER_BANDS_RES        14                          /* Maximum number of parameter bands with decorrelation */
#ifdef JBM_TSM_ON_TCS
#define PARAM_MC_MAX_NSLOTS                     MAX_JBM_CLDFB_TIMESLOTS     /* Maximum number of CLDFB slots in a frame */
#else
#define PARAM_MC_MAX_NSLOTS                     16                          /* Maximum number of CLDFB slots in a frame */
#endif
#define PARAM_MC_MAX_NSLOTS_IN_SUBFRAME          4                          /* Maximum number of CLDFB slots in a subframe */
#define PARAM_MC_NSUBFRAMES_DEC                  4                          /* Number of subframes for the synthesis in the decoder */
#define PARAM_MC_MAX_BANDS_IN_PARAMETER_BAND    30                          /* Maximum number of CLDFB frequency bands within a parameter band */
+0 −129

File changed.

Preview size limit exceeded, changes collapsed.

+0 −2
Original line number Diff line number Diff line
@@ -708,9 +708,7 @@ typedef struct ivas_td_decorr_state_t
    int16_t num_apd_sections;
    int16_t ducking_flag;

#ifdef JBM_TSM_ON_TCS
    int16_t offset;
#endif

} ivas_td_decorr_state_t;

Loading