Commit f13578fb authored by emerit's avatar emerit
Browse files

Merge Orange branch to orange one

parent 5320dde6
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -366,6 +366,7 @@ int main(
    /*------------------------------------------------------------------------------------------*
     * Configure the decoder
     *------------------------------------------------------------------------------------------*/

#ifdef NON_DIEGETIC_PAN
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK )
#else
@@ -811,6 +812,7 @@ static bool parseCmdlIVAS_dec(
#else
    arg->no_diegetic_pan = 0.f;
#endif

    /*-----------------------------------------------------------------*
     * Initialization
     *-----------------------------------------------------------------*/
@@ -1050,6 +1052,9 @@ static bool parseCmdlIVAS_dec(
#endif
            strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 );
            argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0';
#ifdef NON_DIEGETIC_PAN
            to_upper( argv_to_upper );
#endif
            if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) )
            {
#ifdef NON_DIEGETIC_PAN
@@ -1086,7 +1091,7 @@ static bool parseCmdlIVAS_dec(
                if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f )
#endif
                {
                    fprintf( stderr, "Error: Incorrect value for panning option argument specified: %s\n\n", argv[i] );
                    fprintf( stderr, "Error: Incorrect value for panning gain value specified: %s\n\n", argv[i] );
                    usage_dec();
                    return false;
                }
@@ -1143,7 +1148,7 @@ static bool parseCmdlIVAS_dec(
#ifdef NON_DIEGETIC_PAN
        if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputFormat != IVAS_DEC_OUTPUT_STEREO ) )
        {
            fprintf( stderr, "Error: if non diegetic pan flag is specified output must be stereo\n\n" );
            fprintf( stderr, "Error: non-diegetic panning is supported in stereo only\n\n" );
            usage_dec();
            return false;
        }
@@ -1266,7 +1271,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, "-non_diegetic_pan    : panning mono non-diegetic sound to stereo -90<= pan <=90,\n" );
    fprintf( stdout, "-non_diegetic_pan P : panning mono non-diegetic sound to stereo with paning P, -90<= P <=90,\n" );
    fprintf( stdout, "                      left or l or 90->left, right or r or -90->right, center or c or  0->middle\n" );
    fprintf( stdout, "-q                  : Quiet mode, no frame counter\n" );
    fprintf( stdout, "                      default is deactivated\n" );
+1 −1
Original line number Diff line number Diff line
@@ -559,7 +559,7 @@ int main(
#ifdef NON_DIEGETIC_PAN
    if ( ( args.nonDiegeticPan ) && ( args.inConfig.multiChannelBuses[0].audioConfig != IVAS_REND_AUDIO_CONFIG_MONO ) && ( args.inConfig.numAudioObjects != 1 ) )
    {
        fprintf( stderr, "invalid configuration non diegetic pan flag required mono input" );
        fprintf( stderr, "invalid configuration - non-diegetic panning requires mono input" );
        exit( -1 );
    }
    if ( args.nonDiegeticPan )
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ typedef enum
#define MAX_CICP_CHANNELS                       16                          /* max channels for loudspeaker layouts (16 for custom layouts)*/
#define MAX_OUTPUT_CHANNELS                     16                          /* Maximum number of output channels (HOA 3rd order) */
#ifdef NON_DIEGETIC_PAN
#define MAX_OUTPUT_CHANNELS_NI_DIEGETIC_PAN     2                          /* Maximum number of output channels with non diegetic pan */
#define MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN     2                           /* Maximum number of output channels with non diegetic panning */
#endif

#define BINAURAL_CHANNELS                       2                           /* number of channels for binaural output configuration */
+1 −0
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ ivas_error ivas_ism_config(
        if ( ism_total_brate >= ISM_EXTENDED_METADATA_BRATE )
        {
            nb_bits_metadata[0] += ISM_EXTENDED_METADATA_BITS;

#ifdef ISM_NON_DIEGETIC_PAN
            if ( ism_extended_metadata_flag )
            {
+1 −1
Original line number Diff line number Diff line
@@ -791,7 +791,7 @@ ivas_error ivas_set_ism_metadata(
    const float yaw,                                            /* i  : yaw                                         */
#ifdef ISM_NON_DIEGETIC_PAN
    const float pitch,                                          /* i  : pitch                                       */
    const int16_t non_diegetic_flag                             /* i  : non-diegetic flag                           */
    const int16_t non_diegetic_flag                             /* i  : non-diegetic object flag                    */
#else
    const float pitch                                           /* i  : pitch                                       */
#endif
Loading