![]() |
TIOVX User Guide
|
Utility APIs available for the application running on the host.
Functions | |
vx_status | tivx_utils_expand_file_path (const char *inFilePath, char *outFilePath) |
Conditionally returns the absolute path of the 'inFilePath'. More... | |
uint32_t | tivx_utils_simple_image_checksum (vx_image image, uint8_t plane_id, vx_rectangle_t rect) |
Returns a uint32_t of the sum of all words within a rect of an image's buffer. More... | |
uint32_t | tivx_utils_user_data_object_checksum (vx_user_data_object user_data_object, uint32_t offset_byte, uint32_t num_bytes) |
Returns a uint32_t of the sum of all words within a range of the user data object buffer. More... | |
uint32_t | tivx_utils_tensor_checksum (vx_tensor tensor_object, vx_size number_of_dimensions, vx_size *view_start, vx_size *view_end, vx_size *user_stride) |
Returns a uint32_t of the sum of all words within a range of the tensor buffer. More... | |
vx_status | tivx_utils_bmp_file_read (const char *filename, vx_bool convert_to_gray_scale, tivx_utils_bmp_image_params_t *imageParams) |
Read data from BMP file. More... | |
vx_status | tivx_utils_bmp_file_read_from_memory (const void *buf, uint32_t buf_size, vx_bool convert_to_gray_scale, tivx_utils_bmp_image_params_t *imageParams) |
Read data from BMP file. More... | |
void | tivx_utils_bmp_file_read_release (void *png_file_context) |
Free memory allocated during bmp file read. More... | |
int32_t | tivx_utils_bmp_file_write (const char *filename, uint32_t width, uint32_t height, uint32_t stride, vx_df_image df, void *data_ptr) |
Write data into BMP file. More... | |
vx_image | tivx_utils_create_vximage_from_bmpfile (vx_context context, const char *filename, vx_bool convert_to_gray_scale) |
Create a image data object given BMP filename as input. More... | |
vx_status | tivx_utils_save_vximage_to_bmpfile (const char *filename, vx_image image) |
Save data from image object to BMP file. More... | |
vx_status | tivx_utils_load_vximage_from_bmpfile (vx_image image, char *filename, vx_bool convert_to_gray_scale) |
Load data from BMP file into a previously created vx_image object. More... | |
vx_status | tivx_utils_graph_perf_print (vx_graph graph) |
Print graph performance information to stdout via 'printf'. More... | |
vx_status | tivx_utils_graph_perf_export (FILE *fp, vx_graph graph) |
Writes graph information to .md file for integration into user guide. More... | |
vx_status | tivx_utils_node_perf_print (vx_node node) |
Print node performance information to stdout via 'printf'. More... | |
vx_status | tivx_utils_node_mem_print (vx_graph graph) |
Print node memory usage information to stdout via 'printf'. More... | |
vx_status | tivx_utils_export_ref_for_ipc_xfer (const vx_reference ref, tivx_utils_ref_ipc_msg_t *ipcMsg) |
Export the internal handle information of a valid reference as a buffer descriptor along with meta information so that the information could be transferred over Linux/QNX IPC mechanism to a remote process. Only the following reference types are supported. More... | |
vx_status | tivx_utils_import_ref_from_ipc_xfer (vx_context context, tivx_utils_ref_ipc_msg_t *ipcMsg, vx_reference *ref) |
Import the external handle information of a valid reference as a buffer descriptor along with meta information exchanged via Linux/ QNX IPC mechanism. Only the following reference types are supported. More... | |
vx_bool | tivx_utils_compare_refs_from_ipc_xfer (tivx_utils_ref_ipc_msg_t *ipcMsg1, tivx_utils_ref_ipc_msg_t *ipcMsg2) |
Compare the external handle information of a valid reference with another external handle. More... | |
vx_status tivx_utils_expand_file_path | ( | const char * | inFilePath, |
char * | outFilePath | ||
) |
Conditionally returns the absolute path of the 'inFilePath'.
inFilePath | [in] inFilePath |
outFilePath | [out] This shall contain the path to the inFilePath as follows:
|
uint32_t tivx_utils_simple_image_checksum | ( | vx_image | image, |
uint8_t | plane_id, | ||
vx_rectangle_t | rect | ||
) |
Returns a uint32_t of the sum of all words within a rect of an image's buffer.
If the buffer size contains a number of bytes not divisible by 4, the last 1, 2, or 3 bytes are rightshifted so that the last byte aligns with the LSB.
image | [in] input image |
plane_id | [in] plane number for multi plane image format |
rect | [in] rectangular region to generate the checksum for |
uint32_t tivx_utils_user_data_object_checksum | ( | vx_user_data_object | user_data_object, |
uint32_t | offset_byte, | ||
uint32_t | num_bytes | ||
) |
Returns a uint32_t of the sum of all words within a range of the user data object buffer.
If the buffer size contains a number of bytes not divisible by 4, the last 1, 2, or 3 bytes are rightshifted so that the last byte aligns with the LSB.
user_data_object | [in] input user data object |
offset_byte | [in] starting offset (in bytes) |
num_bytes | [in] number of bytes to generate the checksum for |
uint32_t tivx_utils_tensor_checksum | ( | vx_tensor | tensor_object, |
vx_size | number_of_dimensions, | ||
vx_size * | view_start, | ||
vx_size * | view_end, | ||
vx_size * | user_stride | ||
) |
Returns a uint32_t of the sum of all words within a range of the tensor buffer.
If the buffer size contains a number of bytes not divisible by 4, the last 1, 2, or 3 bytes are rightshifted so that the last byte aligns with the LSB.
tensor_object | [in] input tensor object |
number_of_dimensions | [in] number of tensor dimensions |
view_start | [in] starting offset for each dimension (in elements) |
view_end | [in] ending offset for each dimension (in elements) |
user_stride | [in] stride for each dimension (in bytes) |
vx_status tivx_utils_bmp_file_read | ( | const char * | filename, |
vx_bool | convert_to_gray_scale, | ||
tivx_utils_bmp_image_params_t * | imageParams | ||
) |
Read data from BMP file.
Same as tivx_utils_png_file_read() but with .bmp file
vx_status tivx_utils_bmp_file_read_from_memory | ( | const void * | buf, |
uint32_t | buf_size, | ||
vx_bool | convert_to_gray_scale, | ||
tivx_utils_bmp_image_params_t * | imageParams | ||
) |
Read data from BMP file.
Same as tivx_utils_png_file_read() but with .bmp file
void tivx_utils_bmp_file_read_release | ( | void * | png_file_context | ) |
Free memory allocated during bmp file read.
Same as tivx_utils_png_file_read_release() but with .bmp file
int32_t tivx_utils_bmp_file_write | ( | const char * | filename, |
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | stride, | ||
vx_df_image | df, | ||
void * | data_ptr | ||
) |
Write data into BMP file.
Same as tivx_utils_png_file_write() but with .bmp file
vx_image tivx_utils_create_vximage_from_bmpfile | ( | vx_context | context, |
const char * | filename, | ||
vx_bool | convert_to_gray_scale | ||
) |
Create a image data object given BMP filename as input.
Same as tivx_utils_create_vximage_from_pngfile() but with .bmp file
Save data from image object to BMP file.
Same as tivx_utils_save_vximage_to_pngfile() but with .bmp file
vx_status tivx_utils_load_vximage_from_bmpfile | ( | vx_image | image, |
char * | filename, | ||
vx_bool | convert_to_gray_scale | ||
) |
Load data from BMP file into a previously created vx_image object.
Same as tivx_utils_load_vximage_from_pngfile() but with .bmp file
Print graph performance information to stdout via 'printf'.
This also prints information of all nodes present within the graph
[in] | graph | graph handle |
Writes graph information to .md file for integration into user guide.
Requires the file to be opened using appPerfStatsExportOpenFile and closed using appPerfStatsExportCloseFile
[in] | fp | file handle |
[in] | graph | graph handle |
Print node performance information to stdout via 'printf'.
[in] | node | node handle |
Print node memory usage information to stdout via 'printf'.
[in] | graph | graph handle |
vx_status tivx_utils_export_ref_for_ipc_xfer | ( | const vx_reference | ref, |
tivx_utils_ref_ipc_msg_t * | ipcMsg | ||
) |
Export the internal handle information of a valid reference as a buffer descriptor along with meta information so that the information could be transferred over Linux/QNX IPC mechanism to a remote process. Only the following reference types are supported.
[in] | ref | A valid openVX reference whose information will be exported |
[out] | ipcMsg | Exported object information |
vx_status tivx_utils_import_ref_from_ipc_xfer | ( | vx_context | context, |
tivx_utils_ref_ipc_msg_t * | ipcMsg, | ||
vx_reference * | ref | ||
) |
Import the external handle information of a valid reference as a buffer descriptor along with meta information exchanged via Linux/ QNX IPC mechanism. Only the following reference types are supported.
[in] | context | A valid openVX context |
[in,out] | ipcMsg | Exported object information |
[in,out] | ref | A valid openVX reference to import. If *ref is NULL, then a new object will be allocated with the imported handles and returned. If *ref is not NULL then the object will be used to import the handles. |
vx_bool tivx_utils_compare_refs_from_ipc_xfer | ( | tivx_utils_ref_ipc_msg_t * | ipcMsg1, |
tivx_utils_ref_ipc_msg_t * | ipcMsg2 | ||
) |
Compare the external handle information of a valid reference with another external handle.
[in,out] | ipcMsg1 | Exported object information of the first reference |
[in,out] | ipcMsg1 | Exported object information of the second reference |