Loading apps/decoder.c +0 −67 Original line number Diff line number Diff line Loading @@ -586,9 +586,7 @@ static IVAS_DEC_AUDIO_CONFIG cmdline2config( char argv_to_upper[FILENAME_MAX]; strncpy( argv_to_upper, argv, sizeof( argv_to_upper ) - 1 ); #ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; #endif to_upper( argv_to_upper ); if ( strcmp( argv_to_upper, "EXT" ) == 0 ) /* external renderer */ Loading Loading @@ -667,9 +665,6 @@ static bool parseCmdlIVAS_dec( char argv_to_upper[FILENAME_MAX]; #ifdef DEBUGGING float ftmp; #ifndef FIX_343_TO_UPPER char stmp[FILENAME_MAX]; #endif arg->forcedRendMode = IVAS_DEC_FORCE_REND_UNFORCED; arg->forceSubframeBinauralization = false; Loading Loading @@ -731,9 +726,7 @@ static bool parseCmdlIVAS_dec( while ( argv[i][0] == '-' ) { strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); #ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; #endif to_upper( argv_to_upper ); if ( strcmp( argv_to_upper, "-VOIP" ) == 0 ) Loading @@ -741,21 +734,13 @@ static bool parseCmdlIVAS_dec( arg->voipMode = 1; i++; } #ifdef FIX_343_TO_UPPER else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 ) #else else if ( strcmp( to_upper( argv[i] ), "-VOIP_HF_ONLY=0" ) == 0 ) #endif { arg->voipMode = 1; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP; i++; } #ifdef FIX_343_TO_UPPER else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 ) #else else if ( strcmp( to_upper( argv[i] ), "-VOIP_HF_ONLY=1" ) == 0 ) #endif { arg->voipMode = 1; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; Loading Loading @@ -828,14 +813,9 @@ static bool parseCmdlIVAS_dec( i++; if ( i < argc - 3 ) { #ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; arg->forcedRendMode = parseForcedRendModeDec( argv_to_upper ); #else strncpy( stmp, argv[i], sizeof( stmp ) ); arg->forcedRendMode = parseForcedRendModeDec( stmp ); #endif i++; } } Loading Loading @@ -888,7 +868,6 @@ static bool parseCmdlIVAS_dec( return false; } #ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i + 1], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; to_upper( argv_to_upper ); Loading @@ -907,25 +886,6 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } #else char tmp[4]; strcpy( tmp, argv[i + 1] ); if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; } else if ( strcmp( to_upper( tmp ), "AVG" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_AVG; } else { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", tmp ); usage_dec(); return false; } #endif i += 2; } else if ( strcmp( argv_to_upper, "-RENDER_CONFIG" ) == 0 ) Loading @@ -952,7 +912,6 @@ static bool parseCmdlIVAS_dec( return false; } #ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) ) Loading @@ -978,32 +937,6 @@ static bool parseCmdlIVAS_dec( return false; } } #else char *param = to_upper( argv[i] ); if ( ( strcmp( param, "CENTER" ) == 0 ) || ( strchr( param, 'C' ) != NULL ) ) { arg->no_diegetic_pan = 0.f; } else if ( ( strcmp( param, "LEFT" ) == 0 ) || ( strchr( param, 'L' ) != NULL ) ) { arg->no_diegetic_pan = -1.f; } else if ( ( strcmp( param, "RIGHT" ) == 0 ) || ( strchr( param, 'R' ) != NULL ) ) { arg->no_diegetic_pan = 1.f; } else { arg->no_diegetic_pan = (float) atof( param ); if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f ) { fprintf( stderr, "Error: Incorrect value for panning option argument specified!\n\n" ); usage_dec(); return false; } } #endif i++; } Loading apps/encoder.c +0 −26 Original line number Diff line number Diff line Loading @@ -884,9 +884,7 @@ static bool parseCmdlIVAS_enc( while ( i < argc - 4 ) { strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); #ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; #endif to_upper( argv_to_upper ); /*-----------------------------------------------------------------* Loading @@ -898,9 +896,7 @@ static bool parseCmdlIVAS_enc( arg->max_bwidth_user = true; strncpy( stmp, argv[i + 1], sizeof( stmp ) - 1 ); #ifdef FIX_343_TO_UPPER stmp[sizeof( stmp ) - 1] = '\0'; #endif to_upper( stmp ); if ( strcmp( stmp, "-NB" ) == 0 || strcmp( stmp, "NB" ) == 0 ) Loading Loading @@ -1088,9 +1084,7 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { strncpy( stmp, argv[i], sizeof( stmp ) ); #ifdef FIX_343_TO_UPPER stmp[sizeof( stmp ) - 1] = '\0'; #endif to_upper( argv[i] ); if ( strcmp( argv[i], "LO" ) == 0 ) { Loading Loading @@ -1378,7 +1372,6 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { #ifdef FIX_343_TO_UPPER if ( strcmp( argv[i], "5_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; Loading @@ -1396,25 +1389,6 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_4; } else if ( strcmp( argv[i], "7_1_4" ) == 0 ) #else if ( strcmp( to_upper( argv[i] ), "5_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; } else if ( strcmp( to_upper( argv[i] ), "7_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_7_1; } else if ( strcmp( to_upper( argv[i] ), "5_1_2" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_2; } else if ( strcmp( to_upper( argv[i] ), "5_1_4" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_4; } else if ( strcmp( to_upper( argv[i] ), "7_1_4" ) == 0 ) #endif { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_7_1_4; } Loading apps/renderer.c +0 −6 Original line number Diff line number Diff line Loading @@ -460,9 +460,7 @@ static void setupWithSingleFormatInput( /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string is empty or contains "NULL" */ char charBuf[FILENAME_MAX]; strncpy( charBuf, args.inMetadataFilePaths[i], min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1 ); #ifdef FIX_343_TO_UPPER charBuf[min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1] = '\0'; #endif to_upper( charBuf ); if ( isEmptyString( args.inMetadataFilePaths[i] ) || strncmp( charBuf, "NULL", 4 ) == 0 ) { Loading Loading @@ -1083,9 +1081,7 @@ static bool parseInConfig( /* First check if input is being set to scene description file - this is not covered by parseAudioConfig(). */ strncpy( charBuf, inFormatStr, sizeof( charBuf ) - 1 ); #ifdef FIX_343_TO_UPPER charBuf[sizeof( charBuf ) - 1] = '\0'; #endif to_upper( charBuf ); if ( strcmp( charBuf, "META" ) == 0 ) { Loading Loading @@ -1271,9 +1267,7 @@ static IVAS_REND_AudioConfig parseAudioConfig( charBuf[13] = '\0'; strncpy( charBuf, configString, sizeof( charBuf ) - 1 ); #ifdef FIX_343_TO_UPPER charBuf[sizeof( charBuf ) - 1] = '\0'; #endif to_upper( charBuf ); if ( ( strcmp( charBuf, "MONO" ) == 0 ) || ( strcmp( charBuf, "HOA0" ) == 0 ) || ( strcmp( charBuf, "SBA0" ) == 0 ) ) Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,6 @@ #define FIX_347_DTX_CRASH /* FhG: Fix crash that can happen with DTX */ #define DISABLE_RES_CHANNELS_MCT /* decode only W and residual for Y when outputting to stereo */ #define FIX_343_TO_UPPER /* VA: issue 343: safeguard for function to_upper() */ #define FIX_107_5MS_SUBFRAME_RENDERING Loading Loading
apps/decoder.c +0 −67 Original line number Diff line number Diff line Loading @@ -586,9 +586,7 @@ static IVAS_DEC_AUDIO_CONFIG cmdline2config( char argv_to_upper[FILENAME_MAX]; strncpy( argv_to_upper, argv, sizeof( argv_to_upper ) - 1 ); #ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; #endif to_upper( argv_to_upper ); if ( strcmp( argv_to_upper, "EXT" ) == 0 ) /* external renderer */ Loading Loading @@ -667,9 +665,6 @@ static bool parseCmdlIVAS_dec( char argv_to_upper[FILENAME_MAX]; #ifdef DEBUGGING float ftmp; #ifndef FIX_343_TO_UPPER char stmp[FILENAME_MAX]; #endif arg->forcedRendMode = IVAS_DEC_FORCE_REND_UNFORCED; arg->forceSubframeBinauralization = false; Loading Loading @@ -731,9 +726,7 @@ static bool parseCmdlIVAS_dec( while ( argv[i][0] == '-' ) { strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); #ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; #endif to_upper( argv_to_upper ); if ( strcmp( argv_to_upper, "-VOIP" ) == 0 ) Loading @@ -741,21 +734,13 @@ static bool parseCmdlIVAS_dec( arg->voipMode = 1; i++; } #ifdef FIX_343_TO_UPPER else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 ) #else else if ( strcmp( to_upper( argv[i] ), "-VOIP_HF_ONLY=0" ) == 0 ) #endif { arg->voipMode = 1; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP; i++; } #ifdef FIX_343_TO_UPPER else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 ) #else else if ( strcmp( to_upper( argv[i] ), "-VOIP_HF_ONLY=1" ) == 0 ) #endif { arg->voipMode = 1; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; Loading Loading @@ -828,14 +813,9 @@ static bool parseCmdlIVAS_dec( i++; if ( i < argc - 3 ) { #ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; arg->forcedRendMode = parseForcedRendModeDec( argv_to_upper ); #else strncpy( stmp, argv[i], sizeof( stmp ) ); arg->forcedRendMode = parseForcedRendModeDec( stmp ); #endif i++; } } Loading Loading @@ -888,7 +868,6 @@ static bool parseCmdlIVAS_dec( return false; } #ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i + 1], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; to_upper( argv_to_upper ); Loading @@ -907,25 +886,6 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } #else char tmp[4]; strcpy( tmp, argv[i + 1] ); if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; } else if ( strcmp( to_upper( tmp ), "AVG" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_AVG; } else { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", tmp ); usage_dec(); return false; } #endif i += 2; } else if ( strcmp( argv_to_upper, "-RENDER_CONFIG" ) == 0 ) Loading @@ -952,7 +912,6 @@ static bool parseCmdlIVAS_dec( return false; } #ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) ) Loading @@ -978,32 +937,6 @@ static bool parseCmdlIVAS_dec( return false; } } #else char *param = to_upper( argv[i] ); if ( ( strcmp( param, "CENTER" ) == 0 ) || ( strchr( param, 'C' ) != NULL ) ) { arg->no_diegetic_pan = 0.f; } else if ( ( strcmp( param, "LEFT" ) == 0 ) || ( strchr( param, 'L' ) != NULL ) ) { arg->no_diegetic_pan = -1.f; } else if ( ( strcmp( param, "RIGHT" ) == 0 ) || ( strchr( param, 'R' ) != NULL ) ) { arg->no_diegetic_pan = 1.f; } else { arg->no_diegetic_pan = (float) atof( param ); if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f ) { fprintf( stderr, "Error: Incorrect value for panning option argument specified!\n\n" ); usage_dec(); return false; } } #endif i++; } Loading
apps/encoder.c +0 −26 Original line number Diff line number Diff line Loading @@ -884,9 +884,7 @@ static bool parseCmdlIVAS_enc( while ( i < argc - 4 ) { strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); #ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; #endif to_upper( argv_to_upper ); /*-----------------------------------------------------------------* Loading @@ -898,9 +896,7 @@ static bool parseCmdlIVAS_enc( arg->max_bwidth_user = true; strncpy( stmp, argv[i + 1], sizeof( stmp ) - 1 ); #ifdef FIX_343_TO_UPPER stmp[sizeof( stmp ) - 1] = '\0'; #endif to_upper( stmp ); if ( strcmp( stmp, "-NB" ) == 0 || strcmp( stmp, "NB" ) == 0 ) Loading Loading @@ -1088,9 +1084,7 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { strncpy( stmp, argv[i], sizeof( stmp ) ); #ifdef FIX_343_TO_UPPER stmp[sizeof( stmp ) - 1] = '\0'; #endif to_upper( argv[i] ); if ( strcmp( argv[i], "LO" ) == 0 ) { Loading Loading @@ -1378,7 +1372,6 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { #ifdef FIX_343_TO_UPPER if ( strcmp( argv[i], "5_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; Loading @@ -1396,25 +1389,6 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_4; } else if ( strcmp( argv[i], "7_1_4" ) == 0 ) #else if ( strcmp( to_upper( argv[i] ), "5_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; } else if ( strcmp( to_upper( argv[i] ), "7_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_7_1; } else if ( strcmp( to_upper( argv[i] ), "5_1_2" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_2; } else if ( strcmp( to_upper( argv[i] ), "5_1_4" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_4; } else if ( strcmp( to_upper( argv[i] ), "7_1_4" ) == 0 ) #endif { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_7_1_4; } Loading
apps/renderer.c +0 −6 Original line number Diff line number Diff line Loading @@ -460,9 +460,7 @@ static void setupWithSingleFormatInput( /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string is empty or contains "NULL" */ char charBuf[FILENAME_MAX]; strncpy( charBuf, args.inMetadataFilePaths[i], min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1 ); #ifdef FIX_343_TO_UPPER charBuf[min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1] = '\0'; #endif to_upper( charBuf ); if ( isEmptyString( args.inMetadataFilePaths[i] ) || strncmp( charBuf, "NULL", 4 ) == 0 ) { Loading Loading @@ -1083,9 +1081,7 @@ static bool parseInConfig( /* First check if input is being set to scene description file - this is not covered by parseAudioConfig(). */ strncpy( charBuf, inFormatStr, sizeof( charBuf ) - 1 ); #ifdef FIX_343_TO_UPPER charBuf[sizeof( charBuf ) - 1] = '\0'; #endif to_upper( charBuf ); if ( strcmp( charBuf, "META" ) == 0 ) { Loading Loading @@ -1271,9 +1267,7 @@ static IVAS_REND_AudioConfig parseAudioConfig( charBuf[13] = '\0'; strncpy( charBuf, configString, sizeof( charBuf ) - 1 ); #ifdef FIX_343_TO_UPPER charBuf[sizeof( charBuf ) - 1] = '\0'; #endif to_upper( charBuf ); if ( ( strcmp( charBuf, "MONO" ) == 0 ) || ( strcmp( charBuf, "HOA0" ) == 0 ) || ( strcmp( charBuf, "SBA0" ) == 0 ) ) Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -154,7 +154,6 @@ #define FIX_347_DTX_CRASH /* FhG: Fix crash that can happen with DTX */ #define DISABLE_RES_CHANNELS_MCT /* decode only W and residual for Y when outputting to stereo */ #define FIX_343_TO_UPPER /* VA: issue 343: safeguard for function to_upper() */ #define FIX_107_5MS_SUBFRAME_RENDERING Loading