Loading apps/decoder.c +33 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,9 @@ typedef struct #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #ifdef CONTROL_METADATA_DIRECTIVITY uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; #endif #endif } DecArguments; Loading Loading @@ -615,6 +618,13 @@ int main( fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); goto cleanup; } #ifdef CONTROL_METADATA_DIRECTIVITY if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get directivity for objects: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] ); goto cleanup; } #endif #ifdef CONTROL_METADATA_REVERB if ( arg.outputFormat == IVAS_DEC_OUTPUT_BINAURAL_ROOM_REVERB ) Loading Loading @@ -994,6 +1004,12 @@ static bool parseCmdlIVAS_dec( #ifdef CONTROL_METADATA_REVERB arg->acousticEnvironmentId = 0; #ifdef CONTROL_METADATA_DIRECTIVITY for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) { arg->directivityPatternId[i] = 0; } #endif #endif /*-----------------------------------------------------------------* * Initialization Loading Loading @@ -1361,6 +1377,20 @@ static bool parseCmdlIVAS_dec( ++i; arg->acousticEnvironmentId = (int16_t) atoi( argv[i++] ); } #ifdef CONTROL_METADATA_DIRECTIVITY else if ( strcmp( argv_to_upper, "-DPID" ) == 0 ) { ++i; int16_t tmp; tmp = 0; while ( is_number( argv[i + tmp] ) && tmp < IVAS_MAX_NUM_OBJECTS ) { arg->directivityPatternId[tmp] = (int16_t) atoi( argv[i + tmp] ); ++tmp; } i += tmp; } #endif #endif /*-----------------------------------------------------------------* * Option not recognized Loading Loading @@ -1546,6 +1576,9 @@ 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" ); #ifdef CONTROL_METADATA_DIRECTIVITY fprintf( stdout, "-dpid ID : Directivity pattern ID(s) (space-separated list of up to 4 numbers can be specified) for binaural output configuration\n" ); #endif #ifdef CONTROL_METADATA_REVERB fprintf( stdout, "-aeid ID : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration\n" ); #endif Loading apps/renderer.c +51 −17 Original line number Diff line number Diff line Loading @@ -175,12 +175,15 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #endif #ifdef FIX_488_SYNC_DELAY float syncMdDelay; #endif #ifdef CONTROL_METADATA_DIRECTIVITY uint16_t directivityPatternId[RENDERER_MAX_ISM_INPUTS]; #endif #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #endif } CmdlnArgs; typedef enum Loading Loading @@ -209,12 +212,15 @@ typedef enum #endif CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, #ifdef CONTROL_METADATA_REVERB CmdLnOptionId_acousticEnvironmentId, #endif #ifdef FIX_488_SYNC_DELAY CmdLnOptionId_syncMdDelay, #endif #ifdef CONTROL_METADATA_DIRECTIVITY CmdLnOptionId_directivityPatternId, #endif #ifdef CONTROL_METADATA_REVERB CmdLnOptionId_acousticEnvironmentId #endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { Loading Loading @@ -354,14 +360,6 @@ 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 #ifdef FIX_488_SYNC_DELAY { .id = CmdLnOptionId_syncMdDelay, Loading @@ -370,6 +368,22 @@ static const CmdLnParser_Option cliOptions[] = { .description = "Metadata Synchronization Delay in ms, Default is 0. Quantized by 5ms subframes for TDRenderer (13ms -> 10ms -> 2subframes)", }, #endif #ifdef CONTROL_METADATA_DIRECTIVITY { .id = CmdLnOptionId_directivityPatternId, .match = "ism_directivity_pattern_id", .matchShort = "dpid", .description = "Directivity pattern ID(s) (space-separated list of up to 4 numbers can be specified) for binaural output configuration", }, #endif #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 @@ -2542,12 +2556,21 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); #ifdef CONTROL_METADATA_REVERB args.acousticEnvironmentId = 0; #endif #ifdef FIX_488_SYNC_DELAY args.syncMdDelay = 0; #endif #ifdef CONTROL_METADATA_DIRECTIVITY for ( int32_t i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) { args.directivityPatternId[i] = 0; } #endif #ifdef CONTROL_METADATA_REVERB args.acousticEnvironmentId = 0; #endif return args; } Loading Loading @@ -2687,6 +2710,17 @@ static void parseOption( exit( -1 ); } break; #ifdef CONTROL_METADATA_DIRECTIVITY case CmdLnOptionId_directivityPatternId: assert( numOptionValues <= RENDERER_MAX_ISM_INPUTS ); for ( int16_t i = 0; i < numOptionValues; ++i ) { args->directivityPatternId[i] = (int16_t) strtol( optionValues[i], NULL, 10 ); } break; #endif #ifdef CONTROL_METADATA_REVERB case CmdLnOptionId_acousticEnvironmentId: assert( numOptionValues == 1 ); Loading lib_com/common_api_types.h +4 −0 Original line number Diff line number Diff line Loading @@ -215,7 +215,11 @@ typedef struct _IVAS_RENDER_CONFIG #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_CONFIG_DATA split_rend_config; #endif #ifdef CONTROL_METADATA_DIRECTIVITY float directivity[IVAS_MAX_NUM_OBJECTS * 3]; #else float directivity[3]; #endif } IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE; typedef struct _IVAS_LS_CUSTOM_LAYOUT Loading lib_com/ivas_error.h +3 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,9 @@ typedef enum #ifdef CONTROL_METADATA_REVERB IVAS_ERR_INVALID_RENDER_CONFIG, IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING, #ifdef CONTROL_METADATA_DIRECTIVITY IVAS_ERR_DIRECTIVITY_PATTERN_ID_MISSING, #endif #endif #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_ERR_LC3PLUS_INVALID_BITRATE, Loading lib_dec/lib_dec.c +9 −0 Original line number Diff line number Diff line Loading @@ -1621,7 +1621,11 @@ ivas_error IVAS_DEC_GetRenderConfig( mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->room_acoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->room_acoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef CONTROL_METADATA_DIRECTIVITY mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS ); #else mvr2r( hRCin->directivity, hRCout->directivity, 3 ); #endif #ifdef SPLIT_REND_WITH_HEAD_ROT hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k; Loading Loading @@ -1677,7 +1681,12 @@ ivas_error IVAS_DEC_FeedRenderConfig( mvr2r( renderConfig.room_acoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef CONTROL_METADATA_DIRECTIVITY mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS ); #else mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 ); #endif #ifdef SPLIT_REND_WITH_HEAD_ROT hRenderConfig->split_rend_config = renderConfig.split_rend_config; Loading Loading
apps/decoder.c +33 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,9 @@ typedef struct #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #ifdef CONTROL_METADATA_DIRECTIVITY uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; #endif #endif } DecArguments; Loading Loading @@ -615,6 +618,13 @@ int main( fprintf( stderr, "Failed to read renderer configuration from file %s\n\n", arg.renderConfigFilename ); goto cleanup; } #ifdef CONTROL_METADATA_DIRECTIVITY if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get directivity for objects: %d %d %d %d\n\n", arg.directivityPatternId[0], arg.directivityPatternId[1], arg.directivityPatternId[2], arg.directivityPatternId[3] ); goto cleanup; } #endif #ifdef CONTROL_METADATA_REVERB if ( arg.outputFormat == IVAS_DEC_OUTPUT_BINAURAL_ROOM_REVERB ) Loading Loading @@ -994,6 +1004,12 @@ static bool parseCmdlIVAS_dec( #ifdef CONTROL_METADATA_REVERB arg->acousticEnvironmentId = 0; #ifdef CONTROL_METADATA_DIRECTIVITY for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) { arg->directivityPatternId[i] = 0; } #endif #endif /*-----------------------------------------------------------------* * Initialization Loading Loading @@ -1361,6 +1377,20 @@ static bool parseCmdlIVAS_dec( ++i; arg->acousticEnvironmentId = (int16_t) atoi( argv[i++] ); } #ifdef CONTROL_METADATA_DIRECTIVITY else if ( strcmp( argv_to_upper, "-DPID" ) == 0 ) { ++i; int16_t tmp; tmp = 0; while ( is_number( argv[i + tmp] ) && tmp < IVAS_MAX_NUM_OBJECTS ) { arg->directivityPatternId[tmp] = (int16_t) atoi( argv[i + tmp] ); ++tmp; } i += tmp; } #endif #endif /*-----------------------------------------------------------------* * Option not recognized Loading Loading @@ -1546,6 +1576,9 @@ 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" ); #ifdef CONTROL_METADATA_DIRECTIVITY fprintf( stdout, "-dpid ID : Directivity pattern ID(s) (space-separated list of up to 4 numbers can be specified) for binaural output configuration\n" ); #endif #ifdef CONTROL_METADATA_REVERB fprintf( stdout, "-aeid ID : Acoustic environment ID (number >= 0) for BINAURAL_ROOM_REVERB output configuration\n" ); #endif Loading
apps/renderer.c +51 −17 Original line number Diff line number Diff line Loading @@ -175,12 +175,15 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #endif #ifdef FIX_488_SYNC_DELAY float syncMdDelay; #endif #ifdef CONTROL_METADATA_DIRECTIVITY uint16_t directivityPatternId[RENDERER_MAX_ISM_INPUTS]; #endif #ifdef CONTROL_METADATA_REVERB uint16_t acousticEnvironmentId; #endif } CmdlnArgs; typedef enum Loading Loading @@ -209,12 +212,15 @@ typedef enum #endif CmdLnOptionId_referenceVectorFile, CmdLnOptionId_exteriorOrientationFile, #ifdef CONTROL_METADATA_REVERB CmdLnOptionId_acousticEnvironmentId, #endif #ifdef FIX_488_SYNC_DELAY CmdLnOptionId_syncMdDelay, #endif #ifdef CONTROL_METADATA_DIRECTIVITY CmdLnOptionId_directivityPatternId, #endif #ifdef CONTROL_METADATA_REVERB CmdLnOptionId_acousticEnvironmentId #endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { Loading Loading @@ -354,14 +360,6 @@ 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 #ifdef FIX_488_SYNC_DELAY { .id = CmdLnOptionId_syncMdDelay, Loading @@ -370,6 +368,22 @@ static const CmdLnParser_Option cliOptions[] = { .description = "Metadata Synchronization Delay in ms, Default is 0. Quantized by 5ms subframes for TDRenderer (13ms -> 10ms -> 2subframes)", }, #endif #ifdef CONTROL_METADATA_DIRECTIVITY { .id = CmdLnOptionId_directivityPatternId, .match = "ism_directivity_pattern_id", .matchShort = "dpid", .description = "Directivity pattern ID(s) (space-separated list of up to 4 numbers can be specified) for binaural output configuration", }, #endif #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 @@ -2542,12 +2556,21 @@ static CmdlnArgs defaultArgs( args.lfeCustomRoutingEnabled = false; clearString( args.inLfePanningMatrixFile ); #ifdef CONTROL_METADATA_REVERB args.acousticEnvironmentId = 0; #endif #ifdef FIX_488_SYNC_DELAY args.syncMdDelay = 0; #endif #ifdef CONTROL_METADATA_DIRECTIVITY for ( int32_t i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) { args.directivityPatternId[i] = 0; } #endif #ifdef CONTROL_METADATA_REVERB args.acousticEnvironmentId = 0; #endif return args; } Loading Loading @@ -2687,6 +2710,17 @@ static void parseOption( exit( -1 ); } break; #ifdef CONTROL_METADATA_DIRECTIVITY case CmdLnOptionId_directivityPatternId: assert( numOptionValues <= RENDERER_MAX_ISM_INPUTS ); for ( int16_t i = 0; i < numOptionValues; ++i ) { args->directivityPatternId[i] = (int16_t) strtol( optionValues[i], NULL, 10 ); } break; #endif #ifdef CONTROL_METADATA_REVERB case CmdLnOptionId_acousticEnvironmentId: assert( numOptionValues == 1 ); Loading
lib_com/common_api_types.h +4 −0 Original line number Diff line number Diff line Loading @@ -215,7 +215,11 @@ typedef struct _IVAS_RENDER_CONFIG #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_CONFIG_DATA split_rend_config; #endif #ifdef CONTROL_METADATA_DIRECTIVITY float directivity[IVAS_MAX_NUM_OBJECTS * 3]; #else float directivity[3]; #endif } IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE; typedef struct _IVAS_LS_CUSTOM_LAYOUT Loading
lib_com/ivas_error.h +3 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,9 @@ typedef enum #ifdef CONTROL_METADATA_REVERB IVAS_ERR_INVALID_RENDER_CONFIG, IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING, #ifdef CONTROL_METADATA_DIRECTIVITY IVAS_ERR_DIRECTIVITY_PATTERN_ID_MISSING, #endif #endif #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_ERR_LC3PLUS_INVALID_BITRATE, Loading
lib_dec/lib_dec.c +9 −0 Original line number Diff line number Diff line Loading @@ -1621,7 +1621,11 @@ ivas_error IVAS_DEC_GetRenderConfig( mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->room_acoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_dsr, hRCout->room_acoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef CONTROL_METADATA_DIRECTIVITY mvr2r( hRCin->directivity, hRCout->directivity, 3 * MAX_NUM_OBJECTS ); #else mvr2r( hRCin->directivity, hRCout->directivity, 3 ); #endif #ifdef SPLIT_REND_WITH_HEAD_ROT hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k; Loading Loading @@ -1677,7 +1681,12 @@ ivas_error IVAS_DEC_FeedRenderConfig( mvr2r( renderConfig.room_acoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); #ifdef CONTROL_METADATA_DIRECTIVITY mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 * MAX_NUM_OBJECTS ); #else mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 ); #endif #ifdef SPLIT_REND_WITH_HEAD_ROT hRenderConfig->split_rend_config = renderConfig.split_rend_config; Loading