TIOVX User Guide
|
APIs for application interface accessible only on host.
Modules | |
Raw Image Data Type APIs | |
APIs creating and using raw image data type. | |
Super Node Framework Type APIs | |
APIs creating and using super node framework type. | |
Kernel Helper APIs | |
Helper APIs used used for host side kernel validation. | |
Utility APIs | |
Utility APIs available for the application running on the host. | |
Platform OSAL APIs | |
Platform operating system abstraction layer on the host. | |
Debug APIs | |
APIs for debug operations on the host. | |
Real-time Trace APIs | |
APIs for real-time event trace operations on the host. | |
Data Structures | |
struct | tivx_resource_stats_t |
Struct containing config parameters of given static resource. Allows for a log to be kept of the resources used throughout runtime. More... | |
Defines | |
#define | TIVX_TARGET_MAX_NAME (64u) |
Max possible name of a target. | |
#define | TIVX_TARGET_HOST "HOST" |
String to name a OpenVX Host. More... | |
#define | TIVX_RESOURCE_NAME_MAX (39u) |
Max size of macro. | |
#define | TIVX_CONFIG_PATH_LENGTH (512u) |
Max size of config file path. | |
#define | TIVX_GRAPH_PARAMETER_ENQUEUE_FLAG_PIPEUP (0x00000001u) |
Flag used with tivxGraphParameterEnqueueReadyRef to indicate that this enqueue call if for pipeup phase. More... | |
#define | TIVX_CONTROL_CMD_SEND_TO_ALL_REPLICATED_NODES ((uint32_t)-1) |
When sending a control command to a replicated node, this can be used to send control command to all replicated node. More... | |
#define | dimof(x) (sizeof(x)/sizeof(x[0])) |
Macro to find size of array. | |
Enumerations | |
enum | tivx_attribute_extensions_e { TIVX_NODE_TARGET_STRING = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x0, TIVX_USER_DATA_OBJECT_VALID_SIZE = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x1, TIVX_REFERENCE_TIMESTAMP = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x2, TIVX_REFERENCE_INVALID = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x3, TIVX_GRAPH_STREAM_EXECUTIONS = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x4, TIVX_KERNEL_TIMEOUT = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x5, TIVX_NODE_TIMEOUT = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x6, TIVX_GRAPH_TIMEOUT = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x7, TIVX_GRAPH_PIPELINE_DEPTH = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x8, TIVX_CONTEXT_NUM_USER_KERNEL_ID = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0x9, TIVX_IMAGE_IMAGEPATCH_ADDRESSING = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0xa, TIVX_TENSOR_STRIDES = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0xb, TIVX_CONTEXT_NUM_USER_LIBRARY_ID = VX_ATTRIBUTE_BASE(VX_ID_TI, (vx_enum)0) + 0xc } |
TI attribute extensions. More... | |
enum | tivx_df_image_e { TIVX_DF_IMAGE_P12 = VX_DF_IMAGE('P','0','1','2'), TIVX_DF_IMAGE_NV12_P12 = VX_DF_IMAGE('N','1','2','P'), TIVX_DF_IMAGE_RGB565 = VX_DF_IMAGE('R','5','6','5'), TIVX_DF_IMAGE_BGRX = VX_DF_IMAGE('B','G','R','A') } |
Based on the VX_DF_IMAGE definition. More... | |
enum | tivx_status_e { TIVX_STATUS_BASE = -(vx_int32)100, TIVX_ERROR_EVENT_TIMEOUT = (vx_int32)(TIVX_STATUS_BASE + 1) } |
The enumeration of all TIVX operational error codes. More... | |
enum | tivx_cpu_id_e { TIVX_CPU_ID_DSP_C7_1 = 0, TIVX_CPU_ID_DSP1 = TIVX_CPU_ID_DSP_C7_1, TIVX_CPU_ID_MCU1_0 = 1, TIVX_CPU_ID_IPU1_0 = TIVX_CPU_ID_MCU1_0, TIVX_CPU_ID_MPU_0 = 2, TIVX_CPU_ID_MAX = 3, TIVX_CPU_ID_INVALID = 0xFF, TIVX_CPU_ID_DSP1 = 0, TIVX_CPU_ID_DSP2 = 1, TIVX_CPU_ID_DSP_C7_1 = 2, TIVX_CPU_ID_MCU2_0 = 3, TIVX_CPU_ID_IPU1_0 = TIVX_CPU_ID_MCU2_0, TIVX_CPU_ID_MCU2_1 = 4, TIVX_CPU_ID_IPU1_1 = TIVX_CPU_ID_MCU2_1, TIVX_CPU_ID_MPU_0 = 5, TIVX_CPU_ID_MCU3_0 = 6, TIVX_CPU_ID_MCU3_1 = 7, TIVX_CPU_ID_MAX = 8, TIVX_CPU_ID_INVALID = 0xFF } |
CPU ID for supported CPUs. More... | |
enum | tivx_cpu_id_e { TIVX_CPU_ID_DSP_C7_1 = 0, TIVX_CPU_ID_DSP1 = TIVX_CPU_ID_DSP_C7_1, TIVX_CPU_ID_MCU1_0 = 1, TIVX_CPU_ID_IPU1_0 = TIVX_CPU_ID_MCU1_0, TIVX_CPU_ID_MPU_0 = 2, TIVX_CPU_ID_MAX = 3, TIVX_CPU_ID_INVALID = 0xFF, TIVX_CPU_ID_DSP1 = 0, TIVX_CPU_ID_DSP2 = 1, TIVX_CPU_ID_DSP_C7_1 = 2, TIVX_CPU_ID_MCU2_0 = 3, TIVX_CPU_ID_IPU1_0 = TIVX_CPU_ID_MCU2_0, TIVX_CPU_ID_MCU2_1 = 4, TIVX_CPU_ID_IPU1_1 = TIVX_CPU_ID_MCU2_1, TIVX_CPU_ID_MPU_0 = 5, TIVX_CPU_ID_MCU3_0 = 6, TIVX_CPU_ID_MCU3_1 = 7, TIVX_CPU_ID_MAX = 8, TIVX_CPU_ID_INVALID = 0xFF } |
CPU ID for supported CPUs. More... | |
Functions | |
void | tivxInit (void) |
Function to initialize OpenVX framework. More... | |
void | tivxDeInit (void) |
Function to de-initialize OpenVX framework. More... | |
void | tivxHostInit (void) |
Function to initialize OpenVX HOST side functionality. More... | |
void | tivxHostDeInit (void) |
Function to de-initialize OpenVX HOST side functionality. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxAddKernelTarget (vx_kernel kernel, const char *target_name) |
Associate a target with a kernel. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxSetKernelSinkDepth (vx_kernel kernel, uint32_t num_sink_bufs) |
Set the number of sink buffers. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxRegisterModule (const char *name, vx_publish_kernels_f publish, vx_unpublish_kernels_f unpublish) |
Register publish and unpublish functions against a module name. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxUnRegisterModule (const char *name) |
UnRegister publish and unpublish functions if previously registered. More... | |
vx_enum | tivxGetSelfCpuId (void) |
Return CPU ID of the CPU on which this API is called. More... | |
vx_status | tivxQueryResourceStats (const char *resource_name, tivx_resource_stats_t *stat) |
Query resource for resource stats. More... | |
void | tivxPrintAllResourceStats (void) |
Prints out resource stats. | |
vx_status | tivxExportAllResourceMaxUsedValueToFile (void) |
Exports the max used values to a file. More... | |
vx_node | tivxCreateNodeByKernelEnum (vx_graph graph, vx_enum kernelenum, vx_reference params[], vx_uint32 num) |
Utility function to create a node given parameter references and kernel enum. More... | |
vx_node | tivxCreateNodeByKernelRef (vx_graph graph, vx_kernel kernel, vx_reference params[], vx_uint32 num) |
Utility function to create a node given parameter references and kernel reference. More... | |
vx_node | tivxCreateNodeByKernelName (vx_graph graph, const char *kernel_name, vx_reference params[], vx_uint32 num) |
Utility function to create a node given parameter references and kernel name. More... | |
vx_bool | tivxIsReferenceVirtual (vx_reference ref) |
Utility function to check if the given reference is virtual or not. More... | |
vx_reference | tivxGetReferenceParent (vx_reference child_ref) |
Utility function to extract the parent reference from an element. More... | |
vx_bool | tivxIsTargetEnabled (const char target_name[]) |
Utility function to know if target is enabled or not. More... | |
uint64_t | tivxPlatformGetTimeInUsecs (void) |
Get the time in micro seconds. More... | |
vx_status VX_API_CALL | tivxExportGraphToDot (vx_graph graph, const char *output_file_path, const char *output_file_prefix) |
Export graph representation as DOT graph file. More... | |
vx_status VX_API_CALL | tivxSetNodeParameterNumBufByIndex (vx_node node, vx_uint32 index, vx_uint32 num_buf) |
Set number of buffers to allocate at output of a node parameter. More... | |
vx_status VX_API_CALL | tivxGetNodeParameterNumBufByIndex (vx_node node, vx_uint32 index, vx_uint32 *num_buf) |
Get number of buffers to allocate at output of a node parameter. More... | |
vx_status VX_API_CALL | tivxSetGraphPipelineDepth (vx_graph graph, vx_uint32 pipeline_depth) |
Indicates to the implementation the depth of the graph pipeline. More... | |
vx_status VX_API_CALL | tivxGraphParameterEnqueueReadyRef (vx_graph graph, vx_uint32 graph_parameter_index, vx_reference *refs, vx_uint32 num_refs, vx_uint32 flags) |
Same as vxGraphParameterEnqueueReadyRef except that it take an additional TIOVX specific flag parameter. More... | |
vx_status VX_API_CALL | tivxNodeSendCommand (vx_node node, uint32_t replicate_nodex_idx, uint32_t node_cmd_id, vx_reference ref[], uint32_t num_refs) |
Send node specific Control command. More... | |
vx_status VX_API_CALL | tivxNodeSendCommandTimed (vx_node node, uint32_t replicate_nodex_idx, uint32_t node_cmd_id, vx_reference ref[], uint32_t num_refs, uint32_t timeout) |
Send node specific Control command. More... | |
vx_node | tivxGraphGetNode (vx_graph graph, uint32_t index) |
This API is used to get a reference to a node within a graph at a given index within the graph. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxSetUserDataObjectAttribute (vx_user_data_object user_data_object, vx_enum attribute, const void *ptr, vx_size size) |
Sets attributes on the user data object. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxSetNodeTileSize (vx_node node, vx_uint32 block_width, vx_uint32 block_height) |
Sets the tile size for a given node in a graph. This is only valid for BAM-enabled kernels on C66 DSP. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxSetReferenceAttribute (vx_reference ref, vx_enum attribute, const void *ptr, vx_size size) |
Sets reference attributes for the below enums: TIVX_REFERENCE_TIMESTAMP. More... | |
VX_API_ENTRY vx_bool VX_API_CALL | tivxIsReferenceMetaFormatEqual (vx_reference ref1, vx_reference ref2) |
Check for equivalence between the meta formats of two reference objects. More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxReferenceImportHandle (vx_reference ref, const void *addr[], const uint32_t size[], uint32_t num_entries) |
Updates a reference object with the supplied handles (pointers to memory). More... | |
VX_API_ENTRY vx_status VX_API_CALL | tivxReferenceExportHandle (const vx_reference ref, void *addr[], uint32_t size[], uint32_t max_entries, uint32_t *num_entries) |
Exports the handles from a reference object. More... | |
VX_API_ENTRY vx_reference VX_API_CALL | tivxCreateReferenceFromExemplar (vx_context context, vx_reference exemplar) |
Create reference from a exemplar object. More... | |
#define TIVX_TARGET_HOST "HOST" |
#define TIVX_GRAPH_PARAMETER_ENQUEUE_FLAG_PIPEUP (0x00000001u) |
#define TIVX_CONTROL_CMD_SEND_TO_ALL_REPLICATED_NODES ((uint32_t)-1) |
TI attribute extensions.
TI attribute extensions to OpenVX
Enumerator | |
---|---|
TIVX_NODE_TARGET_STRING | Returns the target string corresponding to the node. |
TIVX_USER_DATA_OBJECT_VALID_SIZE | Sets the valid data size within the user data object. |
TIVX_REFERENCE_TIMESTAMP | Returns the timestamp in micro-seconds corresponding to the given reference. |
TIVX_REFERENCE_INVALID | Returns a boolean indicating whether or not a reference is invalid. |
TIVX_GRAPH_STREAM_EXECUTIONS | Returns the graph stream executions. Read-only. Use a |
TIVX_KERNEL_TIMEOUT | Set/Query the kernel level timeout parameter. Read-Write. Can be written at initialization as well as at runtime. Use a |
TIVX_NODE_TIMEOUT | Set/Query the node level timeout parameter. Read-Write. Can be written at initialization as well as at runtime. This timeout attribute affects the operation of the node CREATE and DELETE target kernel functions. Use a |
TIVX_GRAPH_TIMEOUT | Set/Query the graph level timeout parameter. Read-Write. Can be written at initialization as well as at runtime. This timeout attribute affects the operation of the following APIs.
|
TIVX_GRAPH_PIPELINE_DEPTH | Query the graph pipeline depth. Read-Only. Can be read at initialization as well as at runtime. Use a |
TIVX_CONTEXT_NUM_USER_KERNEL_ID | Query the context number of user kernel ID's. Read-Only. Can be read at initialization as well as at runtime. Use a |
TIVX_IMAGE_IMAGEPATCH_ADDRESSING | Query the imagepatch addressing structure from a vx_image. Read-Only. Can be read at initialization as well as at runtime. Use a |
TIVX_TENSOR_STRIDES | Query the strides from a vx_tensor object. Read-Only. Can be read at initialization as well as at runtime. Use an array of |
TIVX_CONTEXT_NUM_USER_LIBRARY_ID | Query the context number of user library ID's. Read-Only. Can be read at initialization as well as at runtime. Use a |
enum tivx_df_image_e |
Based on the VX_DF_IMAGE definition.
vx_df_image
to contain these values. enum tivx_status_e |
enum tivx_cpu_id_e |
CPU ID for supported CPUs.
CPU ID is defined in platform module since depending on platform the CPUs could be different
Current CPU IDs are defined assuming J721S2 SoC
Caution: This enum is used as index into the array #g_ipc_cpu_id_map, so change in this enum will require change in this array as well.
Definition at line 250 of file tivx_soc_am62a.h.
enum tivx_cpu_id_e |
CPU ID for supported CPUs.
CPU ID is defined in platform module since depending on platform the CPUs could be different
Current CPU IDs are defined assuming J721E SoC
Caution: This enum is used as index into the array #g_ipc_cpu_id_map, so change in this enum will require change in this array as well.
Definition at line 354 of file tivx_soc_j721e.h.
void tivxInit | ( | void | ) |
Function to initialize OpenVX framework.
Should be called during system init on all OpenVX HOST as well as OpenVX target CPUs
NOTE: In Vision SDK, this function is called during VIsion SDK system init so user need not call this explicitly
void tivxDeInit | ( | void | ) |
Function to de-initialize OpenVX framework.
Should be called during system init on all OpenVX HOST as well as OpenVX target CPUs
NOTE: In Vision SDK, this function is called during VIsion SDK system init so user need not call this explicitly
void tivxHostInit | ( | void | ) |
Function to initialize OpenVX HOST side functionality.
Should be called during system init after tivxInit() on HOST CPUs only
NOTE: In Vision SDK, this function is called during VIsion SDK system init so user need not call this explicitly
void tivxHostDeInit | ( | void | ) |
Function to de-initialize OpenVX HOST side functionality.
Should be called during system init before tivxDeInit() on HOST CPUs only
NOTE: In Vision SDK, this function is called during VIsion SDK system init so user need not call this explicitly
VX_API_ENTRY vx_status VX_API_CALL tivxAddKernelTarget | ( | vx_kernel | kernel, |
const char * | target_name | ||
) |
Associate a target with a kernel.
Call multiple times for each supported target
If given target is not valid on current platform then error VX_ERROR_NOT_SUPPORTED is returned.
Typically VX_ERROR_NOT_SUPPORTED error should be ignored for this API, since this code is typically kept same across platforms
During graph verify however if user asks to run the kernel on a target not supported by this platform it results in a error and graph cannot execute.
VX_API_ENTRY vx_status VX_API_CALL tivxSetKernelSinkDepth | ( | vx_kernel | kernel, |
uint32_t | num_sink_bufs | ||
) |
Set the number of sink buffers.
[in] | kernel | Kernel reference |
[in] | num_sink_bufs | Number of sink buffers |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | kernel is not a valid reference |
VX_API_ENTRY vx_status VX_API_CALL tivxRegisterModule | ( | const char * | name, |
vx_publish_kernels_f | publish, | ||
vx_unpublish_kernels_f | unpublish | ||
) |
Register publish and unpublish functions against a module name.
These functions are invoked when vxLoadKernels is called with the registered name.
This is alternative instead of dynamically loading kernels during vxLoadKernels
Duplicate module names not checked by this API.
API is not reentrant, user is recommended to call all tivxRegisterModule during system init before vxCreateContext() from a single thread.
Modules registered against TIVX_MODULE_NAME are called during vxCreateContext so user MUST ensure tivxRegisterModule() is called for TIVX_MODULE_NAME module
VX_API_ENTRY vx_status VX_API_CALL tivxUnRegisterModule | ( | const char * | name | ) |
UnRegister publish and unpublish functions if previously registered.
[in] | name | Module name to unregister |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_FAILURE | Unable to find module "name" in list of registered modules |
vx_enum tivxGetSelfCpuId | ( | void | ) |
Return CPU ID of the CPU on which this API is called.
vx_emum
enumeration of the CPU_ID. vx_status tivxQueryResourceStats | ( | const char * | resource_name, |
tivx_resource_stats_t * | stat | ||
) |
Query resource for resource stats.
[in] | resource_name | Name of the resource to query |
[out] | stat | Pointer to resource statistic returned from the query |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_FAILURE | Unable to find "resource_name" in list of resources |
vx_status tivxExportAllResourceMaxUsedValueToFile | ( | void | ) |
Exports the max used values to a file.
Note 1: For PC emulation mode, the exported files will not have a legend with the correct target Note 2: For target mode, only the .txt files will be generated. These can be converted to JPEG's using the following command:
dot -Tjpg -o<output file="" path>="">/<jpg name>="">.jpg <text file="" name>="">
For example, to generate a JPEG named "graph.jpg" for the file "graph.txt" in the current directory, the following command would be used.
dot -Tjpg -o./graph.jpg graph.txt
vx_node tivxCreateNodeByKernelEnum | ( | vx_graph | graph, |
vx_enum | kernelenum, | ||
vx_reference | params[], | ||
vx_uint32 | num | ||
) |
Utility function to create a node given parameter references and kernel enum.
[in] | graph | Graph reference |
[in] | kernelenum | Enumeration specifying a specific kernel |
[in] | params | List of parameter references corresponding to the enumerated kernel |
[in] | num | Number of parameter references in params list |
vx_node
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. vx_node tivxCreateNodeByKernelRef | ( | vx_graph | graph, |
vx_kernel | kernel, | ||
vx_reference | params[], | ||
vx_uint32 | num | ||
) |
Utility function to create a node given parameter references and kernel reference.
[in] | graph | Graph reference |
[in] | kernel | Kernel reference |
[in] | params | List of parameter references corresponding to the kernel reference |
[in] | num | Number of parameter references in params list |
vx_node
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. vx_node tivxCreateNodeByKernelName | ( | vx_graph | graph, |
const char * | kernel_name, | ||
vx_reference | params[], | ||
vx_uint32 | num | ||
) |
Utility function to create a node given parameter references and kernel name.
[in] | graph | Graph reference |
[in] | kernel_name | String corresponding to the kernel name |
[in] | params | List of parameter references corresponding to the kernel name |
[in] | num | Number of parameter references in params list |
vx_node
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. vx_bool tivxIsReferenceVirtual | ( | vx_reference | ref | ) |
Utility function to check if the given reference is virtual or not.
[in] | ref | Reference to query |
vx_bool
value. vx_true_e | The reference is virtual. |
vx_false_e | The reference is not virtual. |
vx_reference tivxGetReferenceParent | ( | vx_reference | child_ref | ) |
Utility function to extract the parent reference from an element.
[in] | child_ref | Child reference to query |
vx_bool tivxIsTargetEnabled | ( | const char | target_name[] | ) |
Utility function to know if target is enabled or not.
[in] | target_name | String specifying the target name |
vx_bool
value. vx_true_e | The target is enabled |
vx_false_e | The target is not enabled |
uint64_t tivxPlatformGetTimeInUsecs | ( | void | ) |
Get the time in micro seconds.
vx_status VX_API_CALL tivxExportGraphToDot | ( | vx_graph | graph, |
const char * | output_file_path, | ||
const char * | output_file_prefix | ||
) |
Export graph representation as DOT graph file.
Multiple representation of the graph are exported to different files using 'output_file_prefix' as filename prefix. The output files are stored at path 'output_file_path' Note: This must be called after vxVerifyGraph()
[in] | graph | Graph reference |
[in] | output_file_path | String specifying the ouput file path |
[in] | output_file_prefix | String specifying the filename prefix of the output file |
vx_status VX_API_CALL tivxSetNodeParameterNumBufByIndex | ( | vx_node | node, |
vx_uint32 | index, | ||
vx_uint32 | num_buf | ||
) |
Set number of buffers to allocate at output of a node parameter.
This API acts as a hint and framework may overide user specified settings in case any of above conditions are not met.
[in] | node | Node reference |
[in] | index | Node parameter index |
[in] | num_buf | Number of buffers to allocate |
vx_status VX_API_CALL tivxGetNodeParameterNumBufByIndex | ( | vx_node | node, |
vx_uint32 | index, | ||
vx_uint32 * | num_buf | ||
) |
Get number of buffers to allocate at output of a node parameter.
[in] | node | Node reference |
[in] | index | Node parameter index |
[out] | num_buf | Number of buffers allocated at output parameter |
vx_status VX_API_CALL tivxSetGraphPipelineDepth | ( | vx_graph | graph, |
vx_uint32 | pipeline_depth | ||
) |
Indicates to the implementation the depth of the graph pipeline.
[in] | graph | Graph reference |
[in] | pipeline_depth | Pipeline depth; Max value is (TIVX_GRAPH_MAX_PIPELINE_DEPTH-1) else it will return an error |
vx_status VX_API_CALL tivxGraphParameterEnqueueReadyRef | ( | vx_graph | graph, |
vx_uint32 | graph_parameter_index, | ||
vx_reference * | refs, | ||
vx_uint32 | num_refs, | ||
vx_uint32 | flags | ||
) |
Same as vxGraphParameterEnqueueReadyRef except that it take an additional TIOVX specific flag parameter.
For valid values of flag see
For more detailed description of vxGraphParameterEnqueueReadyRef see vxGraphParameterEnqueueReadyRef
[in] | graph | Graph reference |
[in] | graph_parameter_index | Graph parameter index |
[in] | refs | The array of references to enqueue into the graph parameter |
[in] | num_refs | Number of references to enqueue |
[in] | flags | Flag to control behavior of the operation |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | graph is not a valid reference OR reference is not a valid reference |
VX_ERROR_INVALID_PARAMETERS | graph_parameter_index is NOT a valid graph parameter index |
VX_FAILURE | Reference could not be enqueued. |
vx_status VX_API_CALL tivxNodeSendCommand | ( | vx_node | node, |
uint32_t | replicate_nodex_idx, | ||
uint32_t | node_cmd_id, | ||
vx_reference | ref[], | ||
uint32_t | num_refs | ||
) |
Send node specific Control command.
This API is used to send specific control command to the node. Refer to Node documentation for specific control command. Note that this API is blocking and does not return untill command is executed by the node. This API is thread safe, ie multi commands can be sent to same or different nodes from different threads
[in] | node | Reference of the node to which this command is to be sent. |
[in] | replicate_nodex_idx | In case of a non-replicated node this should be 0, For a replicated node this is the index of the replicated node to which the command is targeted. To send same command to all replicated nodes use TIVX_CONTROL_CMD_SEND_TO_ALL_REPLICATED_NODES |
[in] | node_cmd_id | Node specific control command id, refer to node specific interface file |
[in,out] | ref[] | Node parameter,
|
[in] | num_refs | Number of valid entries/references in ref[] array |
vx_status VX_API_CALL tivxNodeSendCommandTimed | ( | vx_node | node, |
uint32_t | replicate_nodex_idx, | ||
uint32_t | node_cmd_id, | ||
vx_reference | ref[], | ||
uint32_t | num_refs, | ||
uint32_t | timeout | ||
) |
Send node specific Control command.
This API is used to send specific control command to the node. Refer to Node documentation for specific control command. Note that this API blocks for atmost 'timeout' milli-seconds i.e. the API returns either when the command execution finishes or if the timeout occurs, whichever occurs first. This API is thread safe, ie multi commands can be sent to same or different nodes from different threads
[in] | node | Reference of the node to which this command is to be sent. |
[in] | replicate_nodex_idx | In case of a non-replicated node this should be 0, For a replicated node this is the index of the replicated node to which the command is targeted. To send same command to all replicated nodes use TIVX_CONTROL_CMD_SEND_TO_ALL_REPLICATED_NODES |
[in] | node_cmd_id | Node specific control command id, refer to node specific interface file |
[in,out] | ref[] | Node parameter,
|
[in] | num_refs | Number of valid entries/references in ref[] array |
[in] | timeout | Timeout in units of msecs, use TIVX_EVENT_TIMEOUT_WAIT_FOREVER to wait forever |
This API is used to get a reference to a node within a graph at a given index within the graph.
Use vxQueryGraph with attribute VX_GRAPH_NUMNODES to get number of nodes within a graph. This API can be called only on a verified graph. Node returned by this API is not reference counted and should not be released by the user.
[in] | graph | graph handle |
[in] | index | node index, value from 0 .. value returned by vxQueryGraph(VX_GRAPH_NUMNODES) - 1 |
VX_API_ENTRY vx_status VX_API_CALL tivxSetUserDataObjectAttribute | ( | vx_user_data_object | user_data_object, |
vx_enum | attribute, | ||
const void * | ptr, | ||
vx_size | size | ||
) |
Sets attributes on the user data object.
[in] | user_data_object | The reference to the user data object. |
[in] | attribute | The attribute to modify. Use a vx_user_data_object_attribute_e . |
[in] | ptr | The pointer to the value to which to set the attribute. |
[in] | size | The size in bytes of the container to which ptr points. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If the user_data_object is not a vx_user_data_object . |
VX_ERROR_NOT_SUPPORTED | If the attribute is not a value supported on this implementation. |
VX_ERROR_INVALID_PARAMETERS | If any of the other parameters are incorrect. |
VX_API_ENTRY vx_status VX_API_CALL tivxSetNodeTileSize | ( | vx_node | node, |
vx_uint32 | block_width, | ||
vx_uint32 | block_height | ||
) |
Sets the tile size for a given node in a graph. This is only valid for BAM-enabled kernels on C66 DSP.
[in] | node | The reference to the vx_node object. |
[in] | block_width | The tile width in pixels. |
[in] | block_height | The tile height in lines. |
vx_status_e
enumeration. VX_SUCCESS | if the tile size is set correctly. |
VX_API_ENTRY vx_status VX_API_CALL tivxSetReferenceAttribute | ( | vx_reference | ref, |
vx_enum | attribute, | ||
const void * | ptr, | ||
vx_size | size | ||
) |
Sets reference attributes for the below enums: TIVX_REFERENCE_TIMESTAMP.
[in] | ref | The reference object. |
[in] | attribute | The attribute of the reference to be set. |
[in] | ptr | The value of the reference attribute to be set. |
[in] | size | The size of the value of the reference attribute to be set. |
vx_status_e
enumeration. VX_SUCCESS | if the attribute was set correctly. |
VX_API_ENTRY vx_bool VX_API_CALL tivxIsReferenceMetaFormatEqual | ( | vx_reference | ref1, |
vx_reference | ref2 | ||
) |
Check for equivalence between the meta formats of two reference objects.
This API is used to check for equivalence between the meta formats of two reference objects. The function returns true if they are equal and false if not.
[in] | ref1 | First reference object to be compared. |
[in] | ref2 | Second reference object to be compared. |
_vx_bool_e
enumeration. VX_API_ENTRY vx_status VX_API_CALL tivxReferenceImportHandle | ( | vx_reference | ref, |
const void * | addr[], | ||
const uint32_t | size[], | ||
uint32_t | num_entries | ||
) |
Updates a reference object with the supplied handles (pointers to memory).
Any existing handles in the reference object will be over-written with the new handles provided. No error will be reported. If the caller chooses to preserve the existing handles then the caller should use tivxReferenceExportHandle
for retrieving the current handles before invoking this function.
The following conditions regarding 'addr' must be TRUE:
Only the following reference object types are supported:
For TIVX_TYPE_PYRAMID type, the references are packed for each level. If the image type has multiple planes then all the handles for a given level are packed contiguously before the handles of the next level. For example if the pyramid object has N levels and each level has image with X levels then the packing will look like: Level 0 Plane 0 Level 0 Plane 1 ........... Level 0 Plane (X-1) ........... Level (N-1) Plane 0 Level (N-1) Plane 1 ........... Level (N-1) Plane (X-1)
[in,out] | ref | The reference object to be updated. |
[in] | addr | An array of pointers for holding the handles. The entries can be NULL. |
[in] | size | An array of sizes corresponding to handles. The entries will be looked at if the corresponding handle is not NULL. |
[in] | num_entries | Number of valid entries in addr[]. This should match the number of handles expected to be maintained internally by 'ref' (ex:- for an image object with multiple planes, num_extries > 1). |
vx_status_e
enumeration. VX_SUCCESS,if | the import operation is successful. The 'ref' object will have the internal handles updated. VX_FAILURE, if the operation is unsuccessful. The state of the reference object is not changed. A failure can occur for the following reasons:
|
VX_API_ENTRY vx_status VX_API_CALL tivxReferenceExportHandle | ( | const vx_reference | ref, |
void * | addr[], | ||
uint32_t | size[], | ||
uint32_t | max_entries, | ||
uint32_t * | num_entries | ||
) |
Exports the handles from a reference object.
It is the responsibility of the caller to make sure that the addr array is dimensioned to hold all the handles expected from the reference object.
Only the following reference object types are supported:
For TIVX_TYPE_PYRAMID type, the references are packed for each level. If the image type has multiple planes then all the handles for a given level are packed contiguously before the handles of the next level. For example if the pyramid object has N levels and each level has image with X levels then the packing will look like: Level 0 Plane 0 Level 0 Plane 1 ........... Level 0 Plane (X-1) ........... Level (N-1) Plane 0 Level (N-1) Plane 1 ........... Level (N-1) Plane (X-1)
[in] | ref | The reference object to export the handles from. |
[out] | addr | An array of pointers for holding the handles. |
[out] | size | An array of sizes corresponding to handles. The entries will be looked |
[in] | max_entries | Maximum number of entries to export. |
[out] | num_entries | Number of valid entries in addr[]. This should match the number of handles expected to be maintained internally by 'ref' (ex:- for an image object with multiple planes, num_extries > 1). |
vx_status_e
enumeration. VX_SUCCESS,if | the export operation is successful. The 'addr' object will be populated with 'num_entries' handles. size[i] will correspond to the handle addr[i]. VX_FAILURE, if the operation is unsuccessful. The state of the reference object is not changed. A failure can occur for the following reasons:
|
VX_API_ENTRY vx_reference VX_API_CALL tivxCreateReferenceFromExemplar | ( | vx_context | context, |
vx_reference | exemplar | ||
) |
Create reference from a exemplar object.
This API is used to create a new reference using the same meta information as an already created reference object.
[in] | context | The reference to the implementation context. |
[in] | exemplar | The exemplar object. |
vx_reference
. Any possible errors preventing a successful creation should be checked using vxGetStatus
.