9.4. Data Types¶
9.4.1. RGN_TYPE_E¶
【Description】
Define region type
【Syntax】
typedef enum _RGN_TYPE_E {
OVERLAY_RGN = 0,
COVER_RGN,
COVEREX_RGN,
OVERLAYEX_RGN,
MOSAIC_RGN,
RGN_BUTT
} RGN_TYPE_E;
【Member】
Member |
Description |
---|---|
OVERLAY_RGN |
Video overlay region. |
COVER_RGN |
The Video Masking Region |
COVEREX_RGN |
The extended Video Overlay Region |
OVERLAYEX_RGN |
The extended Video Masking Region |
MOSAIC_RGN |
Mosaic video region |
【Note】
None.
【Related Data Type and Interface】
None.
9.4.2. RGN_AREA_TYPE_E¶
【Description】
Define the region type COVER and COVEREX.
【Syntax】
typedef enum _RGN_AREA_TYPE_E {
AREA_RECT = 0,
AREA_QUAD_RANGLE,
AREA_BUTT
} RGN_AREA_TYPE_E;
【Member】
Member |
Description |
---|---|
AREA_RECT |
Rectangle area |
AREA_QUAD_RANGLE |
Any quadrilateral area, not supported yet. |
【Note】
None.
【Related Data Type and Interface】
None.
9.4.3. OSD_COMPRESS_MODE_E¶
【Description】
Define OSD compression mode type
【Syntax】
typedef enum _OSD_COMPRESS_MODE_E {
OSD_COMPRESS_MODE_NONE = 0,
OSD_COMPRESS_MODE_SW,
OSD_COMPRESS_MODE_HW,
OSD_COMPRESS_MODE_BUTT
} OSD_COMPRESS_MODE_E;
【Member】
Member |
Description |
---|---|
OSD_COMPRESS_MODE_NONE |
Compression mode is not used. |
OSD_COMPRESS_MODE_SW |
Use software compression mode. |
OSD_COMPRESS_MODE_HW |
Use hardware compression mode. |
【Note】
Only CV181x/CV180x support OSD compression
【Related Data Type and Interface】
None.
9.4.4. OSD_COMPRESS_INFO_S¶
【Description】
Define OSD compression mode attributes.
【Syntax】
typedef struct _OSD_COMPRESS_INFO_S {
OSD_COMPRESS_MODE_E enOSDCompressMode;
CVI_U32 u32EstCompressedSize;
CVI_U32 u32CompressedSize;
} OSD_COMPRESS_INFO_S;
【Member】
Member |
Description |
---|---|
enOSDCompressMode |
the OSD compression mode type. |
u32EstCompressedSize |
Estimate the memory size that needs to be allocated in software compression mode. |
u32CompressedSize |
The memory size needs to be allocated in hardware compression mode. |
【Note】
Only CV181x/CV180x support OSD compression
【Related Data Type and Interface】
None.
9.4.5. COVER_CHN_ATTR_S¶
【Description】
Define the channel attribute of COVER region.
【Syntax】
typedef struct _COVER_CHN_ATTR_S {
RGN_AREA_TYPE_E enCoverType;
union {
RECT_S stRect;
RGN_QUADRANGLE_S stQuadRangle;
};
CVI_U32 u32Color;
CVI_U32 u32Layer;
RGN_COORDINATE_E enCoordinate;
} COVER_CHN_ATTR_S;
【Member】
Member |
Description |
---|---|
enCoverType |
COVER region type |
stRect |
Region location and its width and height. The position can be negative, and the part of the rectangle outside the scope of the channel will not be visible. The width and height cannot exceed the size of the channel. |
stQuadRangle |
Any quadrilateral area, not supported |
u32Color |
COVER region color. The format is 24bit RGB888. |
u32Layer |
Region hierarchy. Not supported at present |
enCoordinate |
Region coordinate type. |
【Note】
None.
【Related Data Type and Interface】
None.
9.4.6. COVEREX_CHN_ATTR_S¶
【Description】
Define the channel attribute of the COVEREX region.
【Syntax】
typedef struct _COVEREX_CHN_ATTR_S {
RGN_AREA_TYPE_E enCoverType;
union {
RECT_S stRect;
RGN_QUADRANGLE_S stQuadRangle;
};
CVI_U32 u32Color;
CVI_U32 u32Layer;
} COVEREX_CHN_ATTR_S;
【Member】
Member |
Description |
---|---|
enCoverType |
COVEREX region type |
stRect |
Region location and its width and height. The position can be negative, and the part of the rectangle outside the scope of the channel will not be visible. The width and height cannot exceed the size of the channel. |
stQuadRangle |
Any quadrilateral area, not supported |
u32Color |
COVER region color. The format is 24bit RGB888. |
u32Layer |
Region hierarchy. Not supported at present |
【Note】
None.
【Related Data Type and Interface】
None.
9.4.7. OVERLAY_ATTR_S¶
【Description】
Define the attribute of the Overlay region.
【Syntax】
typedef struct _OVERLAY_ATTR_S {
PIXEL_FORMAT_E enPixelFormat;
CVI_U32 u32BgColor;
SIZE_S stSize;
CVI_U32 u32CanvasNum;
OSD_COMPRESS_INFO_S stCompressInfo;
} OVERLAY_ATTR_S;
【Member】
Member |
Description |
---|---|
enPixelFormat |
Pixel format. PIXEL_FORMAT_ARGB_1555, PIXEL_FORMAT_ARGB_4444, PIXEL_FORMAT_ARGB_8888。 |
u32BgColor |
Region background color. Defined according to enPixelFormat. |
stSize |
Region width and height. |
u32CanvasNum |
Amount of region memory. |
stCompressInfo |
OSD compression mode information. |
【Note】
The stSize parameter will affect the memory allocation size of the region.
It is recommended not to be larger than the width and height of the final linked channel to avoid memory waste.
The value of u32CanvasNum should be determined based on the usage scenario:
If using CVI_RGN_SetBitMap, set it to 1.
If using CVI_RGN_GetCanvasInfo and want to avoid transient during the canvas update process using double buffer, it is recommended to set it to 2.
【Related Data Type and Interface】
None.
9.4.8. OVERLAY_CHN_ATTR_S¶
【Description】
Define the channel attribute of the video overlay area.
【Syntax】
typedef struct _OVERLAY_CHN_ATTR_S {
POINT_S stPoint;
CVI_U32 u32Layer;
OVERLAY_INVERT_COLOR_S stInvertColor;
} OVERLAY_CHN_ATTR_S;
【Member】
Member |
Description |
---|---|
stPoint |
Region location and its width and height. The position can be negative, and the part of the rectangle outside the scope of the channel will not be visible. The width and height cannot exceed the size of the channel. |
u32Layer |
Regional level. Not supported at present |
stInvertColor |
Color Inversion Structure |
【Note】
None.
【Related Data Type and Interface】
None.
9.4.9. OVERLAYEX_ATTR_S¶
【Description】
Define the attribute of the entended Overlay region.
【Syntax】
typedef struct _OVERLAYEX_ATTR_S {
PIXEL_FORMAT_E enPixelFormat;
CVI_U32 u32BgColor;
SIZE_S stSize;
CVI_U32 u32CanvasNum;
OSD_COMPRESS_INFO_S stCompressInfo;
} OVERLAYEX_ATTR_S;
【Member】
Member |
Description |
---|---|
enPixelFormat |
Pixel format. PIXEL_FORMAT_ARGB_1555, PIXEL_FORMAT_ARGB_4444, PIXEL_FORMAT_ARGB_8888。 |
u32BgColor |
Region background color. Defined according to enPixelFormat. |
stSize |
Region width and height. |
u32CanvasNum |
Amount of region memory. |
stCompressInfo OSDcompression modeinformation.stCompressInfo |
OSD compression mode information. |
【Note】
The stSize parameter will affect the memory allocation size of the region.
It is recommended not to be larger than the width and height of the final linked channel to avoid memory waste.
The value of u32CanvasNum should be determined based on the usage scenario:
If using CVI_RGN_SetBitMap, set it to 1.
If using CVI_RGN_GetCanvasInfo and want to avoid transient during the canvas update process using double buffer, it is recommended to set it to 2.
【Related Data Type and Interface】
None.
9.4.10. OVERLAYEX_CHN_ATTR_S¶
【Description】
Define the channel attribute of the entended video overlay region.
【Syntax】
typedef struct _OVERLAYEX_CHN_ATTR_S {
POINT_S stPoint;
CVI_U32 u32Layer;
OVERLAY_INVERT_COLOR_S stInvertColor;
} OVERLAYEX_CHN_ATTR_S;
【Member】
Member |
Description |
---|---|
stPoint |
Region location and its width and height. The position can be negative, and the part of the rectangle outside the scope of the channel will not be visible. The width and height cannot exceed the size of the channel. |
u32Layer |
Regional level. |
stInvertColor |
Color Inversion Structure |
【Note】
None.
【Related Data Type and Interface】
None.
9.4.11. RGN_ATTR_U¶
【Description】
Define union structure of region.
【Syntax】
typedef union _RGN_ATTR_U {
OVERLAY_ATTR_S stOverlay;
OVERLAYEX_ATTR_S stOverlayEx;
} RGN_ATTR_U;
【Member】
Member |
Description |
---|---|
stOverlay |
Video overlay region properties. |
stOverlayEx |
Extended video overlay region properties. |
【Note】
Only when RGN_TYPE_E is OverlayEx, this attribute need to be set.
【Related Data Type and Interface】
None.
9.4.12. RGN_CHN_ATTR_U¶
【Description】
Define union structure of region channel.
【Syntax】
typedef union _RGN_CHN_ATTR_U {
OVERLAY_CHN_ATTR_S stOverlayChn;
COVER_CHN_ATTR_S stCoverChn;
COVEREX_CHN_ATTR_S stCoverExChn;
OVERLAYEX_CHN_ATTR_S stOverlayExChn;
MOSAIC_CHN_ATTR_S stMosaicChn;
} RGN_CHN_ATTR_U;
【Member】
Member |
iption |
---|---|
stOverlayChn |
Video overlay region channel attribute. |
stCoverChn |
Video masking region channel attribute. |
stCoverExChn |
Extended masking region channel attribute. |
stOverlayExChn |
Extended overlay region channel attribute. |
stMosaicChn |
Mosaic region channel attribute. |
【Note】
None.
【Related Data Type and Interface】
None.
9.4.13. RGN_ATTR_S¶
【Description】
Define region attribute.
【Syntax】
typedef struct _RGN_ATTR_S {
RGN_TYPE_E enType;
RGN_ATTR_U unAttr;
} RGN_ATTR_S;
【Member】
Member |
Description |
---|---|
enType |
Region type. |
unAttr |
Union attribute structure of region |
【Note】
None.
【Related Data Type and Interface】
None.
9.4.14. RGN_CHN_ATTR_S¶
【Description】
Define region channel attribute.
【Syntax】
typedef struct _RGN_CHN_ATTR_S {
CVI_BOOL bShow;
RGN_TYPE_E enType;
RGN_CHN_ATTR_U unChnAttr;
} RGN_CHN_ATTR_S;
【Member】
Member |
Description |
---|---|
bShow |
Whether region is shown or not. |
enType |
Regional type |
unChnAttr |
Union attribute structure of region |
【Note】
None.
【Related Data Type and Interface】
None.