TIOVX User Guide
|
#include <vx_tutorial_kernels.h>
Go to the source code of this file.
Functions | |
vx_status | phase_rgb_user_kernel_add (vx_context context, vx_bool add_as_target_kernel) |
Add user/target kernel to OpenVX context. More... | |
vx_status | phase_rgb_user_kernel_remove (vx_context context) |
Remove user/target kernel from context. More... | |
vx_node | phase_rgb_user_kernel_node (vx_graph graph, vx_image in, vx_image out) |
User/target kernel node create function. More... | |
Interface file for user kernel functions
These interface functions are called by OpenVX application.
Definition in file phase_rgb_user_kernel.h.
vx_status phase_rgb_user_kernel_add | ( | vx_context | context, |
vx_bool | add_as_target_kernel | ||
) |
Add user/target kernel to OpenVX context.
context | [in] OpenVX context into with the user kernel is added |
add_as_target_kernel | [in] 'vx_false_e', add this kernel as user kernel 'vx_true_e', add this kernel as target kernel |
- Depending on 'add_as_target_kernel' invoke user kernel or target kernel specific registration logic
phase_rgb_user_kernel_id is set as part of this function invocation.
- Checking is kernel was added successfully to OpenVX context
- Now define parameters for the kernel
When specifying the parameters, the below attributes of each parameter are specified, - parameter index in the function parameter list - the parameter direction: VX_INPUT or VX_OUTPUT - parameter data object type - paramater state: VX_PARAMETER_STATE_REQUIRED or VX_PARAMETER_STATE_OPTIONAL
- After all parameters are defined, now the kernel is finalized, i.e it is ready for use.
- Set kernel handle to the global user kernel handle
This global handle is used later to release the kernel when done with it
Definition at line 144 of file phase_rgb_user_kernel.c.
vx_status phase_rgb_user_kernel_remove | ( | vx_context | context | ) |
Remove user/target kernel from context.
context | [in] OpenVX context from which the kernel will be removed |
- Remove user kernel from context and set the global 'phase_rgb_user_kernel' to NULL
Definition at line 375 of file phase_rgb_user_kernel.c.
User/target kernel node create function.
Given a graph reference, this function creates a OpenVX node and inserts it into the graph. The list of parameter references is also provided as input. Exact data type are used instead of base class references to allow some level of compile time type checking. In this example, there is one input image and one output image that are passed as parameters.
graph | [in] OpenVX graph |
in | [in] Input image reference |
out | [in] Output image reference |
- Put parameters into a array of references
- Use TIOVX API to make a node using the graph, kernel ID, and parameter reference array as input
Definition at line 707 of file phase_rgb_user_kernel.c.