Commit 101c1287 authored by emerit's avatar emerit
Browse files

change no diegetic to non diegetic

parent 06d4e1d7
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
#endif
#include "wmc_auto.h"
#include "render_config_reader.h"
#ifdef NO_DIEGETIC_PAN
#ifdef NON_DIEGETIC_PAN
#include "cnst.h"
#endif
#include "hrtf_file_reader.h"
@@ -109,7 +109,7 @@ typedef struct
    bool customLsOutputEnabled;
    char *customLsSetupFilename;
    int16_t orientation_tracking;
    float no_diegetic_pan;
    float non_diegetic_pan;
    bool renderConfigEnabled;
    char *renderConfigFilename;

@@ -193,7 +193,7 @@ int main(
     * Open decoder handle
     *------------------------------------------------------------------------------------------*/

    if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.no_diegetic_pan ) ) != IVAS_ERR_OK )
    if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.non_diegetic_pan ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -790,8 +790,8 @@ static bool parseCmdlIVAS_dec(
    arg->renderConfigFilename = NULL;

    arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192;
#ifdef NO_DIEGETIC_PAN
    arg->no_diegetic_pan = FLT_MAX;
#ifdef NON_DIEGETIC_PAN
    arg->non_diegetic_pan = FLT_MAX;
#else
    arg->no_diegetic_pan = 0.f;
#endif
@@ -1020,10 +1020,10 @@ static bool parseCmdlIVAS_dec(
            }
            i += 2;
        }
        else if ( strcmp( argv_to_upper, "-NO_DIEGETIC_PAN" ) == 0 )
        else if ( strcmp( argv_to_upper, "-NON_DIEGETIC_PAN" ) == 0 )
        {
            i++;
#ifdef NO_DIEGETIC_PAN
#ifdef NON_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] == '-' ) )
@@ -1038,21 +1038,21 @@ static bool parseCmdlIVAS_dec(
            argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0';
            if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) )
            {
                arg->no_diegetic_pan = 0.f;
                arg->non_diegetic_pan = 0.f;
            }
            else if ( ( strcmp( argv_to_upper, "LEFT" ) == 0 ) || ( strchr( argv_to_upper, 'L' ) != NULL ) )
            {
                arg->no_diegetic_pan = -1.f;
                arg->non_diegetic_pan = -1.f;
            }
            else if ( ( strcmp( argv_to_upper, "RIGHT" ) == 0 ) || ( strchr( argv_to_upper, 'R' ) != NULL ) )
            {
                arg->no_diegetic_pan = 1.f;
                arg->non_diegetic_pan = 1.f;
            }
            else
            {
                arg->no_diegetic_pan = (float) atof( argv_to_upper );
                arg->non_diegetic_pan = (float) atof( argv_to_upper );

                if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f )
                if ( arg->non_diegetic_pan > 1.0f || arg->non_diegetic_pan < -1.0f )
                {
                    fprintf( stderr, "Error: Incorrect value for panning option argument specified: %s\n\n", argv[i] );
                    usage_dec();
@@ -1094,8 +1094,8 @@ 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 ) )
#ifdef NON_DIEGETIC_PAN
        if ( ( arg->non_diegetic_pan <= 1.f ) && ( arg->non_diegetic_pan >= -1.f ) )
        {
            arg->outputFormat = IVAS_DEC_OUTPUT_STEREO;
        }
@@ -1207,7 +1207,7 @@ static void usage_dec( void )
    fprintf( stdout, "-rvf File           : Reference vector specified by external trajectory file\n" );
    fprintf( stdout, "                      works only in combination with '-otr ref_vec' and 'ref_vec_lev' modes\n" );
    fprintf( stdout, "-render_config File : Renderer configuration File\n" );
    fprintf( stdout, "-no_diegetic_pan    : panning mono non-diegetic sound to stereo -1<= pan <=1,\n" );
    fprintf( stdout, "-non_diegetic_pan    : panning mono non-diegetic sound to stereo -1<= pan <=1,\n" );
    fprintf( stdout, "                      left or l or 1->left, right or r or -1->right, center or c or  0->middle\n" );
    fprintf( stdout, "-q                  : Quiet mode, no frame counter\n" );
    fprintf( stdout, "                      default is deactivated\n" );
+5 −5
Original line number Diff line number Diff line
@@ -235,9 +235,9 @@ static const CmdLnParser_Option cliOptions[] = {
    },
    {
        .id = CmdLnOptionId_noDiegeticPan,
        .match = "no_diegetic_pan",
        .match = "non_diegetic_pan",
        .matchShort = "ndp",
        .description = "Panning mono no diegetic sound to stereo -1<= pan <= 1\nleft or l or 1->left, right or r or -1->right, center or c or 0 ->middle\n(todo: implementation)",
        .description = "Panning mono non diegetic sound to stereo -1<= pan <= 1\nleft or l or 1->left, right or r or -1->right, center or c or 0 ->middle\n(todo: implementation)",
    },
    {
        .id = CmdLnOptionId_orientationTracking,
@@ -668,7 +668,7 @@ int main(
    IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 };
    IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 };

#ifdef NO_DIEGETIC_PAN
#ifdef NON_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 )
@@ -1377,7 +1377,7 @@ static bool parseDiegeticPan(
            return false;
        }
    }
#ifdef NO_DIEGETIC_PAN
#ifdef NON_DIEGETIC_PAN
    return true;
#else
    return false;
@@ -1634,7 +1634,7 @@ static CmdlnArgs defaultArgs(
    clearString( args.renderConfigFilePath );

    args.orientationTracking = IVAS_ORIENT_TRK_NONE;
#ifdef NO_DIEGETIC_PAN
#ifdef NON_DIEGETIC_PAN
    args.noDiegeticPan = FLT_MAX;
#else
    args.noDiegeticPan = 0.0f;
+4 −4
Original line number Diff line number Diff line
@@ -153,9 +153,9 @@ typedef enum
    RENDERER_PARAM_ISM,
    RENDERER_BINAURAL_MIXER_CONV,
    RENDERER_BINAURAL_MIXER_CONV_ROOM
#ifdef NO_DIEGETIC_PAN
#ifdef NON_DIEGETIC_PAN
    ,
    RENDERER_NO_DIEGETIC_DOWNMIX
    RENDERER_NON_DIEGETIC_DOWNMIX
#endif

} RENDERER_TYPE;
@@ -1497,9 +1497,9 @@ typedef enum
{
    TDREND_PLAYSTATUS_INITIAL,
    TDREND_PLAYSTATUS_PLAYING
#ifdef ISM_NO_DIEGETIC_PAN    
#ifdef ISM_NON_DIEGETIC_PAN    
    ,
    TDREND_PLAYSTATUS_PLAYING_NO_DIEGETIC
    TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC
#endif    
} TDREND_PlayStatus_t;

+2 −2
Original line number Diff line number Diff line
@@ -170,9 +170,9 @@
#define ISSUE_24_CLEANUP_MCT_LFE                        /* Issue 24: Cleanup LFE path withing MCT */ 


#define NO_DIEGETIC_PAN
#define NON_DIEGETIC_PAN
#define FIX_CRASH_EVS_BITSTREAM_WITH_OUTPUT
#define ISM_NO_DIEGETIC_PAN
#define ISM_NON_DIEGETIC_PAN
/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
+6 −6
Original line number Diff line number Diff line
@@ -243,10 +243,10 @@ 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 )
#ifdef NON_DIEGETIC_PAN
            else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX )
            {
                float mixer_left = ( st_ivas->hDecoderConfig->no_diegetic_pan + 1.f ) * 0.5f;
                float mixer_left = ( st_ivas->hDecoderConfig->non_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 );
@@ -270,10 +270,10 @@ 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 )
#ifdef NON_DIEGETIC_PAN
            else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX )
            {
                float mixer_left = ( st_ivas->hDecoderConfig->no_diegetic_pan + 1.f ) * 0.5f;
                float mixer_left = ( st_ivas->hDecoderConfig->non_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 );
Loading