TIOVX User Guide

Detailed Description

APIs for common target kernel operations.

Functions

void tivxRegisterTargetKernels (const Tivx_Target_Kernel_List *kernel_list, uint32_t num_kernels)
 Registers the kernels list on the target side.
 
void tivxUnRegisterTargetKernels (const Tivx_Target_Kernel_List *kernel_list, uint32_t num_kernels)
 Unregisters the kernels list on the target side.
 
static vx_uint32 tivxComputePatchOffset (vx_uint32 x, vx_uint32 y, const vx_imagepatch_addressing_t *addr)
 Computes the patch offset into the image.
 
static vx_status tivxCheckNullParams (tivx_obj_desc_t *obj_desc[], uint16_t num_params, uint16_t max_params)
 Check number of parameters and NULL pointers. More...
 
void tivxInitBufParams (const tivx_obj_desc_image_t *obj_desc, VXLIB_bufParams2D_t buf_params[])
 A utility API to initialize VXLIB buf parameters based on the provided object descriptor. More...
 
void tivxInitTwoBufParams (const tivx_obj_desc_image_t *obj_desc0, const tivx_obj_desc_image_t *obj_desc1, VXLIB_bufParams2D_t buf_params0[], VXLIB_bufParams2D_t buf_params1[])
 A utility API to initialize two VXLIB bufparams for a kernel where width and height should be equal. The API sets both buf_params to the minimum of the valid rectangle.
 
void tivxSetPointerLocation (const tivx_obj_desc_image_t *obj_desc, void *target_ptr[], uint8_t *addr[])
 A utility API that sets the pointer to the correct location based on the minimum of the valid rectangle.
 
void tivxSetTwoPointerLocation (const tivx_obj_desc_image_t *obj_desc0, const tivx_obj_desc_image_t *obj_desc1, void *target_ptr0[], void *target_ptr1[], uint8_t *addr0[], uint8_t *addr1[])
 A utility API that sets the pointer to the correct location based on the minimum of the valid rectangle.
 
void tivxReserveC66xL2MEM (void)
 Reserve L2MEM within C66x for usage with BAM framework.
 
vx_status tivxKernelsTargetUtilsAssignTargetNameDsp (char *target_name)
 Function to assign platform-specific DSP target name. More...
 
vx_status tivxKernelsTargetUtilsAssignTargetNameMcu (char *target_name)
 Function to assign platform-specific MCU target name. More...
 

Function Documentation

◆ tivxCheckNullParams()

static vx_status tivxCheckNullParams ( tivx_obj_desc_t obj_desc[],
uint16_t  num_params,
uint16_t  max_params 
)
inlinestatic

Check number of parameters and NULL pointers.

First checks that the num_params is equal to the max_params defined by the OpenVX kernel.

Also checks that each of the obj_desc pointers are not NULL.

This function can be called if ALL of the parameters are mandatory. If there are any optional parameters, then custom code should be used to check the parameters.

Definition at line 247 of file tivx_kernels_target_utils.h.

◆ tivxInitBufParams()

void tivxInitBufParams ( const tivx_obj_desc_image_t obj_desc,
VXLIB_bufParams2D_t  buf_params[] 
)

A utility API to initialize VXLIB buf parameters based on the provided object descriptor.

This API takes initializes the VXLIB buf descriptor based on information found in the object descriptor. It uses valid rectangle to initialize dimensions of the frame, and buffer properties of the object descriptor to initialize stride and data type. The buf_params array must contain the same number of elements as planes of the obj_desc.

While initializing frame dimensions, it also takes into account the padding requirement of the calling kernel. If the kernel requires few pixels/lines on all sides of the kernels, this api increases the valid rectangle and then initializes vxlib buf descriptor.

Parameters
[in]obj_descObject Descripter
[out]buf_paramsBuffer Parameters

◆ tivxKernelsTargetUtilsAssignTargetNameDsp()

vx_status tivxKernelsTargetUtilsAssignTargetNameDsp ( char *  target_name)

Function to assign platform-specific DSP target name.

This API assigns the target name to the kernel based on the SoC

Cores which are assigned per SoC are below: J721E: TIVX_TARGET_DSP1 and TIVX_TARGET_DSP2 J721S2: TIVX_TARGET_DSP1 J784S4: TIVX_TARGET_DSP1 J722S: TIVX_TARGET_DSP1 and TIVX_TARGET_DSP2 AM62A: TIVX_TARGET_DSP1

◆ tivxKernelsTargetUtilsAssignTargetNameMcu()

vx_status tivxKernelsTargetUtilsAssignTargetNameMcu ( char *  target_name)

Function to assign platform-specific MCU target name.

Cores which are assigned per SoC are below: J721E: TIVX_TARGET_MCU2_0 and TIVX_TARGET_MCU2_1 J721S2: TIVX_TARGET_MCU2_0 and TIVX_TARGET_MCU2_1 J784S4: TIVX_TARGET_MCU2_0 and TIVX_TARGET_MCU2_1 J722S: TIVX_TARGET_MCU2_0 AM62A: TIVX_TARGET_MCU1_0