Loading apps/decoder.c +0 −65 Original line number Diff line number Diff line Loading @@ -117,17 +117,11 @@ typedef struct bool customLsOutputEnabled; char *customLsSetupFilename; int16_t orientation_tracking; #ifdef NON_DIEGETIC_PAN int16_t Opt_non_diegetic_pan; float non_diegetic_pan_gain; #else float no_diegetic_pan; #endif bool renderConfigEnabled; char *renderConfigFilename; #ifdef COMPLEXITY_LEVEL_INDICATION IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; #endif #ifdef DEBUGGING IVAS_DEC_FORCED_REND_MODE forcedRendMode; Loading Loading @@ -227,17 +221,9 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef FIX_439_OTR_PARAMS #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.no_diegetic_pan ) ) != IVAS_ERR_OK ) #endif #else #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.no_diegetic_pan ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -404,17 +390,9 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef FIX_439_OTR_PARAMS #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled ) ) != IVAS_ERR_OK ) #endif #else #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 if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -835,9 +813,7 @@ static bool parseCmdlIVAS_dec( arg->quietModeEnabled = false; arg->delayCompensationEnabled = true; arg->voipMode = false; #ifdef COMPLEXITY_LEVEL_INDICATION arg->complexityLevel = IVAS_DEC_COMPLEXITY_LEVEL_THREE; #endif arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; Loading Loading @@ -868,12 +844,8 @@ static bool parseCmdlIVAS_dec( arg->renderConfigFilename = NULL; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192; #ifdef NON_DIEGETIC_PAN arg->Opt_non_diegetic_pan = 0; arg->non_diegetic_pan_gain = 0.f; #else arg->no_diegetic_pan = 0.f; #endif #ifdef VARIABLE_SPEED_DECODING arg->variableSpeedMode = 0; arg->tsmScale = 100; Loading Loading @@ -1172,56 +1144,27 @@ static bool parseCmdlIVAS_dec( else if ( strcmp( argv_to_upper, "-NON_DIEGETIC_PAN" ) == 0 ) { i++; #ifdef NON_DIEGETIC_PAN arg->Opt_non_diegetic_pan = 1; #else if ( argc - i <= 4 || ( argv[i][0] == '-' ) ) { fprintf( stderr, "Error: Argument for panning option not specified!\n\n" ); usage_dec(); return false; } #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 arg->non_diegetic_pan_gain = 0.f; #else arg->no_diegetic_pan = 0.f; #endif } else if ( ( strcmp( argv_to_upper, "LEFT" ) == 0 ) || ( strchr( argv_to_upper, 'L' ) != NULL ) ) { #ifdef NON_DIEGETIC_PAN arg->non_diegetic_pan_gain = 1.f; #else arg->no_diegetic_pan = 1.f; #endif } else if ( ( strcmp( argv_to_upper, "RIGHT" ) == 0 ) || ( strchr( argv_to_upper, 'R' ) != NULL ) ) { #ifdef NON_DIEGETIC_PAN arg->non_diegetic_pan_gain = -1.f; #else arg->no_diegetic_pan = -1.f; #endif } else { #ifdef NON_DIEGETIC_PAN arg->non_diegetic_pan_gain = (float) atof( argv_to_upper ) / 90.f; if ( arg->non_diegetic_pan_gain > 1.0f || arg->non_diegetic_pan_gain < -1.0f ) #else arg->no_diegetic_pan = (float) atof( argv_to_upper ); if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f ) #endif { fprintf( stderr, "Error: Incorrect value for panning gain value specified: %s\n\n", argv[i] ); usage_dec(); Loading @@ -1230,7 +1173,6 @@ static bool parseCmdlIVAS_dec( } i++; } #ifdef COMPLEXITY_LEVEL_INDICATION else if ( strcmp( argv_to_upper, "-LEVEL" ) == 0 ) { int16_t level; Loading @@ -1248,7 +1190,6 @@ static bool parseCmdlIVAS_dec( fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); } } #endif /*-----------------------------------------------------------------* * Option not recognized Loading Loading @@ -1277,25 +1218,21 @@ static bool parseCmdlIVAS_dec( arg->customLsSetupFilename = argv[i]; } i++; #ifdef NON_DIEGETIC_PAN if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputFormat != IVAS_DEC_OUTPUT_STEREO ) ) { fprintf( stderr, "Error: non-diegetic panning is supported in stereo only\n\n" ); usage_dec(); return false; } #endif } else { arg->outputFormat = IVAS_DEC_OUTPUT_MONO; arg->decMode = IVAS_DEC_MODE_EVS; #ifdef NON_DIEGETIC_PAN if ( ( arg->Opt_non_diegetic_pan ) ) { arg->outputFormat = IVAS_DEC_OUTPUT_STEREO; } #endif } /*-----------------------------------------------------------------* Loading Loading @@ -1426,11 +1363,9 @@ static void usage_dec( void ) fprintf( stdout, " containing FEC pattern (short values of 0 (good) or 1 (bad))\n" ); fprintf( stdout, " default is OFF, if this option is not used\n" ); fprintf( stdout, "-force R : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" ); #ifdef COMPLEXITY_LEVEL_INDICATION fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); #endif #endif #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK fprintf( stdout, "-info <folder> : specify subfolder name for debug output\n" ); Loading apps/encoder.c +0 −19 Original line number Diff line number Diff line Loading @@ -111,9 +111,7 @@ typedef struct IVAS_ENC_CHANNEL_AWARE_CONFIG caConfig; const char *ca_config_file; bool mimeOutput; #ifdef COMPLEXITY_LEVEL_INDICATION IVAS_ENC_COMPLEXITY_LEVEL complexityLevel; #endif #ifdef DEBUGGING IVAS_ENC_FORCED_MODE forcedMode; Loading Loading @@ -881,9 +879,7 @@ static void initArgStruct( EncArguments *arg ) arg->ca_config_file = NULL; arg->mimeOutput = false; arg->ism_extended_metadata = false; #ifdef COMPLEXITY_LEVEL_INDICATION arg->complexityLevel = IVAS_ENC_COMPLEXITY_LEVEL_THREE; #endif #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; Loading Loading @@ -1136,31 +1132,18 @@ static bool parseCmdlIVAS_enc( { strncpy( stmp, argv[i], sizeof( stmp ) ); stmp[sizeof( stmp ) - 1] = '\0'; #ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING to_upper( stmp ); if ( strcmp( stmp, "LO" ) == 0 ) #else to_upper( argv[i] ); if ( strcmp( argv[i], "LO" ) == 0 ) #endif { arg->caConfig.fec_indicator = IVAS_ENC_FEC_LO; } #ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING else if ( strcmp( stmp, "HI" ) == 0 ) #else else if ( strcmp( argv[i], "HI" ) == 0 ) #endif { arg->caConfig.fec_indicator = IVAS_ENC_FEC_HI; } else { #ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING arg->ca_config_file = argv[i]; #else arg->ca_config_file = stmp; #endif } i++; Loading Loading @@ -1197,7 +1180,6 @@ static bool parseCmdlIVAS_enc( } #ifdef COMPLEXITY_LEVEL_INDICATION /*-----------------------------------------------------------------* * Complexity Level *-----------------------------------------------------------------*/ Loading @@ -1220,7 +1202,6 @@ static bool parseCmdlIVAS_enc( fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); } } #endif /*-----------------------------------------------------------------* * IVAS Formats Loading apps/renderer.c +0 −67 Original line number Diff line number Diff line Loading @@ -140,12 +140,8 @@ typedef struct #else int8_t orientationTracking; #endif #ifdef NON_DIEGETIC_PAN int16_t nonDiegeticPan; float nonDiegeticPanGain; #else float noDiegeticPan; #endif bool delayCompensationEnabled; bool quietModeEnabled; bool sceneDescriptionInput; Loading Loading @@ -560,7 +556,6 @@ int main( CmdlnArgs args = parseCmdlnArgs( argc, argv ); #ifdef NON_DIEGETIC_PAN if ( args.nonDiegeticPan && !( ( args.inConfig.numAudioObjects == 0 && args.inConfig.multiChannelBuses[0].audioConfig == IVAS_REND_AUDIO_CONFIG_MONO ) || ( args.inConfig.numAudioObjects > 0 && args.inConfig.audioObjects[0].audioConfig == IVAS_REND_AUDIO_CONFIG_OBJECT && args.inConfig.numAudioObjects == 1 ) ) ) { Loading @@ -573,7 +568,6 @@ int main( fprintf( stderr, "\ninvalid configuration - non-diegetic panning requires stereo output\n" ); exit( -1 ); } #endif positionProvider = IsmPositionProvider_open(); Loading Loading @@ -689,11 +683,7 @@ int main( IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 }; IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 }; #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain ) ) != 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 ); Loading Loading @@ -1366,7 +1356,6 @@ static bool parseOutConfig( return true; } #ifdef NON_DIEGETIC_PAN static bool parseDiegeticPan( char *value, float *nonDiegeticPan ) Loading Loading @@ -1396,38 +1385,6 @@ static bool parseDiegeticPan( } } return true; #else static bool parseDiegeticPan( char *value, float *noDiegeticPan ) { to_upper( value ); if ( ( strcmp( value, "CENTER" ) == 0 ) || ( strchr( value, 'C' ) != NULL ) ) { *noDiegeticPan = 0.f; } else if ( ( strcmp( value, "LEFT" ) == 0 ) || ( strchr( value, 'L' ) != NULL ) ) { *noDiegeticPan = -1.f; } else if ( ( strcmp( value, "RIGHT" ) == 0 ) || ( strchr( value, 'R' ) != NULL ) ) { *noDiegeticPan = 1.f; } else { *noDiegeticPan = (float) atof( value ); if ( *noDiegeticPan > 1.0f || *noDiegeticPan < -1.0f ) { fprintf( stderr, "Error: Incorrect value for panning option argument specified!\n\n" ); return false; } } return false; #endif } static bool parseOrientationTracking( Loading Loading @@ -1708,12 +1665,8 @@ static CmdlnArgs defaultArgs( #else args.orientationTracking = IVAS_ORIENT_TRK_NONE; #endif #ifdef NON_DIEGETIC_PAN args.nonDiegeticPan = 0; args.nonDiegeticPanGain = 0.f; #else args.noDiegeticPan = 0.0f; #endif args.delayCompensationEnabled = true; args.quietModeEnabled = false; Loading Loading @@ -1805,18 +1758,12 @@ static void parseOption( break; case CmdLnOptionId_nonDiegeticPan: assert( numOptionValues == 1 ); #ifdef NON_DIEGETIC_PAN if ( !parseDiegeticPan( optionValues[0], &args->nonDiegeticPanGain ) ) #else if ( !parseDiegeticPan( optionValues[0], &args->noDiegeticPan ) ) #endif { fprintf( stderr, "Unknown option for diegetic panning: %s\n", optionValues[0] ); exit( -1 ); } #ifdef NON_DIEGETIC_PAN args->nonDiegeticPan = 1; #endif break; case CmdLnOptionId_orientationTracking: assert( numOptionValues == 1 ); Loading Loading @@ -1931,9 +1878,7 @@ void getMetadataFromFileReader( objectMetadataBuffer->positions[objIdx].radius = ismMetadata.radius; objectMetadataBuffer->positions[objIdx].yaw = ismMetadata.yaw; objectMetadataBuffer->positions[objIdx].pitch = ismMetadata.pitch; #ifdef ISM_NON_DIEGETIC_PAN objectMetadataBuffer->positions[objIdx].non_diegetic_flag = ismMetadata.non_diegetic_flag; #endif return; } Loading Loading @@ -1991,9 +1936,7 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].radius = 1.0f; objectMetadataBuffer->positions[objIdx].yaw = 0.0f; objectMetadataBuffer->positions[objIdx].pitch = 0.0f; #ifdef ISM_NON_DIEGETIC_PAN objectMetadataBuffer->positions[objIdx].non_diegetic_flag = 0; #endif } /* Wrap azimuth to lie within (-180, 180] range */ Loading Loading @@ -2255,22 +2198,14 @@ static void parseObjectPosition( { char *endptr; int16_t read_values; #ifdef ISM_NON_DIEGETIC_PAN float meta_prm[8] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f }; #else float meta_prm[7] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f }; #endif readNextMetadataChunk( line, "," ); *positionDuration = (uint16_t) strtol( line, &endptr, 10 ); readNextMetadataChunk( line, "\n" ); #ifdef ISM_NON_DIEGETIC_PAN read_values = (int16_t) sscanf( line, "%f,%f,%f,%f,%f,%f,%f,%f", &meta_prm[0], &meta_prm[1], &meta_prm[2], &meta_prm[3], &meta_prm[4], &meta_prm[5], &meta_prm[6], &meta_prm[7] ); #else read_values = (int16_t) sscanf( line, "%f,%f,%f,%f,%f,%f,%f", &meta_prm[0], &meta_prm[1], &meta_prm[2], &meta_prm[3], &meta_prm[4], &meta_prm[5], &meta_prm[6] ); #endif if ( read_values < 2 ) { Loading @@ -2283,9 +2218,7 @@ static void parseObjectPosition( position->radius = meta_prm[2]; position->yaw = meta_prm[5]; position->pitch = meta_prm[6]; #ifdef ISM_NON_DIEGETIC_PAN position->non_diegetic_flag = (int16_t) meta_prm[7]; #endif return; } Loading lib_com/bitstream.c +0 −10 Original line number Diff line number Diff line Loading @@ -2928,11 +2928,7 @@ ivas_error preview_indices( k = IVAS_FORMAT_SIGNALING_NBITS; if ( st_ivas->ivas_format == MASA_FORMAT ) { #ifdef COMBINED_FORMAT_SIGNALING k = IVAS_FORMAT_SIGNALING_NBITS_EXTENDED; #else k = IVAS_FORMAT_SIGNALING_NBITS_SBA; #endif } if ( total_brate < MIN_BRATE_MDCT_STEREO ) Loading Loading @@ -2972,15 +2968,9 @@ ivas_error preview_indices( else if ( st_ivas->ivas_format == SBA_FORMAT ) { /* Read SBA planar flag and SBA order */ #ifdef COMBINED_FORMAT_SIGNALING st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 1] == 1 ); #else st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); #endif st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order ); Loading lib_com/cnst.h +0 −6 Original line number Diff line number Diff line Loading @@ -1433,11 +1433,7 @@ typedef enum _DCTTYPE #define CNA_MAX_BRATE ACELP_13k20 #ifdef FIX_I414_OOA_CNA #define CNA_INIT_NBANDS 6 #else #define MAX_CNA_NBANDS 12 #endif #define GAIN_Q_OFFSET_EVS 60.f #define GAIN_Q_OFFSET_IVAS 45.f Loading Loading @@ -1535,9 +1531,7 @@ typedef enum _DCTTYPE #define TOD_NSPEC 80 /* number of spectral bins of the tonal detector */ #define TOD_THR_MASS 0.86f /* initial value for the adaptive threshold of the tonal detector */ #define P2A_FACT 0.9f /* long-term averaging factor for peak-to-average ratio */ #ifdef FIX_SP2A #define THR_P2A_HIGH 95.0f /* higher threshold to detect strongly peaky signals at low bitrates*/ #endif #define THR_P2A 80.0f /* lower threshold to detect strongly peaky signals at higher bitrates */ /*----------------------------------------------------------------------------------* Loading Loading
apps/decoder.c +0 −65 Original line number Diff line number Diff line Loading @@ -117,17 +117,11 @@ typedef struct bool customLsOutputEnabled; char *customLsSetupFilename; int16_t orientation_tracking; #ifdef NON_DIEGETIC_PAN int16_t Opt_non_diegetic_pan; float non_diegetic_pan_gain; #else float no_diegetic_pan; #endif bool renderConfigEnabled; char *renderConfigFilename; #ifdef COMPLEXITY_LEVEL_INDICATION IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; #endif #ifdef DEBUGGING IVAS_DEC_FORCED_REND_MODE forcedRendMode; Loading Loading @@ -227,17 +221,9 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef FIX_439_OTR_PARAMS #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.no_diegetic_pan ) ) != IVAS_ERR_OK ) #endif #else #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.no_diegetic_pan ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -404,17 +390,9 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef FIX_439_OTR_PARAMS #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled ) ) != IVAS_ERR_OK ) #endif #else #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 if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled ) ) != IVAS_ERR_OK ) #endif #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -835,9 +813,7 @@ static bool parseCmdlIVAS_dec( arg->quietModeEnabled = false; arg->delayCompensationEnabled = true; arg->voipMode = false; #ifdef COMPLEXITY_LEVEL_INDICATION arg->complexityLevel = IVAS_DEC_COMPLEXITY_LEVEL_THREE; #endif arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; Loading Loading @@ -868,12 +844,8 @@ static bool parseCmdlIVAS_dec( arg->renderConfigFilename = NULL; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192; #ifdef NON_DIEGETIC_PAN arg->Opt_non_diegetic_pan = 0; arg->non_diegetic_pan_gain = 0.f; #else arg->no_diegetic_pan = 0.f; #endif #ifdef VARIABLE_SPEED_DECODING arg->variableSpeedMode = 0; arg->tsmScale = 100; Loading Loading @@ -1172,56 +1144,27 @@ static bool parseCmdlIVAS_dec( else if ( strcmp( argv_to_upper, "-NON_DIEGETIC_PAN" ) == 0 ) { i++; #ifdef NON_DIEGETIC_PAN arg->Opt_non_diegetic_pan = 1; #else if ( argc - i <= 4 || ( argv[i][0] == '-' ) ) { fprintf( stderr, "Error: Argument for panning option not specified!\n\n" ); usage_dec(); return false; } #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 arg->non_diegetic_pan_gain = 0.f; #else arg->no_diegetic_pan = 0.f; #endif } else if ( ( strcmp( argv_to_upper, "LEFT" ) == 0 ) || ( strchr( argv_to_upper, 'L' ) != NULL ) ) { #ifdef NON_DIEGETIC_PAN arg->non_diegetic_pan_gain = 1.f; #else arg->no_diegetic_pan = 1.f; #endif } else if ( ( strcmp( argv_to_upper, "RIGHT" ) == 0 ) || ( strchr( argv_to_upper, 'R' ) != NULL ) ) { #ifdef NON_DIEGETIC_PAN arg->non_diegetic_pan_gain = -1.f; #else arg->no_diegetic_pan = -1.f; #endif } else { #ifdef NON_DIEGETIC_PAN arg->non_diegetic_pan_gain = (float) atof( argv_to_upper ) / 90.f; if ( arg->non_diegetic_pan_gain > 1.0f || arg->non_diegetic_pan_gain < -1.0f ) #else arg->no_diegetic_pan = (float) atof( argv_to_upper ); if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f ) #endif { fprintf( stderr, "Error: Incorrect value for panning gain value specified: %s\n\n", argv[i] ); usage_dec(); Loading @@ -1230,7 +1173,6 @@ static bool parseCmdlIVAS_dec( } i++; } #ifdef COMPLEXITY_LEVEL_INDICATION else if ( strcmp( argv_to_upper, "-LEVEL" ) == 0 ) { int16_t level; Loading @@ -1248,7 +1190,6 @@ static bool parseCmdlIVAS_dec( fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); } } #endif /*-----------------------------------------------------------------* * Option not recognized Loading Loading @@ -1277,25 +1218,21 @@ static bool parseCmdlIVAS_dec( arg->customLsSetupFilename = argv[i]; } i++; #ifdef NON_DIEGETIC_PAN if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputFormat != IVAS_DEC_OUTPUT_STEREO ) ) { fprintf( stderr, "Error: non-diegetic panning is supported in stereo only\n\n" ); usage_dec(); return false; } #endif } else { arg->outputFormat = IVAS_DEC_OUTPUT_MONO; arg->decMode = IVAS_DEC_MODE_EVS; #ifdef NON_DIEGETIC_PAN if ( ( arg->Opt_non_diegetic_pan ) ) { arg->outputFormat = IVAS_DEC_OUTPUT_STEREO; } #endif } /*-----------------------------------------------------------------* Loading Loading @@ -1426,11 +1363,9 @@ static void usage_dec( void ) fprintf( stdout, " containing FEC pattern (short values of 0 (good) or 1 (bad))\n" ); fprintf( stdout, " default is OFF, if this option is not used\n" ); fprintf( stdout, "-force R : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" ); #ifdef COMPLEXITY_LEVEL_INDICATION fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); #endif #endif #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK fprintf( stdout, "-info <folder> : specify subfolder name for debug output\n" ); Loading
apps/encoder.c +0 −19 Original line number Diff line number Diff line Loading @@ -111,9 +111,7 @@ typedef struct IVAS_ENC_CHANNEL_AWARE_CONFIG caConfig; const char *ca_config_file; bool mimeOutput; #ifdef COMPLEXITY_LEVEL_INDICATION IVAS_ENC_COMPLEXITY_LEVEL complexityLevel; #endif #ifdef DEBUGGING IVAS_ENC_FORCED_MODE forcedMode; Loading Loading @@ -881,9 +879,7 @@ static void initArgStruct( EncArguments *arg ) arg->ca_config_file = NULL; arg->mimeOutput = false; arg->ism_extended_metadata = false; #ifdef COMPLEXITY_LEVEL_INDICATION arg->complexityLevel = IVAS_ENC_COMPLEXITY_LEVEL_THREE; #endif #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; Loading Loading @@ -1136,31 +1132,18 @@ static bool parseCmdlIVAS_enc( { strncpy( stmp, argv[i], sizeof( stmp ) ); stmp[sizeof( stmp ) - 1] = '\0'; #ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING to_upper( stmp ); if ( strcmp( stmp, "LO" ) == 0 ) #else to_upper( argv[i] ); if ( strcmp( argv[i], "LO" ) == 0 ) #endif { arg->caConfig.fec_indicator = IVAS_ENC_FEC_LO; } #ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING else if ( strcmp( stmp, "HI" ) == 0 ) #else else if ( strcmp( argv[i], "HI" ) == 0 ) #endif { arg->caConfig.fec_indicator = IVAS_ENC_FEC_HI; } else { #ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING arg->ca_config_file = argv[i]; #else arg->ca_config_file = stmp; #endif } i++; Loading Loading @@ -1197,7 +1180,6 @@ static bool parseCmdlIVAS_enc( } #ifdef COMPLEXITY_LEVEL_INDICATION /*-----------------------------------------------------------------* * Complexity Level *-----------------------------------------------------------------*/ Loading @@ -1220,7 +1202,6 @@ static bool parseCmdlIVAS_enc( fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); } } #endif /*-----------------------------------------------------------------* * IVAS Formats Loading
apps/renderer.c +0 −67 Original line number Diff line number Diff line Loading @@ -140,12 +140,8 @@ typedef struct #else int8_t orientationTracking; #endif #ifdef NON_DIEGETIC_PAN int16_t nonDiegeticPan; float nonDiegeticPanGain; #else float noDiegeticPan; #endif bool delayCompensationEnabled; bool quietModeEnabled; bool sceneDescriptionInput; Loading Loading @@ -560,7 +556,6 @@ int main( CmdlnArgs args = parseCmdlnArgs( argc, argv ); #ifdef NON_DIEGETIC_PAN if ( args.nonDiegeticPan && !( ( args.inConfig.numAudioObjects == 0 && args.inConfig.multiChannelBuses[0].audioConfig == IVAS_REND_AUDIO_CONFIG_MONO ) || ( args.inConfig.numAudioObjects > 0 && args.inConfig.audioObjects[0].audioConfig == IVAS_REND_AUDIO_CONFIG_OBJECT && args.inConfig.numAudioObjects == 1 ) ) ) { Loading @@ -573,7 +568,6 @@ int main( fprintf( stderr, "\ninvalid configuration - non-diegetic panning requires stereo output\n" ); exit( -1 ); } #endif positionProvider = IsmPositionProvider_open(); Loading Loading @@ -689,11 +683,7 @@ int main( IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 }; IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 }; #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain ) ) != 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 ); Loading Loading @@ -1366,7 +1356,6 @@ static bool parseOutConfig( return true; } #ifdef NON_DIEGETIC_PAN static bool parseDiegeticPan( char *value, float *nonDiegeticPan ) Loading Loading @@ -1396,38 +1385,6 @@ static bool parseDiegeticPan( } } return true; #else static bool parseDiegeticPan( char *value, float *noDiegeticPan ) { to_upper( value ); if ( ( strcmp( value, "CENTER" ) == 0 ) || ( strchr( value, 'C' ) != NULL ) ) { *noDiegeticPan = 0.f; } else if ( ( strcmp( value, "LEFT" ) == 0 ) || ( strchr( value, 'L' ) != NULL ) ) { *noDiegeticPan = -1.f; } else if ( ( strcmp( value, "RIGHT" ) == 0 ) || ( strchr( value, 'R' ) != NULL ) ) { *noDiegeticPan = 1.f; } else { *noDiegeticPan = (float) atof( value ); if ( *noDiegeticPan > 1.0f || *noDiegeticPan < -1.0f ) { fprintf( stderr, "Error: Incorrect value for panning option argument specified!\n\n" ); return false; } } return false; #endif } static bool parseOrientationTracking( Loading Loading @@ -1708,12 +1665,8 @@ static CmdlnArgs defaultArgs( #else args.orientationTracking = IVAS_ORIENT_TRK_NONE; #endif #ifdef NON_DIEGETIC_PAN args.nonDiegeticPan = 0; args.nonDiegeticPanGain = 0.f; #else args.noDiegeticPan = 0.0f; #endif args.delayCompensationEnabled = true; args.quietModeEnabled = false; Loading Loading @@ -1805,18 +1758,12 @@ static void parseOption( break; case CmdLnOptionId_nonDiegeticPan: assert( numOptionValues == 1 ); #ifdef NON_DIEGETIC_PAN if ( !parseDiegeticPan( optionValues[0], &args->nonDiegeticPanGain ) ) #else if ( !parseDiegeticPan( optionValues[0], &args->noDiegeticPan ) ) #endif { fprintf( stderr, "Unknown option for diegetic panning: %s\n", optionValues[0] ); exit( -1 ); } #ifdef NON_DIEGETIC_PAN args->nonDiegeticPan = 1; #endif break; case CmdLnOptionId_orientationTracking: assert( numOptionValues == 1 ); Loading Loading @@ -1931,9 +1878,7 @@ void getMetadataFromFileReader( objectMetadataBuffer->positions[objIdx].radius = ismMetadata.radius; objectMetadataBuffer->positions[objIdx].yaw = ismMetadata.yaw; objectMetadataBuffer->positions[objIdx].pitch = ismMetadata.pitch; #ifdef ISM_NON_DIEGETIC_PAN objectMetadataBuffer->positions[objIdx].non_diegetic_flag = ismMetadata.non_diegetic_flag; #endif return; } Loading Loading @@ -1991,9 +1936,7 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].radius = 1.0f; objectMetadataBuffer->positions[objIdx].yaw = 0.0f; objectMetadataBuffer->positions[objIdx].pitch = 0.0f; #ifdef ISM_NON_DIEGETIC_PAN objectMetadataBuffer->positions[objIdx].non_diegetic_flag = 0; #endif } /* Wrap azimuth to lie within (-180, 180] range */ Loading Loading @@ -2255,22 +2198,14 @@ static void parseObjectPosition( { char *endptr; int16_t read_values; #ifdef ISM_NON_DIEGETIC_PAN float meta_prm[8] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f }; #else float meta_prm[7] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f }; #endif readNextMetadataChunk( line, "," ); *positionDuration = (uint16_t) strtol( line, &endptr, 10 ); readNextMetadataChunk( line, "\n" ); #ifdef ISM_NON_DIEGETIC_PAN read_values = (int16_t) sscanf( line, "%f,%f,%f,%f,%f,%f,%f,%f", &meta_prm[0], &meta_prm[1], &meta_prm[2], &meta_prm[3], &meta_prm[4], &meta_prm[5], &meta_prm[6], &meta_prm[7] ); #else read_values = (int16_t) sscanf( line, "%f,%f,%f,%f,%f,%f,%f", &meta_prm[0], &meta_prm[1], &meta_prm[2], &meta_prm[3], &meta_prm[4], &meta_prm[5], &meta_prm[6] ); #endif if ( read_values < 2 ) { Loading @@ -2283,9 +2218,7 @@ static void parseObjectPosition( position->radius = meta_prm[2]; position->yaw = meta_prm[5]; position->pitch = meta_prm[6]; #ifdef ISM_NON_DIEGETIC_PAN position->non_diegetic_flag = (int16_t) meta_prm[7]; #endif return; } Loading
lib_com/bitstream.c +0 −10 Original line number Diff line number Diff line Loading @@ -2928,11 +2928,7 @@ ivas_error preview_indices( k = IVAS_FORMAT_SIGNALING_NBITS; if ( st_ivas->ivas_format == MASA_FORMAT ) { #ifdef COMBINED_FORMAT_SIGNALING k = IVAS_FORMAT_SIGNALING_NBITS_EXTENDED; #else k = IVAS_FORMAT_SIGNALING_NBITS_SBA; #endif } if ( total_brate < MIN_BRATE_MDCT_STEREO ) Loading Loading @@ -2972,15 +2968,9 @@ ivas_error preview_indices( else if ( st_ivas->ivas_format == SBA_FORMAT ) { /* Read SBA planar flag and SBA order */ #ifdef COMBINED_FORMAT_SIGNALING st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 1] == 1 ); #else st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); #endif st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order ); Loading
lib_com/cnst.h +0 −6 Original line number Diff line number Diff line Loading @@ -1433,11 +1433,7 @@ typedef enum _DCTTYPE #define CNA_MAX_BRATE ACELP_13k20 #ifdef FIX_I414_OOA_CNA #define CNA_INIT_NBANDS 6 #else #define MAX_CNA_NBANDS 12 #endif #define GAIN_Q_OFFSET_EVS 60.f #define GAIN_Q_OFFSET_IVAS 45.f Loading Loading @@ -1535,9 +1531,7 @@ typedef enum _DCTTYPE #define TOD_NSPEC 80 /* number of spectral bins of the tonal detector */ #define TOD_THR_MASS 0.86f /* initial value for the adaptive threshold of the tonal detector */ #define P2A_FACT 0.9f /* long-term averaging factor for peak-to-average ratio */ #ifdef FIX_SP2A #define THR_P2A_HIGH 95.0f /* higher threshold to detect strongly peaky signals at low bitrates*/ #endif #define THR_P2A 80.0f /* lower threshold to detect strongly peaky signals at higher bitrates */ /*----------------------------------------------------------------------------------* Loading