hi_crop_resize_handle_param
Function
Defines parameters for the VPC crop-and-resize handle.
Definition
typedef struct {
hi_vpc_pic_info *source_pic;
hi_u32 pic_num;
hi_vpc_crop_resize_border_region *crop_resize_info;
hi_u32 *count;
hi_bool border_en;
hi_csc_matrix csc_matrix;
hi_opt_attr *opt_attr;
hi_u32 attr_size;
hi_u32 reserved[8];
} hi_crop_resize_handle_param;
For details about basic data types hi_u32 and hi_bool, see Basic Data Types.
Members
Member |
Description |
|---|---|
source_pic |
Pointer array of the source image information. For details, see hi_vpc_pic_info. The picture_address field must be set to NULL, and the other parameters must be set as required. |
pic_num |
Number of source images. Its length must be the same as that of the source_pic array and that of the count array. |
crop_resize_info |
Information structure for image cropping, resizing, pasting, and padding. You need to configure the cropping, resizing, and padding information, as well as the memory address of the target image. VPC stores the result data after image cropping, resizing, and padding in the destination memory address. The destination address is assigned internally by the system and must be set to NULL here. For details, see hi_vpc_crop_resize_border_region. Currently, only the HI_BORDER_CONSTANT and HI_BORDER_REPLICATE types are supported, and padding to 5760 × 8192 is allowed. The dest_pic_info.picture_address parameter must be set to NULL, and the other parameters must be set as required. |
count |
Array for the number of cropped/resized/pasted ROIs for each source image. The first element in the array indicates the number of cropped/resized/pasted ROIs for the first source image, the second element indicates the number for the second source image, and so on. The sum of all elements in the count array must be equal to the length of the crop_resize_paste_info array. The sum of element values in the count array must be in the range of [1, 256]. |
border_en |
Whether padding is enabled. Value range:
|
csc_matrix |
Data standard of the CSC matrix. Only HI_CSC_MATRIX_BT601_WIDE is supported. For details, see hi_csc_matrix. |
opt_attr |
Array of optional attributes. For details, see hi_opt_attr. |
attr_size |
Length of the opt_attr array. |
reserved |
Reserved. To ensure compatibility in later versions, use the memset structure for resetting and initialization. Do not explicitly access the reserved field in the code. |