Commit 8acccbbb authored by multrus's avatar multrus
Browse files

[cleanup] accept REMOVE_FORCE_SUBFRAME_BIN, FIX_107_5MS_SUBFRAME_RENDERING

parent 49049c0d
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
@@ -104,9 +104,6 @@ typedef struct
    char *renderConfigFilename;

#ifdef DEBUGGING
#ifndef REMOVE_FORCE_SUBFRAME_BIN
    bool forceSubframeBinauralization;
#endif
    IVAS_DEC_FORCED_REND_MODE forcedRendMode;
#ifdef DEBUG_FOA_AGC
    FILE *agcBitstream; /* temporary */
@@ -303,23 +300,7 @@ int main(
     * Configure the decoder
     *------------------------------------------------------------------------------------------*/

#ifdef REMOVE_FORCE_SUBFRAME_BIN
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled ) ) != IVAS_ERR_OK )
#else
#ifdef DEBUGGING
#ifdef FIX_351_HRTF_COMMAND
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.forceSubframeBinauralization ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.forceSubframeBinauralization ) ) != IVAS_ERR_OK )
#endif
#else
#ifdef FIX_351_HRTF_COMMAND
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation ) ) != IVAS_ERR_OK )
#endif
#endif
#endif
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -710,9 +691,6 @@ static bool parseCmdlIVAS_dec(
    float ftmp;

    arg->forcedRendMode = IVAS_DEC_FORCE_REND_UNFORCED;
#ifndef REMOVE_FORCE_SUBFRAME_BIN
    arg->forceSubframeBinauralization = false;
#endif
#ifdef DEBUG_FOA_AGC
    arg->agcBitstream = NULL;
#endif
@@ -864,13 +842,6 @@ static bool parseCmdlIVAS_dec(
                i++;
            }
        }
#ifndef REMOVE_FORCE_SUBFRAME_BIN
        else if ( strcmp( argv_to_upper, "-FORCE_SUBFRAME_BIN" ) == 0 ) /* Force binauralization to subframe (5 ms) resolution */
        {
            arg->forceSubframeBinauralization = true;
            i++;
        }
#endif
#ifdef DEBUG_MODE_INFO
#ifdef DEBUG_MODE_INFO_TWEAK
        /*-----------------------------------------------------------------*
@@ -1120,10 +1091,6 @@ static void usage_dec( void )
    fprintf( stdout, "-T File             : Head rotation specified by external trajectory File\n" );
    fprintf( stdout, "-hrtf File          : HRTF filter File used in BINAURAL output configuration\n" );
#ifdef DEBUGGING
#ifndef REMOVE_FORCE_SUBFRAME_BIN
    fprintf( stdout, "-force_subframe_bin : Forces parametric binauralizer code to use 5 ms time resolution even when\n" );
    fprintf( stdout, "                      output time resolution is larger.\n" );
#endif
    fprintf( stdout, "-FEC X              : Insert frame erasures, X = 0-10 is the percentage\n" );
    fprintf( stdout, "                      of erased frames, or X may be the name of binary file or \n" );
    fprintf( stdout, "                      file with G192 headers indicating GOOD FRAME or BAD FRAME\n" );
+0 −2
Original line number Diff line number Diff line
@@ -142,8 +142,6 @@
/*#define ITD_WINNER_GAIN_MODIFY */                     /* ITD optimization - WORK IN PROGRESS */
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */

#define FIX_107_5MS_SUBFRAME_RENDERING
#define REMOVE_FORCE_SUBFRAME_BIN                       /* Issue 355: remove obsolete "-force_subframe_bin" command-line option. */

#define PARAM_ISM_DTX_CNG                               /* FhG: contribution 9 - DTX-CNG for ParamISM */

+0 −14
Original line number Diff line number Diff line
@@ -2053,20 +2053,6 @@ static ivas_error doSanityChecks_IVAS(
    }

#ifdef DEBUGGING
#ifndef REMOVE_FORCE_SUBFRAME_BIN
    if ( st_ivas->hDecoderConfig->forceSubframeBinauralization )
    {
        /* Note about resolution of Binaural Renderers:                                                  *
         * - Parametric Binaural Renderer: 20 ms by default, can be forced to subframe (5 ms) resolution *
         * - FastConv Binaural Renderer: 5 ms by default                                                *
         * - TD objects Binaural Renderer: 20 ms by default                                              */

        if ( !( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM ) || !( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MC_FORMAT || st_ivas->ivas_format == ISM_FORMAT ) )
        {
            return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Wrong set-up: Forced subframe resolution parametric binauralization activated for non-binaural output." );
        }
    }
#endif
    if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) )
    {
        return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration: Time Domain object renderer not supported in this configuration" );
+0 −3
Original line number Diff line number Diff line
@@ -1154,9 +1154,6 @@ typedef struct decoder_config_structure

    /* temp. development parameters */
#ifdef DEBUGGING
#ifndef REMOVE_FORCE_SUBFRAME_BIN
    int16_t forceSubframeBinauralization; /* Flag for forcing Parametric binauralizer to subframe mode */
#endif
    int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */
#endif

+0 −16
Original line number Diff line number Diff line
@@ -225,11 +225,6 @@ static void init_decoder_config(
    hDecoderConfig->Opt_Headrotation = 0;
#ifdef FIX_351_HRTF_COMMAND
    hDecoderConfig->Opt_RendConfigCustom = 0;
#endif
#ifndef REMOVE_FORCE_SUBFRAME_BIN
#ifdef DEBUGGING
    hDecoderConfig->forceSubframeBinauralization = 0;
#endif
#endif
    hDecoderConfig->orientation_tracking = orientation_tracking;
    hDecoderConfig->no_diegetic_pan = no_diegetic_pan;
@@ -399,12 +394,6 @@ ivas_error IVAS_DEC_Configure(
    ,
    const int16_t renderConfigEnabled /* i  : enable Renderer config. file for binaural output */
#endif
#ifndef REMOVE_FORCE_SUBFRAME_BIN
#ifdef DEBUGGING
    ,
    const int16_t forceSubframeBinauralization /* i  : enable subframe binauralization             */
#endif
#endif
)
{
    Decoder_Struct *st_ivas;
@@ -450,11 +439,6 @@ ivas_error IVAS_DEC_Configure(
        hDecoderConfig->nchan_out = audioCfg2channels( hDecoderConfig->output_config );
    }

#ifndef REMOVE_FORCE_SUBFRAME_BIN
#ifdef DEBUGGING
    hDecoderConfig->forceSubframeBinauralization = forceSubframeBinauralization;
#endif
#endif
    hDecoderConfig->Opt_LsCustom = customLsOutputEnabled;
    hDecoderConfig->Opt_Headrotation = enableHeadRotation;
    hDecoderConfig->Opt_HRTF_binary = hrtfReaderEnabled;
Loading