This section contains module APIs for the TIOVX Scaler node tivxVpacMscScaleNode.
|
void | scale_set_coeff (tivx_vpac_msc_coefficients_t *coeff, uint32_t interpolation) |
| Scaler module helper function for setting MSC coefficients. More...
|
|
vx_status | app_init_scaler (vx_context context, ScalerObj *scalerObj, char *objName, vx_int32 num_ch, vx_int32 num_outputs) |
| Scaler module init helper function. More...
|
|
void | app_deinit_scaler (ScalerObj *obj) |
| Scaler module deinit helper function. More...
|
|
void | app_delete_scaler (ScalerObj *obj) |
| Scaler module delete helper function. More...
|
|
vx_status | app_create_graph_scaler (vx_context context, vx_graph graph, ScalerObj *scalerObj, vx_object_array input_img_arr) |
| Scaler module create helper function. More...
|
|
vx_status | app_create_graph_scaler_write_output (vx_graph graph, ScalerObj *scalerObj, vx_int32 output_idx) |
| Scaler module write output helper function. More...
|
|
vx_status | app_send_cmd_scaler_write_node (ScalerObj *scalerObj, vx_uint32 start_frame, vx_uint32 num_frames, vx_uint32 num_skip) |
| Scaler module write output helper function. More...
|
|
vx_status | readScalerInput (char *file_name, vx_object_array img_arr, vx_int32 read_mode, vx_int32 ch_num) |
| Helper function to read image from file. More...
|
|
vx_status | writeScalerOutput (char *file_name, vx_object_array img_arr) |
| Helper function to write image from file. More...
|
|
◆ APP_MODULES_MAX_SCALER_OUTPUTS
#define APP_MODULES_MAX_SCALER_OUTPUTS (5) |
Maximum amount of values allowed from scaler node.
◆ APP_MODULES_READ_FILE
#define APP_MODULES_READ_FILE (0x333) |
Read mode for reading entire file.
◆ APP_MODULES_READ_CHANNEL
#define APP_MODULES_READ_CHANNEL (0x444) |
Read mode for reading selected channel.
◆ scale_set_coeff()
void scale_set_coeff |
( |
tivx_vpac_msc_coefficients_t * |
coeff, |
|
|
uint32_t |
interpolation |
|
) |
| |
Scaler module helper function for setting MSC coefficients.
This Scaler helper function sets the MSC coefficients based on the type of interpolation
- Parameters
-
[out] | coeff | MSC coefficients set based on interpolation type |
[in] | interpolation | Scaler interpolation type; valid values are VX_INTERPOLATION_BILINEAR and VX_INTERPOLATION_NEAREST_NEIGHBOR |
◆ app_init_scaler()
vx_status app_init_scaler |
( |
vx_context |
context, |
|
|
ScalerObj * |
scalerObj, |
|
|
char * |
objName, |
|
|
vx_int32 |
num_ch, |
|
|
vx_int32 |
num_outputs |
|
) |
| |
Scaler module init helper function.
This Scaler init helper function will create all the data objects required to create the Scaler node
- Parameters
-
[in] | context | OpenVX context which must be created using vxCreateContext |
[out] | scalerObj | Scaler Module object which gets populated with Scaler node data objects |
[in] | objName | String of the name of this object |
[in] | num_ch | Number of Scaler channels |
[in] | num_outputs | Number of Scaler outputs |
◆ app_deinit_scaler()
Scaler module deinit helper function.
This Scaler deinit helper function will release all the data objects created during the app_init_scaler call
- Parameters
-
[in,out] | obj | Scaler Module object which contains scaler node data objects which are released in this function |
◆ app_delete_scaler()
Scaler module delete helper function.
This scaler delete helper function will delete the scaler node and write node that is created during the app_create_graph_scaler call
- Parameters
-
[in,out] | obj | Scaler Module object which contains scaler node objects which are released in this function |
◆ app_create_graph_scaler()
vx_status app_create_graph_scaler |
( |
vx_context |
context, |
|
|
vx_graph |
graph, |
|
|
ScalerObj * |
scalerObj, |
|
|
vx_object_array |
input_img_arr |
|
) |
| |
Scaler module create helper function.
This scaler create helper function will create the node using all the data objects created during the app_init_scaler call. Internally calls app_create_graph_scaler_write_output if en_out_scaler_write is set
- Parameters
-
[in] | context | OpenVX context which must be created using vxCreateContext |
[in] | graph | OpenVX graph that has been created using vxCreateGraph and where the scaler node is created |
[in,out] | scalerObj | Scaler Module object which contains scaler node and write node which are created in this function |
[in] | input_img_arr | Input object array to Scaler node. Must be created separately using vxCreateObjectArray |
◆ app_create_graph_scaler_write_output()
vx_status app_create_graph_scaler_write_output |
( |
vx_graph |
graph, |
|
|
ScalerObj * |
scalerObj, |
|
|
vx_int32 |
output_idx |
|
) |
| |
Scaler module write output helper function.
This scaler create helper function will create the node for writing the scaler output
- Parameters
-
[in] | graph | OpenVX graph that has been created using vxCreateGraph and where the scaler node is created |
[in,out] | scalerObj | Scaler Module object which contains the write node used in this function |
[in] | output_idx | Output index of scaler images to write |
◆ app_send_cmd_scaler_write_node()
vx_status app_send_cmd_scaler_write_node |
( |
ScalerObj * |
scalerObj, |
|
|
vx_uint32 |
start_frame, |
|
|
vx_uint32 |
num_frames, |
|
|
vx_uint32 |
num_skip |
|
) |
| |
Scaler module write output helper function.
This scaler create helper function will create the node for writing the scaler output
- Parameters
-
[in] | scalerObj | Scaler Module object which contains the write node used in this function |
[in] | start_frame | Starting frame to write |
[in] | num_frames | Total number of frames to write |
[in] | num_skip | Number of capture frames to skip writing |
◆ readScalerInput()
vx_status readScalerInput |
( |
char * |
file_name, |
|
|
vx_object_array |
img_arr, |
|
|
vx_int32 |
read_mode, |
|
|
vx_int32 |
ch_num |
|
) |
| |
Helper function to read image from file.
This scaler create helper function will read in the image from file into the provided image array
- Parameters
-
[in] | file_name | Full path to file to read |
[out] | img_arr | Object array containing images which file is read in to |
[in] | read_mode | Read mode; options are APP_MODULES_READ_FILE and APP_MODULES_READ_CHANNEL |
[in] | ch_num | Channel number of array to write |
◆ writeScalerOutput()
vx_status writeScalerOutput |
( |
char * |
file_name, |
|
|
vx_object_array |
img_arr |
|
) |
| |
Helper function to write image from file.
This scaler create helper function will write the image from OpenVX object array to the provided file path
- Parameters
-
[in] | file_name | Full path to file to write |
[in] | img_arr | Object array containing images which file written from |