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

Detailed Description

VPAC Multi-scaler Kernels.

Modules

 Enumerations
 Enumerations for VPAC MSC configuration parameters and error events.
 

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_KERNEL_VPAC_MSC_MULTI_SCALE2_NAME   "com.ti.hwa.vpac_msc_multi_scale2"
 vpac_msc scaler2 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...
 
#define TIVX_VPAC_MSC_CMD_GET_ERR_STATUS   (0x20000004u)
 Control Command to get the combined error status Returns the combined error status of the last processed frame, incorporating error interrupts and watchdog timer error interrupt. A reference to vx_scalar is passed as an argument with this control command. The node returns a bit-mask of the error status in the U32 variable of vx_scalar. More...
 
#define TIVX_VPAC_MSC_CMD_GET_PSA_STATUS   (0x20000005u)
 Control Command to retrieve the PSA status.
 

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_img0, 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 (at most 5 outputs). More...
 
VX_API_ENTRY vx_node VX_API_CALL tivxVpacMscScaleNode2 (vx_graph graph, vx_image in_img0, vx_image out0_img, vx_image out1_img, vx_image out2_img, vx_image out3_img, vx_image out4_img, vx_image in_img1, vx_image out5_img, vx_image out6_img, vx_image out7_img, vx_image out8_img, vx_image out9_img)
 Creates a VPAC_MSC Node with multi-scale outputs (at most 10 outputs). This node takes at most 2 single plane inputs and can simultaneously scale them across the outputs This node should adhere to the following rules: When in_img0 is NV12,. 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 120 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 140 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 164 of file hwa_vpac_msc.h.

◆ TIVX_VPAC_MSC_CMD_GET_ERR_STATUS

#define TIVX_VPAC_MSC_CMD_GET_ERR_STATUS   (0x20000004u)

Control Command to get the combined error status Returns the combined error status of the last processed frame, incorporating error interrupts and watchdog timer error interrupt. A reference to vx_scalar is passed as an argument with this control command. The node returns a bit-mask of the error status in the U32 variable of vx_scalar.

  • Error interrupt status bits (0–29) are directly taken from the msc_obj->err_stat variable.
  • If watchdog timer error is detected in msc0 (bit 24 in wd_err_status), this is flagged by setting bit 30 in the returned error status.
  • If watchdog timer error is detected in msc1 (bit 25 in wd_err_status), this is flagged by setting bit 31 in the returned error status.

Definition at line 182 of file hwa_vpac_msc.h.

Function Documentation

◆ tivxVpacMscScaleNode()

VX_API_ENTRY vx_node VX_API_CALL tivxVpacMscScaleNode ( vx_graph  graph,
vx_image  in_img0,
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 (at most 5 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. VX_DF_IMAGE_UYVY (VX_DF_IMAGE_UYVY format support only for VPAC3 and VPAC3L)
[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. VX_DF_IMAGE_UYVY (VX_DF_IMAGE_UYVY format support only for VPAC3 and VPAC3L) VX_DF_IMAGE_YUYV (VX_DF_IMAGE_YUYV format support only for VPAC3 and VPAC3L)
[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. VX_DF_IMAGE_UYVY (VX_DF_IMAGE_UYVY format support only for VPAC3 and VPAC3L) VX_DF_IMAGE_YUYV (VX_DF_IMAGE_YUYV format support only for VPAC3 and VPAC3L)
[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. VX_DF_IMAGE_UYVY (VX_DF_IMAGE_UYVY format support only for VPAC3 and VPAC3L) VX_DF_IMAGE_YUYV (VX_DF_IMAGE_YUYV format support only for VPAC3 and VPAC3L)
[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. VX_DF_IMAGE_UYVY (VX_DF_IMAGE_UYVY format support only for VPAC3 and VPAC3L) VX_DF_IMAGE_YUYV (VX_DF_IMAGE_YUYV format support only for VPAC3 and VPAC3L)
[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. VX_DF_IMAGE_UYVY (VX_DF_IMAGE_UYVY format support only for VPAC3 and VPAC3L) VX_DF_IMAGE_YUYV (VX_DF_IMAGE_YUYV format support only for VPAC3 and VPAC3L)
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

◆ tivxVpacMscScaleNode2()

VX_API_ENTRY vx_node VX_API_CALL tivxVpacMscScaleNode2 ( vx_graph  graph,
vx_image  in_img0,
vx_image  out0_img,
vx_image  out1_img,
vx_image  out2_img,
vx_image  out3_img,
vx_image  out4_img,
vx_image  in_img1,
vx_image  out5_img,
vx_image  out6_img,
vx_image  out7_img,
vx_image  out8_img,
vx_image  out9_img 
)

Creates a VPAC_MSC Node with multi-scale outputs (at most 10 outputs). This node takes at most 2 single plane inputs and can simultaneously scale them across the outputs This node should adhere to the following rules: When in_img0 is NV12,.

  • in_img1 should be NULL.
  • If the outputs are also NV12, a maximum of five NV12 outputs can be generated.
  • is_enable_simul_processing flag can be set to either 0 or 1 to process the luma and chroma planes sequentially or simultaneously. When in_img1 is NULL, then all of the outputs map as scales of in_img0 When in_img1 is not NULL,
  • out0_img to out4_img map as scales of in_img0, and out5_img to out9_img map as scales of in_img1
  • the number of outputs should be even
  • if any output in the order out0, out1, out2, out3, or out4 is not null, the corresponding paired output out5, out6, out7, out8, or out9, respectively, should also not be null, and vice versa.
  • out0 to out4 and out5 to out9 must not have null gaps between non-null values. must both be non-null or both null
  • out0_img to out4_img should have the same format as in_img0, and
  • out5_img to out9_img should have the same format as in_img1.
  • if in_img1_yc_mode is 0, the heights of in_img0 and in_img1 must be the same
  • if in_img1_yc_mode is 1, the height of in_img1 should be half the height of in_img0
  • regardless of the value of in_img1_yc_mode (0 or 1), in_img0 and in_img1 must have the same width.
  • is_enable_simul_processing flag should be set to 1 to process the both planes simultaneously, each with a different bit depth. All output images must be continuous. For example, if there are four outputs, they should be assigned sequentially from out0 to out3 without any gaps.
    Parameters
    [in]graphThe reference to the graph.
    [in]in_img0The 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) format. 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) format.
    [in]in_img1(optional) The input image in VX_DF_IMAGE_U8 (8bit Luma or chorma), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) format.
    [out]out5_img(optional) The output image in 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) format.
    [out]out6_img(optional) The output image in 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) format.
    [out]out7_img(optional) The output image in 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) format.
    [out]out8_img(optional) The output image in 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) format.
    [out]out9_img(optional) The output image in 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) or (8bit luma or chroma, when input is non NV12), VX_DF_IMAGE_U16 (12bit in 16bit container Luma or chroma), or TIVX_DF_IMAGE_P12 (12bit packed Luma or chroma) 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. VX_DF_IMAGE_UYVY (VX_DF_IMAGE_UYVY format support only for VPAC3 and VPAC3L)
[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. VX_DF_IMAGE_UYVY (VX_DF_IMAGE_UYVY format support only for VPAC3 and VPAC3L) VX_DF_IMAGE_YUYV (VX_DF_IMAGE_YUYV format support only for VPAC3 and VPAC3L)
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