TIOVX User Guide
|
#include <TI/tivx.h>
#include <VX/vx.h>
#include <TI/tivx_target_kernel.h>
#include <vx_tutorial_kernels.h>
#include <tivx_kernels_common_utils.h>
#include <tivx_kernels_target_utils.h>
Go to the source code of this file.
Macros | |
#define | PHASE_RGB_IN0_IMG_IDX (0u) |
Index of input image in parameter list. | |
#define | PHASE_RGB_OUT0_IMG_IDX (1u) |
Index of output image in parameter list. | |
#define | PHASE_RGB_MAX_PARAMS (2u) |
Total number of parameters for this function. | |
Functions | |
vx_status VX_CALLBACK | vxTutotrialPhaseRgb (tivx_target_kernel_instance kernel, tivx_obj_desc_t *obj_desc[], uint16_t num_params, void *priv_arg) |
Target kernel run function. More... | |
vx_status VX_CALLBACK | vxTutotrialPhaseRgbCreate (tivx_target_kernel_instance kernel, tivx_obj_desc_t *param_obj_desc[], uint16_t num_params, void *priv_arg) |
Target kernel create function. More... | |
vx_status VX_CALLBACK | vxTutotrialPhaseRgbDelete (tivx_target_kernel_instance kernel, tivx_obj_desc_t *param_obj_desc[], uint16_t num_params, void *priv_arg) |
Target kernel delete function. More... | |
vx_status VX_CALLBACK | vxTutotrialPhaseRgbControl (tivx_target_kernel_instance kernel, uint32_t replicated_node_idx, tivx_obj_desc_t *param_obj_desc[], uint16_t num_params, void *priv_arg) |
Target kernel control function. More... | |
void | vxTutorialAddTargetKernelPhaseRgb (void) |
Add target kernel to TIOVX framework. More... | |
void | vxTutorialRemoveTargetKernelPhaseRgb (void) |
Remove target kernel from TIOVX framework. More... | |
Variables | |
static tivx_target_kernel | phase_rgb_target_kernel = NULL |
Target kernel handle [static global]. | |
Target Kernel implementation for Phase to RGB conversion function
This file shows a sample implementation of a target kernel function.
To implement a target kernel the below top level interface functions are implemented
When registering a target kernel, the following callback function are implemented and registered with the TIOVX framework
When working with target kernel
When registering a target kernel a unique name MUST be used to register the kernel on target side and HOST side.
Follow the comments for the different functions in the file to understand how a user/target kernel is implemented.
Definition in file phase_rgb_target_kernel.c.
vx_status VX_CALLBACK vxTutotrialPhaseRgb | ( | tivx_target_kernel_instance | kernel, |
tivx_obj_desc_t * | obj_desc[], | ||
uint16_t | num_params, | ||
void * | priv_arg | ||
) |
Target kernel run function.
kernel | [in] target kernel handle |
obj_desc | [in] Parameter object descriptors |
num_params | [in] Number of parameter object descriptors |
priv_arg | [in] kernel instance priv argument |
Definition at line 119 of file phase_rgb_target_kernel.c.
vx_status VX_CALLBACK vxTutotrialPhaseRgbCreate | ( | tivx_target_kernel_instance | kernel, |
tivx_obj_desc_t * | param_obj_desc[], | ||
uint16_t | num_params, | ||
void * | priv_arg | ||
) |
Target kernel create function.
kernel | [in] target kernel handle |
param_obj_desc | [in] Parameter object descriptors |
num_params | [in] Number of parameter object descriptors |
priv_arg | [in] kernel instance priv argument |
Definition at line 228 of file phase_rgb_target_kernel.c.
vx_status VX_CALLBACK vxTutotrialPhaseRgbDelete | ( | tivx_target_kernel_instance | kernel, |
tivx_obj_desc_t * | param_obj_desc[], | ||
uint16_t | num_params, | ||
void * | priv_arg | ||
) |
Target kernel delete function.
kernel | [in] target kernel handle |
param_obj_desc | [in] Parameter object descriptors |
num_params | [in] Number of parameter object descriptors |
priv_arg | [in] kernel instance priv argument |
Definition at line 243 of file phase_rgb_target_kernel.c.
vx_status VX_CALLBACK vxTutotrialPhaseRgbControl | ( | tivx_target_kernel_instance | kernel, |
uint32_t | replicated_node_idx, | ||
tivx_obj_desc_t * | param_obj_desc[], | ||
uint16_t | num_params, | ||
void * | priv_arg | ||
) |
Target kernel control function.
kernel | [in] target kernel handle |
replicated_node_idx | [in] If node was replicated, index of replicant to send command to |
param_obj_desc | [in] Parameter object descriptors |
num_params | [in] Number of parameter object descriptors |
priv_arg | [in] kernel instance priv argument |
Definition at line 259 of file phase_rgb_target_kernel.c.
void vxTutorialAddTargetKernelPhaseRgb | ( | void | ) |
Add target kernel to TIOVX framework.
- Register target kernel to TIOVX framework
"TIVX_TUTORIAL_KERNEL_PHASE_RGB_NAME" is the name of the target kernel. See also vx_tutorial_kernels.h
This MUST match the name specified when registering the same kernel on the HOST side.
The registered target kernel handle is stored in a global variable. This is used during vxTutorialRemoveTargetKernelPhaseRgb()
Definition at line 271 of file phase_rgb_target_kernel.c.
void vxTutorialRemoveTargetKernelPhaseRgb | ( | void | ) |
Remove target kernel from TIOVX framework.
- UnRegister target kernel from TIOVX framework
The target kernel handle used is the one returned during tivxAddTargetKernel()
Definition at line 308 of file phase_rgb_target_kernel.c.