Loading apps/decoder.c +19 −8 Original line number Diff line number Diff line Loading @@ -80,10 +80,6 @@ static #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC ( 3 ) #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ( 4 ) #ifdef CONTROL_METADATA_REVERB #define ACOUSTIC_ENVIRONMENT_ID ( 0 ) #endif #ifdef VARIABLE_SPEED_DECODING #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 #endif Loading Loading @@ -146,6 +142,10 @@ typedef struct #endif #endif #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #endif } DecArguments; Loading Loading @@ -572,7 +572,7 @@ int main( #ifdef CONTROL_METADATA_REVERB if ( arg.outputFormat == IVAS_DEC_OUTPUT_BINAURAL_ROOM_REVERB ) { if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, ACOUSTIC_ENVIRONMENT_ID, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) { Loading @@ -580,9 +580,9 @@ int main( goto cleanup; } } else if ( error != IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING ) else { fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", ACOUSTIC_ENVIRONMENT_ID ); fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", arg.acousticEnvironmentId ); goto cleanup; } renderConfig.room_acoustics.override = true; Loading Loading @@ -928,6 +928,10 @@ static bool parseCmdlIVAS_dec( #endif #endif #ifdef CONTROL_METADATA_REVERB arg->acousticEnvironmentId = 0; #endif /*-----------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ Loading Loading @@ -1275,7 +1279,13 @@ static bool parseCmdlIVAS_dec( fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); } } #ifdef CONTROL_METADATA_REVERB else if ( strcmp( argv_to_upper, "-AEID" ) == 0 ) { ++i; arg->acousticEnvironmentId = (int16_t) atoi( argv[i++] ); } #endif /*-----------------------------------------------------------------* * Option not recognized *-----------------------------------------------------------------*/ Loading Loading @@ -1452,6 +1462,7 @@ static void usage_dec( void ) fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); #endif fprintf( stdout, "-exof File : External orientation file for external orientation trajectory\n" ); fprintf( stdout, "-aeid ID : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration\n" ); #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK fprintf( stdout, "-info <folder> : specify subfolder name for debug output\n" ); Loading apps/renderer.c +28 −7 Original line number Diff line number Diff line Loading @@ -61,10 +61,6 @@ #define RENDERER_MAX_METADATA_LENGTH 8192 #define RENDERER_MAX_METADATA_LINE_LENGTH 1024 #ifdef CONTROL_METADATA_REVERB #define ACOUSTIC_ENVIRONMENT_ID 0 #endif #if !defined( DEBUGGING ) && !defined( WMOPS ) static #endif Loading Loading @@ -161,6 +157,9 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #endif } CmdlnArgs; typedef enum Loading @@ -185,6 +184,9 @@ typedef enum CmdLnOptionId_inputGain, CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, #ifdef CONTROL_METADATA_REVERB CmdLnOptionId_acousticEnvironmentId #endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { Loading Loading @@ -306,6 +308,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "exof", .description = "External orientation trajectory file for simulation of external orientations", }, #ifdef CONTROL_METADATA_REVERB { .id = CmdLnOptionId_acousticEnvironmentId, .match = "acoustic_environment_id", .matchShort = "aeid", .description = "Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration", }, #endif }; Loading Loading @@ -787,7 +797,7 @@ int main( if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { #ifdef CONTROL_METADATA_REVERB if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, ACOUSTIC_ENVIRONMENT_ID, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, args.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) { Loading @@ -795,9 +805,9 @@ int main( exit( -1 ); } } else if ( error != IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING ) else { fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", ACOUSTIC_ENVIRONMENT_ID ); fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", args.acousticEnvironmentId ); exit( -1 ); } #endif Loading Loading @@ -1923,6 +1933,11 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); #ifdef CONTROL_METADATA_REVERB args.acousticEnvironmentId = 0; #endif return args; } Loading Loading @@ -2052,6 +2067,12 @@ static void parseOption( exit( -1 ); } break; #ifdef CONTROL_METADATA_REVERB case CmdLnOptionId_acousticEnvironmentId: assert( numOptionValues == 1 ); args->acousticEnvironmentId = (int16_t) strtol( optionValues[0], NULL, 10 ); break; #endif default: assert( 0 && "This should be unreachable - all command line options should be explicitly handled." ); break; Loading scripts/testv/rend_config_hospital_patientroom.cfg +17 −14 Original line number Diff line number Diff line [roomAcoustics] nBands = 31; frequencyGridCount = 1; acousticEnvironmentCount = 1; fc = [20.0, 25.0, 31.5, 40.0, [frequencyGrid:0] method = individualFrequencies; nBands = 31; frequencies = [20.0, 25.0, 31.5, 40.0, 50.0, 63.0, 80.0, 100.0, 125.0, 160.0, 200.0, 250.0, 315.0, 400.0, 500.0, 630.0, Loading @@ -10,6 +14,9 @@ fc = [20.0, 25.0, 31.5, 40.0, 5000.0, 6300.0, 8000.0, 10000.0, 12500.0, 16000.0, 20000.0]; [acousticEnvironment:0] frequencyGridIndex = 0; predelay = 0.08163; rt60 = [0.81275, 0.61888, 0.45111, 0.34672, 0.46683, 0.53987, 0.61874, 0.70291, 0.66657, 0.73037, 0.75090, 0.72470, 0.75486, 0.75857, 0.76844, 0.74999, 0.77622, 0.78227, 0.77441, 0.74688, 0.73521, 0.73782, 0.71928, 0.71708, 0.71465, 0.60592, 0.52031, 0.51768, 0.52102, 0.37956, Loading @@ -20,9 +27,5 @@ dsr = [0.00019952621, 0.00019952621, 7.9432844e-05, 5.0118702e-05, 7.943284e-06 6.3095763e-06, 6.3095763e-06, 6.3095763e-06, 6.3095763e-06, 6.3095763e-06, 3.1622776e-06, 3.1622776e-06, 3.1622776e-06, 6.3095763e-07, 3.1622776e-07, 3.1622776e-07]; acousticPreDelay = 0.016; inputPreDelay = 0.08163; [general] reverbFile = rend_config_hospital_patientroom.dat; scripts/testv/rend_config_recreation.cfg +17 −14 Original line number Diff line number Diff line [roomAcoustics] nBands = 31; frequencyGridCount = 1; acousticEnvironmentCount = 1; fc = [20.0, 25.0, 31.5, 40.0, [frequencyGrid:0] method = individualFrequencies; nBands = 31; frequencies = [20.0, 25.0, 31.5, 40.0, 50.0, 63.0, 80.0, 100.0, 125.0, 160.0, 200.0, 250.0, 315.0, 400.0, 500.0, 630.0, Loading @@ -10,6 +14,9 @@ fc = [20.0, 25.0, 31.5, 40.0, 5000.0, 6300.0, 8000.0, 10000.0, 12500.0, 16000.0, 20000.0]; [acousticEnvironment:0] frequencyGridIndex = 0; predelay = 0.43031; rt60 = [4.51916, 4.89553, 4.83276, 5.00198, 5.34468, 5.76026, 6.36818, 6.95503, 7.27557, 7.62559, 8.08892, 8.16002, 8.13900, 8.17919, 8.16280, 8.46226, 9.61806, 9.93048, 9.81353, 8.59340, 8.38885, 8.36823, 6.51845, 3.76089, 3.75374, 3.57451, 1.28724, 1.22174, 1.22448, 1.71631, Loading @@ -20,9 +27,5 @@ dsr = [1e-06, 7.943284e-07, 1e-06, 1e-06, 1.5848925e-06, 1.9952631e-06, 3.16227 3.1622776e-06, 2.511887e-06, 7.943284e-07, 6.3095763e-07, 6.3095763e-07, 5.01187e-08, 1.2589251e-08, 1.2589251e-08, 1.2589265e-09, 1.2589266e-11, 3.981075e-12]; acousticPreDelay = 0.016; inputPreDelay = 0.43031; [general] reverbFile = rend_config_recreation.dat; Loading
apps/decoder.c +19 −8 Original line number Diff line number Diff line Loading @@ -80,10 +80,6 @@ static #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC ( 3 ) #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ( 4 ) #ifdef CONTROL_METADATA_REVERB #define ACOUSTIC_ENVIRONMENT_ID ( 0 ) #endif #ifdef VARIABLE_SPEED_DECODING #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 #endif Loading Loading @@ -146,6 +142,10 @@ typedef struct #endif #endif #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #endif } DecArguments; Loading Loading @@ -572,7 +572,7 @@ int main( #ifdef CONTROL_METADATA_REVERB if ( arg.outputFormat == IVAS_DEC_OUTPUT_BINAURAL_ROOM_REVERB ) { if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, ACOUSTIC_ENVIRONMENT_ID, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) { Loading @@ -580,9 +580,9 @@ int main( goto cleanup; } } else if ( error != IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING ) else { fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", ACOUSTIC_ENVIRONMENT_ID ); fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", arg.acousticEnvironmentId ); goto cleanup; } renderConfig.room_acoustics.override = true; Loading Loading @@ -928,6 +928,10 @@ static bool parseCmdlIVAS_dec( #endif #endif #ifdef CONTROL_METADATA_REVERB arg->acousticEnvironmentId = 0; #endif /*-----------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ Loading Loading @@ -1275,7 +1279,13 @@ static bool parseCmdlIVAS_dec( fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); } } #ifdef CONTROL_METADATA_REVERB else if ( strcmp( argv_to_upper, "-AEID" ) == 0 ) { ++i; arg->acousticEnvironmentId = (int16_t) atoi( argv[i++] ); } #endif /*-----------------------------------------------------------------* * Option not recognized *-----------------------------------------------------------------*/ Loading Loading @@ -1452,6 +1462,7 @@ static void usage_dec( void ) fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); #endif fprintf( stdout, "-exof File : External orientation file for external orientation trajectory\n" ); fprintf( stdout, "-aeid ID : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration\n" ); #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK fprintf( stdout, "-info <folder> : specify subfolder name for debug output\n" ); Loading
apps/renderer.c +28 −7 Original line number Diff line number Diff line Loading @@ -61,10 +61,6 @@ #define RENDERER_MAX_METADATA_LENGTH 8192 #define RENDERER_MAX_METADATA_LINE_LENGTH 1024 #ifdef CONTROL_METADATA_REVERB #define ACOUSTIC_ENVIRONMENT_ID 0 #endif #if !defined( DEBUGGING ) && !defined( WMOPS ) static #endif Loading Loading @@ -161,6 +157,9 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #endif } CmdlnArgs; typedef enum Loading @@ -185,6 +184,9 @@ typedef enum CmdLnOptionId_inputGain, CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, #ifdef CONTROL_METADATA_REVERB CmdLnOptionId_acousticEnvironmentId #endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { Loading Loading @@ -306,6 +308,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "exof", .description = "External orientation trajectory file for simulation of external orientations", }, #ifdef CONTROL_METADATA_REVERB { .id = CmdLnOptionId_acousticEnvironmentId, .match = "acoustic_environment_id", .matchShort = "aeid", .description = "Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration", }, #endif }; Loading Loading @@ -787,7 +797,7 @@ int main( if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { #ifdef CONTROL_METADATA_REVERB if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, ACOUSTIC_ENVIRONMENT_ID, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, args.acousticEnvironmentId, &renderConfig.room_acoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) { Loading @@ -795,9 +805,9 @@ int main( exit( -1 ); } } else if ( error != IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING ) else { fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", ACOUSTIC_ENVIRONMENT_ID ); fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", args.acousticEnvironmentId ); exit( -1 ); } #endif Loading Loading @@ -1923,6 +1933,11 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); #ifdef CONTROL_METADATA_REVERB args.acousticEnvironmentId = 0; #endif return args; } Loading Loading @@ -2052,6 +2067,12 @@ static void parseOption( exit( -1 ); } break; #ifdef CONTROL_METADATA_REVERB case CmdLnOptionId_acousticEnvironmentId: assert( numOptionValues == 1 ); args->acousticEnvironmentId = (int16_t) strtol( optionValues[0], NULL, 10 ); break; #endif default: assert( 0 && "This should be unreachable - all command line options should be explicitly handled." ); break; Loading
scripts/testv/rend_config_hospital_patientroom.cfg +17 −14 Original line number Diff line number Diff line [roomAcoustics] nBands = 31; frequencyGridCount = 1; acousticEnvironmentCount = 1; fc = [20.0, 25.0, 31.5, 40.0, [frequencyGrid:0] method = individualFrequencies; nBands = 31; frequencies = [20.0, 25.0, 31.5, 40.0, 50.0, 63.0, 80.0, 100.0, 125.0, 160.0, 200.0, 250.0, 315.0, 400.0, 500.0, 630.0, Loading @@ -10,6 +14,9 @@ fc = [20.0, 25.0, 31.5, 40.0, 5000.0, 6300.0, 8000.0, 10000.0, 12500.0, 16000.0, 20000.0]; [acousticEnvironment:0] frequencyGridIndex = 0; predelay = 0.08163; rt60 = [0.81275, 0.61888, 0.45111, 0.34672, 0.46683, 0.53987, 0.61874, 0.70291, 0.66657, 0.73037, 0.75090, 0.72470, 0.75486, 0.75857, 0.76844, 0.74999, 0.77622, 0.78227, 0.77441, 0.74688, 0.73521, 0.73782, 0.71928, 0.71708, 0.71465, 0.60592, 0.52031, 0.51768, 0.52102, 0.37956, Loading @@ -20,9 +27,5 @@ dsr = [0.00019952621, 0.00019952621, 7.9432844e-05, 5.0118702e-05, 7.943284e-06 6.3095763e-06, 6.3095763e-06, 6.3095763e-06, 6.3095763e-06, 6.3095763e-06, 3.1622776e-06, 3.1622776e-06, 3.1622776e-06, 6.3095763e-07, 3.1622776e-07, 3.1622776e-07]; acousticPreDelay = 0.016; inputPreDelay = 0.08163; [general] reverbFile = rend_config_hospital_patientroom.dat;
scripts/testv/rend_config_recreation.cfg +17 −14 Original line number Diff line number Diff line [roomAcoustics] nBands = 31; frequencyGridCount = 1; acousticEnvironmentCount = 1; fc = [20.0, 25.0, 31.5, 40.0, [frequencyGrid:0] method = individualFrequencies; nBands = 31; frequencies = [20.0, 25.0, 31.5, 40.0, 50.0, 63.0, 80.0, 100.0, 125.0, 160.0, 200.0, 250.0, 315.0, 400.0, 500.0, 630.0, Loading @@ -10,6 +14,9 @@ fc = [20.0, 25.0, 31.5, 40.0, 5000.0, 6300.0, 8000.0, 10000.0, 12500.0, 16000.0, 20000.0]; [acousticEnvironment:0] frequencyGridIndex = 0; predelay = 0.43031; rt60 = [4.51916, 4.89553, 4.83276, 5.00198, 5.34468, 5.76026, 6.36818, 6.95503, 7.27557, 7.62559, 8.08892, 8.16002, 8.13900, 8.17919, 8.16280, 8.46226, 9.61806, 9.93048, 9.81353, 8.59340, 8.38885, 8.36823, 6.51845, 3.76089, 3.75374, 3.57451, 1.28724, 1.22174, 1.22448, 1.71631, Loading @@ -20,9 +27,5 @@ dsr = [1e-06, 7.943284e-07, 1e-06, 1e-06, 1.5848925e-06, 1.9952631e-06, 3.16227 3.1622776e-06, 2.511887e-06, 7.943284e-07, 6.3095763e-07, 6.3095763e-07, 5.01187e-08, 1.2589251e-08, 1.2589251e-08, 1.2589265e-09, 1.2589266e-11, 3.981075e-12]; acousticPreDelay = 0.016; inputPreDelay = 0.43031; [general] reverbFile = rend_config_recreation.dat;