hi_vpss_crop_info
Description
Defines the cropping information.
Prototype
typedef struct {
hi_bool enable;
hi_coord crop_mode;
hi_rect crop_rect;
}hi_vpss_crop_info;
Members
Member |
Description |
|---|---|
enable |
Whether to enable cropping. The options are as follows:
|
crop_mode |
The start point coordinate mode of the cropped region. |
crop_rect |
Crops a rectangle area.
|
- In relative coordinate mode:
- The formula for calculating the horizontal coordinate is as follows: X = crop_rect.x x actual picture width/1000. After the calculation is complete, rounding and alignment are performed. This formula also applies to vertical coordinate calculation.
- The region width is calculated as follows: Width = crop_rect.width x actual picture width/1000. After the calculation is complete, rounding and alignment are performed. This formula also applies to the region height.
- If the width and height of the cropped region are less than the minimum resolution supported by the VPSS after calculation, the width and height of the cropped output region are adjusted to the width and height of the input picture, and a code indicating success is returned.
- In absolute coordinate mode:
- If the cropped width and height are less than the minimum input resolution supported by the VPSS, the cropping setting does not take effect and an error code indicating failure is returned.
- If the cropped width and height are greater than the maximum input resolution supported by the VPSS, the cropping setting does not take effect and an error code indicating failure is returned.
- If the sum of the coordinates of the cropped region and the cropped width and height exceeds the maximum input resolution supported by the VPSS, the cropping setting does not take effect and an error code indicating failure is returned.
Parent topic: VPSS