Commit 36bca4da authored by emerit's avatar emerit
Browse files

version tested

parent 15fa87b6
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@
#endif
#include "wmc_auto.h"
#include "render_config_reader.h"
#ifdef NO_DIEGETIC_PAN
#include "cnst.h"
#endif


#define WMC_TOOL_SKIP
@@ -677,7 +680,14 @@ static bool parseCmdlIVAS_dec(
    arg->renderConfigFilename = NULL;

    arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192;
#ifdef NO_DIEGETIC_PAN
    arg->no_diegetic_pan = FLT_MAX;
#else
    arg->no_diegetic_pan = 0.f;
#endif
#ifdef DEBUG_FOA_AGC
    arg->agcBitstream = NULL;
#endif

    /*-----------------------------------------------------------------*
     * Initialization
@@ -872,8 +882,11 @@ static bool parseCmdlIVAS_dec(
        else if ( strcmp( argv_to_upper, "-NO_DIEGETIC_PAN" ) == 0 )
        {
            i++;

            if ( argc - i <= 4 || argv[i][0] == '-' )
#ifdef NO_DIEGETIC_PAN
            if ( (( argv[i][0] != '-' ) && ( ( strlen( argv[0] ) >= 1 ) && ( ( argv[i][0] != '0' ) && ( argv[i][0] != '1' )))) || ( ( argv[i][0] == '-' ) && ( ( strlen( argv[i] ) > 1 ) && ( ( argv[i][1] != '0' ) && ( argv[i][1] != '1' ) ) ) ) )
#else
            if ( argc - i <= 4 || ( argv[i][0] == '-' ) )
#endif
            {
                fprintf( stderr, "Error: Argument for panning option not specified!\n\n" );
                usage_dec();
@@ -939,6 +952,12 @@ static bool parseCmdlIVAS_dec(
    {
        arg->outputFormat = IVAS_DEC_OUTPUT_MONO;
        arg->decMode = IVAS_DEC_MODE_EVS;
#ifdef NO_DIEGETIC_PAN
        if ( ( arg->no_diegetic_pan <= 1.f ) && ( arg->no_diegetic_pan >= -1.f ) )
        {
            arg->outputFormat = IVAS_DEC_OUTPUT_STEREO;
        }
#endif
    }

    /*-----------------------------------------------------------------*
+8 −0
Original line number Diff line number Diff line
@@ -605,7 +605,11 @@ int main(
    IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 };
    IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 };

#ifdef NO_DIEGETIC_PAN
    if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.noDiegeticPan ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) );
        exit( -1 );
@@ -1403,7 +1407,11 @@ static CmdlnArgs defaultArgs(
    clearString( args.renderConfigFilePath );

    args.orientationTracking = IVAS_ORIENT_TRK_REF;
#ifdef NO_DIEGETIC_PAN
    args.noDiegeticPan = FLT_MAX;
#else
    args.noDiegeticPan = 0.0f;
#endif

    args.delayCompensationEnabled = true;
    args.quietModeEnabled = false;
+4 −0
Original line number Diff line number Diff line
@@ -154,6 +154,10 @@ typedef enum
    RENDERER_PARAM_ISM,
    RENDERER_BINAURAL_MIXER_CONV,
    RENDERER_BINAURAL_MIXER_CONV_ROOM
#ifdef NO_DIEGETIC_PAN
    ,
    RENDERER_NO_DIEGETIC_DOWNMIX
#endif

} RENDERER_TYPE;

+2 −0
Original line number Diff line number Diff line
@@ -150,6 +150,8 @@
#define MC_JBM                                          /* FhG: extend JBM beyond mono for running IVAS in VoIP mode (contribution 19) */
#define FIX_265_MC_BRATE_SWITCHING                      /* Issue 265: fix use-of-uninitialized-value in MC bitrate switching */

#define NO_DIEGETIC_PAN
#define FIX_CRASH_EVS_BITSTREAM_WITH_OUTPUT

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+32 −0
Original line number Diff line number Diff line
@@ -141,11 +141,25 @@ ivas_error ivas_dec(
        /* Metadata decoding and configuration */
        if ( st_ivas->ism_mode == ISM_MODE_PARAM )
        {
#ifdef FIX_CRASH_EVS_BITSTREAM_WITH_OUTPUT
            if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hDirAC->hParamIsm ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#else
            ivas_ism_metadata_dec( ivas_total_brate, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hDirAC->hParamIsm );
#endif
        }
        else /* ISM_MODE_DISC */
        {
#ifdef FIX_CRASH_EVS_BITSTREAM_WITH_OUTPUT
            if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, NULL ) != IVAS_ERR_OK ) )
            {
                return error;
            }
#else
            ivas_ism_metadata_dec( ivas_total_brate, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, NULL );
#endif
        }

        for ( n = 0; n < st_ivas->nchan_transport; n++ )
@@ -171,6 +185,15 @@ ivas_error ivas_dec(
            {
                ivas_mono_downmix_render_passive( st_ivas, output, output_frame );
            }
#ifdef NO_DIEGETIC_PAN
            else if ( st_ivas->renderer_type == RENDERER_NO_DIEGETIC_DOWNMIX )
            {
                float mixer_left = ( st_ivas->hDecoderConfig->no_diegetic_pan + 1.f ) * 0.5f;
                float mixer_rigth = 1.f - mixer_left;
                v_multc( output[0], mixer_rigth, output[1], output_frame );
                v_multc( output[0], mixer_left, output[0], output_frame );
            }
#endif
            else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC )
            {
                ivas_param_ism_dec( st_ivas, output );
@@ -189,6 +212,15 @@ ivas_error ivas_dec(
            {
                ivas_mono_downmix_render_passive( st_ivas, output, output_frame );
            }
#ifdef NO_DIEGETIC_PAN
            else if ( st_ivas->renderer_type == RENDERER_NO_DIEGETIC_DOWNMIX )
            {
                float mixer_left = ( st_ivas->hDecoderConfig->no_diegetic_pan + 1.f ) * 0.5f;
                float mixer_rigth = 1.f - mixer_left;
                v_multc( output[0], mixer_rigth, output[1], output_frame );
                v_multc( output[0], mixer_left, output[0], output_frame );
            }
#endif
            else if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
                /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */
Loading