TIOVX User Guide
TI VPAC MSC (Multi-scaler) Kernel APIs

Detailed Description

VPAC Multi-scaler Kernels.

Data Structures

struct  tivx_vpac_msc_coefficients_t
 The coefficients input data structure used by the TIVX_KERNEL_VPAC_MSC kernel. More...
 
struct  tivx_vpac_msc_single_phase_params_t
 The configuration data structure used by the TIVX_KERNEL_VPAC_MSC kernel. More...
 
struct  tivx_vpac_msc_multi_phase_params_t
 The multi_phase data structure in the configuration data structure used by the TIVX_KERNEL_VPAC_MSC kernel. More...
 
struct  tivx_vpac_msc_crop_params_t
 The crop config data structure used by the TIVX_KERNEL_VPAC_MSC kernel. More...
 
struct  tivx_vpac_msc_output_params_t
 The output config data structure used by the TIVX_KERNEL_VPAC_MSC kernel. More...
 
struct  tivx_vpac_msc_input_params_t
 The input config data structure used by the TIVX_KERNEL_VPAC_MSC kernel. More...
 

Defines

#define TIVX_KERNEL_VPAC_MSC_MULTI_SCALE_NAME   "com.ti.hwa.vpac_msc_multi_scale"
 vpac_msc scaler kernel name
 
#define TIVX_KERNEL_VPAC_MSC_PYRAMID_NAME   "com.ti.hwa.vpac_msc_pyramid"
 vpac_msc pyramid kernel name
 
#define TIVX_VPAC_MSC_CMD_SET_COEFF   (0x20000000u)
 Control Command to set MSC Filter Coefficients User data object tivx_vpac_msc_coefficients_t is passed as argument with this control command.
 
#define TIVX_VPAC_MSC_CMD_SET_INPUT_PARAMS   (0x20000001u)
 Control Command to set MSC input parameters. More...
 
#define TIVX_VPAC_MSC_CMD_SET_OUTPUT_PARAMS   (0x20000002u)
 Control Command to set MSC output scaling parameters. More...
 
#define TIVX_VPAC_MSC_CMD_SET_CROP_PARAMS   (0x20000003u)
 Control Command to set MSC output croping parameters. More...
 

Functions

void tivxRegisterHwaTargetVpacMscKernels (void)
 Function to register HWA Kernels on the vpac_msc Target.
 
void tivxUnRegisterHwaTargetVpacMscKernels (void)
 Function to un-register HWA Kernels on the vpac_msc Target.
 
VX_API_ENTRY vx_node VX_API_CALL tivxVpacMscScaleNode (vx_graph graph, vx_image in_img, vx_image out0_img, vx_image out1_img, vx_image out2_img, vx_image out3_img, vx_image out4_img)
 Creates a VPAC_MSC Node with multi-scale outputs. More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxVpacMscPyramidNode (vx_graph graph, vx_image in_img, vx_pyramid out_pyramid)
 Creates a VPAC_MSC Node with multi-scale pyramid output. More...
 
void tivx_vpac_msc_coefficients_params_init (tivx_vpac_msc_coefficients_t *coeff, vx_enum interpolation)
 Function to initialize MSC Coefficients Parameters This initializes Coefficients to default values. This is used for control command: TIVX_VPAC_MSC_CMD_SET_COEFF. More...
 
void tivx_vpac_msc_input_params_init (tivx_vpac_msc_input_params_t *prms)
 Function to initialize MSC input Parameters This is used for control command: TIVX_VPAC_MSC_CMD_SET_INPUT_PARAMS. More...
 
void tivx_vpac_msc_output_params_init (tivx_vpac_msc_output_params_t *prms)
 Function to initialize MSC output Parameters This is used for control command: TIVX_VPAC_MSC_CMD_SET_OUTPUT_PARAMS. More...
 

Macro Definition Documentation

◆ TIVX_VPAC_MSC_CMD_SET_INPUT_PARAMS

#define TIVX_VPAC_MSC_CMD_SET_INPUT_PARAMS   (0x20000001u)

Control Command to set MSC input parameters.

These parameters are common for all scaler outputs. Used to configure/select the number of taps to be used for scaling operation, line increment by 2 to improve HW throughput for 1/2 scaling.

This control command uses pointer to structure tivx_vpac_msc_input_params_t as an input argument.

The index0 of the vx_reference passed to the control command is used to specify user object containing input parameters.

Definition at line 115 of file hwa_vpac_msc.h.

◆ TIVX_VPAC_MSC_CMD_SET_OUTPUT_PARAMS

#define TIVX_VPAC_MSC_CMD_SET_OUTPUT_PARAMS   (0x20000002u)

Control Command to set MSC output scaling parameters.

This command takes an array of vx_references as an argument, where each index contains output parameters for the corresponding scaler. For example, the output parameters at the index0 contains output parameters for the scaler output0 and so on. If the reference is set to null for a scaler, default scaler parameters or previously set/configured parameters are used for that scaler.

Used to configure/select number of phases for the scaling operation, the coefficients and other scaler parameters.

This command takes an array of user objects containing tivx_vpac_msc_output_params_t parameters..

Definition at line 135 of file hwa_vpac_msc.h.

◆ TIVX_VPAC_MSC_CMD_SET_CROP_PARAMS

#define TIVX_VPAC_MSC_CMD_SET_CROP_PARAMS   (0x20000003u)

Control Command to set MSC output croping parameters.

This command takes an array of vx_references as an argument, where each index contains crop parameters for the corresponding scaler. For example, the crop parameters at the index0 contains crop parameters required by output0 and so on. The crop parameters are applied on the corrosponding input image. If the reference is set to null for a scaler, default scaler parameters or previously set/configured parameters are used for that scaler. (Default: no crop)

Used to configure/select number of phases for the scaling operation, the coefficients and other scaler parameters.

This command takes an array of user objects containing tivx_vpac_msc_crop_params_t parameters.

Node: Applies only to tivxVpacMscScaleNode

Definition at line 159 of file hwa_vpac_msc.h.

Function Documentation

◆ tivxVpacMscScaleNode()

VX_API_ENTRY vx_node VX_API_CALL tivxVpacMscScaleNode ( vx_graph  graph,
vx_image  in_img,
vx_image  out0_img,
vx_image  out1_img,
vx_image  out2_img,
vx_image  out3_img,
vx_image  out4_img 
)

Creates a VPAC_MSC Node with multi-scale outputs.

Parameters
[in]graphThe reference to the graph.
[in]in_imgThe input image in VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8 (8bit Luma only), VX_DF_IMAGE_U16 (12bit in 16bit container Luma only), or TIVX_DF_IMAGE_P12 (12bit packed Luma only) format.
[out]out0_imgThe output image in VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8 (8bit Luma or Chroma, based on value of tivx_vpac_msc_input_params_t::yc_mode, when NV12 is input) or (8bit luma only when U8 is input), VX_DF_IMAGE_U16 (12bit in 16bit container Luma only), or TIVX_DF_IMAGE_P12 (12bit packed Luma only) format.
[out]out1_img(optional) The output image in VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8 (8bit Luma or Chroma, based on value of tivx_vpac_msc_input_params_t::yc_mode, when NV12 is input) or (8bit luma only when U8 is input), VX_DF_IMAGE_U16 (12bit in 16bit container Luma only), or TIVX_DF_IMAGE_P12 (12bit packed Luma only) format.
[out]out2_img(optional) The output image in VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8 (8bit Luma or Chroma, based on value of tivx_vpac_msc_input_params_t::yc_mode, when NV12 is input) or (8bit luma only when U8 is input), VX_DF_IMAGE_U16 (12bit in 16bit container Luma only), or TIVX_DF_IMAGE_P12 (12bit packed Luma only) format.
[out]out3_img(optional) The output image in VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8 (8bit Luma or Chroma, based on value of tivx_vpac_msc_input_params_t::yc_mode, when NV12 is input) or (8bit luma only when U8 is input), VX_DF_IMAGE_U16 (12bit in 16bit container Luma only), or TIVX_DF_IMAGE_P12 (12bit packed Luma only) format.
[out]out4_img(optional) The output image in VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8 (8bit Luma or Chroma, based on value of tivx_vpac_msc_input_params_t::yc_mode, when NV12 is input) or (8bit luma only when U8 is input), VX_DF_IMAGE_U16 (12bit in 16bit container Luma only), or TIVX_DF_IMAGE_P12 (12bit packed Luma only) format.
See also
TIVX_KERNEL_VPAC_MSC_NAME
Returns
vx_node.
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivxVpacMscPyramidNode()

VX_API_ENTRY vx_node VX_API_CALL tivxVpacMscPyramidNode ( vx_graph  graph,
vx_image  in_img,
vx_pyramid  out_pyramid 
)

Creates a VPAC_MSC Node with multi-scale pyramid output.

By default, a separable 5-tap gaussian filter is used with following coefficients for half scale pyramid : [ 16, 64, 96, 64, 16 ], and a 32 phase 5-tap gaussian filter is used for non-half scale pyramids. These can be customized using TIVX_VPAC_MSC_CMD_SET_COEFF command.

Parameters
[in]graphThe reference to the graph.
[in]in_imgThe input image in VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8 (8bit Luma only), VX_DF_IMAGE_U16 (12bit in 16bit container Luma only), or TIVX_DF_IMAGE_P12 (12bit packed Luma only) format.
[out]out_pyramidThe output image in VX_DF_IMAGE_NV12, VX_DF_IMAGE_U8 (8bit Luma only), VX_DF_IMAGE_U16 (12bit in 16bit container Luma only), or TIVX_DF_IMAGE_P12 (12bit packed Luma only) format.
See also
TIVX_KERNEL_VPAC_MSC_NAME
Returns
vx_node.
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus

◆ tivx_vpac_msc_coefficients_params_init()

void tivx_vpac_msc_coefficients_params_init ( tivx_vpac_msc_coefficients_t coeff,
vx_enum  interpolation 
)

Function to initialize MSC Coefficients Parameters This initializes Coefficients to default values. This is used for control command: TIVX_VPAC_MSC_CMD_SET_COEFF.

Parameters
coeff[IN] Pointer to MSC coefficient structure
interpolation[IN] Indicates interpolation method to initialize coefficients to ( VX_INTERPOLATION_BILINEAR or VX_INTERPOLATION_NEAREST_NEIGHBOR or TIVX_VPAC_MSC_INTERPOLATION_GAUSSIAN_32_PHASE)

◆ tivx_vpac_msc_input_params_init()

void tivx_vpac_msc_input_params_init ( tivx_vpac_msc_input_params_t prms)

Function to initialize MSC input Parameters This is used for control command: TIVX_VPAC_MSC_CMD_SET_INPUT_PARAMS.

Parameters
prms[IN] Pointer to MSC input parameters

◆ tivx_vpac_msc_output_params_init()

void tivx_vpac_msc_output_params_init ( tivx_vpac_msc_output_params_t prms)

Function to initialize MSC output Parameters This is used for control command: TIVX_VPAC_MSC_CMD_SET_OUTPUT_PARAMS.

Parameters
prms[IN] Pointer to MSC output parameters