![]() |
TIOVX User Guide
|
APIs for handling references, handles, and data pointers.
Functions | |
| 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_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_num_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... | |
| 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_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:
The memory being imported to an OpenVX reference must adhere to the semantics of how the framework allocates memory. This is of particular note for a few OpenVX objects listed below.
Please note the important details below on semantics about the usage of the reference import and export. Errors will occur if the below requirements are not adhered to.
Finally, please refer to the usage section of the TIOVX documentation for further information and diagrams showcasing the proper usage of these API's.
| [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_num_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:
The memory exported from an OpenVX reference adheres to the semantics of how the framework allocates memory. This is of particular note for a few OpenVX objects listed below.
Please note the important details below on semantics about the usage of the reference import and export. Errors will occur if the below requirements are not adhered to.
Finally, please refer to the usage section of the TIOVX documentation for further information and diagrams showcasing the proper usage of these API's.
| [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_num_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.