TIOVX User Guide

Detailed Description

APIs for object descriptor manipulation.

Data Structures

struct  tivx_remap_point_t
 Remap point in remap table. More...
 
struct  tivx_obj_desc_t
 Object descriptor. More...
 
struct  tivx_obj_desc_node_t
 Node object descriptor. More...
 
struct  tivx_obj_desc_image_t
 Image object descriptor as placed in shared memory. More...
 
struct  tivx_obj_desc_remap_t
 Remap object descriptor as placed in shared memory. More...
 
struct  tivx_obj_desc_matrix_t
 matrix object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_lut_t
 lut object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_pyramid_t
 pyramid object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_convolution_t
 convolution object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_threshold_t
 threshold object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_distribution_t
 distribution object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_array_t
 array object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_user_data_object_t
 user data object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_raw_image_t
 raw image descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_object_array_t
 object array object descriptor as placed in shared memory More...
 
struct  tivx_obj_desc_scalar_t
 Scalar object descriptor as placed in shared memory. More...
 
struct  tivx_obj_desc_tensor_t
 Tensor object descriptor as placed in shared memory. More...
 

Defines

#define TIVX_REF_FLAG_LOG_RT_TRACE   (0x00000001u)
 Flag to indicate if run-time trace should be logged.
 
#define TIVX_REF_FLAG_IS_INVALID   (0x00000002u)
 Flag to indicate if ref is invalid.
 
#define TIVX_NODE_FLAG_IS_REPLICATED   (0x00000001u)
 Flag to indicate if node is replicated.
 
#define TIVX_NODE_FLAG_IS_EXECUTED   (0x00000002u)
 Flag to indicate if node is executed.
 
#define TIVX_NODE_FLAG_IS_USER_CALLBACK   (0x00000004u)
 Flag to indicate if user callback is requested after node complete.
 
#define TIVX_NODE_FLAG_IS_TARGET_KERNEL   (0x00000008u)
 Flag to indicate if kernel associated with this node is a user kernel or target kernel.
 
#define TIVX_NODE_FLAG_IS_SUPERNODE   (0x00000010u)
 Flag to indicate if this node is a supernode.
 
#define TIVX_NODE_OBJ_DESC_STATE_IDLE   (0x0u)
 State of a node object descriptor to indicate it is IDLE.
 
#define TIVX_NODE_OBJ_DESC_STATE_BLOCKED   (0x1u)
 State of a node object descriptor to indicate it is BLOCKED. More...
 
#define TIVX_OBJ_DESC_MAX_HOST_PORT_ID_CPU   (16u)
 Max size of the array host_port_id, in tivx_obj_desc_t.
 

Enumerations

enum  tivx_obj_desc_type_e {
  TIVX_OBJ_DESC_IMAGE = 0x0,
  TIVX_OBJ_DESC_SCALAR = 0x1,
  TIVX_OBJ_DESC_REMAP = 0x2,
  TIVX_OBJ_DESC_NODE = 0x3,
  TIVX_OBJ_DESC_CMD = 0x4,
  TIVX_OBJ_DESC_MATRIX = 0x5,
  TIVX_OBJ_DESC_LUT = 0x6,
  TIVX_OBJ_DESC_CONVOLUTION = 0x7,
  TIVX_OBJ_DESC_DISTRIBUTION = 0x8,
  TIVX_OBJ_DESC_THRESHOLD = 0x9,
  TIVX_OBJ_DESC_ARRAY = 0xA,
  TIVX_OBJ_DESC_PYRAMID = 0xB,
  TIVX_OBJ_DESC_OBJARRAY = 0xC,
  TIVX_OBJ_DESC_KERNEL_NAME = 0xD,
  TIVX_OBJ_DESC_QUEUE = 0xE,
  TIVX_OBJ_DESC_DATA_REF_Q = 0xF,
  TIVX_OBJ_DESC_GRAPH = 0x10,
  TIVX_OBJ_DESC_TENSOR = 0x11,
  TIVX_OBJ_DESC_USER_DATA_OBJECT = 0x12,
  TIVX_OBJ_DESC_RAW_IMAGE = 0x13,
  TIVX_OBJ_DESC_SUPER_NODE = 0x14,
  TIVX_OBJ_DESC_INVALID = 0xFFFFu
}
 Enum that list all possible object descriptor type's. More...
 
enum  tivx_image_create_type_e {
  TIVX_IMAGE_NORMAL,
  TIVX_IMAGE_UNIFORM,
  TIVX_IMAGE_VIRTUAL,
  TIVX_IMAGE_FROM_HANDLE,
  TIVX_IMAGE_FROM_ROI,
  TIVX_IMAGE_FROM_CHANNEL
}
 Method by which image is created. More...
 

Functions

tivx_obj_desc_ttivxGetObjDescElement (tivx_obj_desc_t *obj_desc, uint16_t elem_idx)
 Function to get the pointer to an element of an object array. If the object being passed is a regular object descriptor then a pointer to the object is returned. More...
 
void tivx_obj_desc_strncpy (volatile void *dst, volatile void *src, uint32_t size)
 Utility function for memory/string copy/set operation on object descriptor pointers. More...
 
void tivx_obj_desc_memcpy (volatile void *dst, volatile void *src, uint32_t size)
 Utility function for memory/string copy/set operation on object descriptor pointers. More...
 
void tivx_obj_desc_memset (volatile void *dst, uint8_t val, uint32_t size)
 Utility function for memory/string copy/set operation on object descriptor pointers. More...
 
int32_t tivx_obj_desc_strncmp (volatile void *dst, volatile void *src, uint32_t size)
 Utility function for memory/string compare operation on object descriptor pointers. More...
 

Macro Definition Documentation

◆ TIVX_NODE_OBJ_DESC_STATE_BLOCKED

#define TIVX_NODE_OBJ_DESC_STATE_BLOCKED   (0x1u)

State of a node object descriptor to indicate it is BLOCKED.

    There are two condition for which a node can be block
    1. prev node obj desc in pipeline is waiting to be
    executed
    2. parameters could not be acquired

Definition at line 153 of file tivx_obj_desc.h.

Enumeration Type Documentation

◆ tivx_obj_desc_type_e

Enum that list all possible object descriptor type's.

Enumerator
TIVX_OBJ_DESC_IMAGE 

Object desciptor that has information related to image object.

TIVX_OBJ_DESC_SCALAR 

Object desciptor that has information related to scalar object.

TIVX_OBJ_DESC_REMAP 

Object desciptor that has information related to remap object.

TIVX_OBJ_DESC_NODE 

Object desciptor that has information related to node object.

TIVX_OBJ_DESC_CMD 

Object desciptor that has information related to command object.

TIVX_OBJ_DESC_MATRIX 

Object desciptor that has information related to matrix object.

TIVX_OBJ_DESC_LUT 

Object desciptor that has information related to Lut object.

TIVX_OBJ_DESC_CONVOLUTION 

Object desciptor that has information related to Convolution object.

TIVX_OBJ_DESC_DISTRIBUTION 

Object desciptor that has information related to Distribution object.

TIVX_OBJ_DESC_THRESHOLD 

Object desciptor that has information related to threshold object.

TIVX_OBJ_DESC_ARRAY 

Object desciptor that has information related to Array object.

TIVX_OBJ_DESC_PYRAMID 

Object desciptor that has information related to Pyramid object.

TIVX_OBJ_DESC_OBJARRAY 

Object desciptor that has information related to Object Array object.

TIVX_OBJ_DESC_KERNEL_NAME 

Object desciptor that has information related to kernel name.

TIVX_OBJ_DESC_QUEUE 

Object desciptor queue.

TIVX_OBJ_DESC_DATA_REF_Q 

Object desciptor data ref queue.

TIVX_OBJ_DESC_GRAPH 

Object desciptor graph.

TIVX_OBJ_DESC_TENSOR 

Object desciptor that has information related to tensor object.

TIVX_OBJ_DESC_USER_DATA_OBJECT 

Object desciptor that has information related to user data object.

TIVX_OBJ_DESC_RAW_IMAGE 

Object desciptor that has information related to raw image object.

TIVX_OBJ_DESC_SUPER_NODE 

Object desciptor that has information related to super node.

TIVX_OBJ_DESC_INVALID 

Value of a invalid object descriptor.

Definition at line 167 of file tivx_obj_desc.h.

◆ tivx_image_create_type_e

Method by which image is created.

Enumerator
TIVX_IMAGE_NORMAL 

Create using vxCreateImage()

TIVX_IMAGE_UNIFORM 

Create using vxCreateUniformImage()

TIVX_IMAGE_VIRTUAL 

Create using vxCreateVirtualImage()

TIVX_IMAGE_FROM_HANDLE 

Create using vxCreateImageFromHandle()

TIVX_IMAGE_FROM_ROI 

Create using vxCreateImageFromROI()

TIVX_IMAGE_FROM_CHANNEL 

Create using vxCreateImageFromChannel()

Definition at line 253 of file tivx_obj_desc.h.

Function Documentation

◆ tivxGetObjDescElement()

tivx_obj_desc_t* tivxGetObjDescElement ( tivx_obj_desc_t obj_desc,
uint16_t  elem_idx 
)

Function to get the pointer to an element of an object array. If the object being passed is a regular object descriptor then a pointer to the object is returned.

Parameters
[in]obj_descobject descriptor pointer
[in]elem_idxA valid index with in the object array. This is used only if obj_desc refers to an object descriptor array, otherwise it it ignored.

◆ tivx_obj_desc_strncpy()

void tivx_obj_desc_strncpy ( volatile void *  dst,
volatile void *  src,
uint32_t  size 
)

Utility function for memory/string copy/set operation on object descriptor pointers.

IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making a access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in a unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignmen should be avoided and below function used instead

◆ tivx_obj_desc_memcpy()

void tivx_obj_desc_memcpy ( volatile void *  dst,
volatile void *  src,
uint32_t  size 
)

Utility function for memory/string copy/set operation on object descriptor pointers.

IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making a access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in a unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignmen should be avoided and below function used instead

◆ tivx_obj_desc_memset()

void tivx_obj_desc_memset ( volatile void *  dst,
uint8_t  val,
uint32_t  size 
)

Utility function for memory/string copy/set operation on object descriptor pointers.

IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making a access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in a unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignmen should be avoided and below function used instead

◆ tivx_obj_desc_strncmp()

int32_t tivx_obj_desc_strncmp ( volatile void *  dst,
volatile void *  src,
uint32_t  size 
)

Utility function for memory/string compare operation on object descriptor pointers.

IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making a access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in a unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignmen should be avoided and below function used instead