5.4. Data Types¶
VO_DEV:Define the device number.
VO_LAYER:Define the video layer number.
VO_INTF_TYPE:Define the interface number of the video output device.
VO_INTF_SYNC_E:Define the standard timing of video output devices.
VO_SYNC_INFO_S:Define the sequential structure of the device.
VO_PUB_ATTR_S:Define output device structure.
VO_VIDEO_LAYER_ATTR_S:Define the video layer structure.
VO_CHN_ATTR_S:Define output channel structure.
VO_MIN_CHN_WIDTH:Define the minimum channel width for video output devices.
VO_MIN_CHN_HEIGHT:Define the minimum height of video output device channel.
VO_MAX_DEV_NUM:Define the maximum number of video output devices.
VO_MAX_LAYER_NUM:Define the maximum number of video layers for video output devices.
VO_MAX_CHN_NUM:Define the maximum number of channels for video output devices.
VO_I80_INSTR_S : Define I80 instruction.
VO_PM_OPS_S : Power management function pointer structure.
VO_GAMMA_INFO_S : Defining Gamma Correction Information.
VO_BIN_INFO_S : Gamma information structure.
VO_PATTERN_MODE: Define display pattern mode.
VO_D_REMAP_S : Define the pin mapping structure.
VO_PINMUX_S : Define the pin PINMUX structure.
VO_BT_ATTR_S : Defines the configuration structure of the BT interface pin.
VO_MCU_INSTRS_S : Defines the MCU interface initialization structure.
VO_HW_MCU_CFG_S : Defines the configuration structure of the MCU interface.
VO_CHN_STATUS_S : Define the channel state structure.
5.4.1. VO_DEV¶
【Description】
Define the device number.
【Syntax】
typedef CVI_U32 VO_DEV;
【Member】
Processor
escription
CV181x
There is only one video output device.
0: DHD0
Support LCD, MIPI TX, BT.656, BT.1120, RGB, 180
【Note】
None.
【Related Data Type and Interface】
None.
5.4.2. VO_LAYER¶
【Description】
Define the video layer number.
【Syntax】
typedef CVI_U32 VO_LAYER;
【Member】
Processor
escription
CV181x
There is only one video output layer.
0: VHD0
【Note】
None.
【Related Data Type and Interface】
None.
5.4.3. VO_INTF_TYPE¶
【Description】
Define the interface number of the video output device.
【Syntax】
#define VO_INTF_CVBS (0x01L << 0)
#define VO_INTF_YPBPR (0x01L << 1)
#define VO_INTF_VGA (0x01L << 2)
#define VO_INTF_BT656 (0x01L << 3)
#define VO_INTF_BT1120 (0x01L << 6)
#define VO_INTF_LCD (0x01L << 7)
#define VO_INTF_LCD_18BIT (0x01L << 10)
#define VO_INTF_LCD_24BIT (0x01L << 11)
#define VO_INTF_LCD_30BIT (0x01L << 12)
#define VO_INTF_MIPI (0x01L << 13)
#define VO_INTF_MIPI_SLAVE (0x01L << 14)
#define VO_INTF_HDMI (0x01L << 15)
typedef CVI_U32 VO_INTF_TYPE_E;
【Note】
None.
【Related Data Type and Interface】
None.
5.4.4. VO_INTF_SYNC_E¶
【Description】
Define the standard timing of video output devices.
【Syntax】
typedef enum _VO_INTF_SYNC_E {
VO_OUTPUT_PAL = 0,
VO_OUTPUT_NTSC,
VO_OUTPUT_1080P24,
VO_OUTPUT_1080P25,
VO_OUTPUT_1080P30,
VO_OUTPUT_720P50,
VO_OUTPUT_720P60,
VO_OUTPUT_1080P50,
VO_OUTPUT_1080P60,
VO_OUTPUT_576P50,
VO_OUTPUT_480P60
VO_OUTPUT_800x600_60,
VO_OUTPUT_1024x768_60,
VO_OUTPUT_1280x1024_60,
VO_OUTPUT_1366x768_60
VO_OUTPUT_1440x900_60,
VO_OUTPUT_1280x800_60,
VO_OUTPUT_1600x1200_60,
VO_OUTPUT_1680x1050_60
VO_OUTPUT_1920x1200_60,
VO_OUTPUT_640x480_60,
VO_OUTPUT_1920x2160_30,
VO_OUTPUT_2560x1440_30,
VO_OUTPUT_2560x1440_60,
VO_OUTPUT_2560x1600_60,
VO_OUTPUT_3840x2160_24,
VO_OUTPUT_3840x2160_25,
VO_OUTPUT_3840x2160_30,
VO_OUTPUT_3840x2160_50,
VO_OUTPUT_3840x2160_60,
VO_OUTPUT_4096x2160_24,
VO_OUTPUT_4096x2160_25,
VO_OUTPUT_4096x2160_30,
VO_OUTPUT_4096x2160_50,
VO_OUTPUT_4096x2160_60,
VO_OUTPUT_720x1280_60, /* For MIPI DSI Tx 720 x1280 at 60 Hz */
VO_OUTPUT_1080x1920_60, /* For MIPI DSI Tx 1080x1920 at 60 Hz */
VO_OUTPUT_USER, /* User timing. */
VO_OUTPUT_BUTT
} VO_INTF_SYNC_E;
【Note】
None.
【Related Data Type and Interface】
None.
5.4.5. VO_SYNC_INFO_S¶
【Description】
Define the sequential structure of the device.
【Syntax】
typedef struct _VO_SYNC_INFO_S {
CVI_BOOL bSynm;
CVI_BOOL bIop;
CVI_U16 u16FrameRate;
CVI_U16 u16Vact;
CVI_U16 u16Vbb;
CVI_U16 u16Vfb;
CVI_U16 u16Hact;
CVI_U16 u16Hbb;
CVI_U16 u16Hfb;
CVI_U16 u16Hpw;
CVI_U16 u16Vpw;
CVI_BOOL bIdv;
CVI_BOOL bIhs;
CVI_BOOL bIvs;
} VO_SYNC_INFO_S;
【Member】
Member |
Description |
---|---|
bSynm |
Synchronous signal mode, 0: embedded sync, 1: separate sync。 |
bIop |
0: interlaced, 1:progressive。 |
u16FrameRate |
Number of updates per second |
u16Vact |
Vertical image rows |
u16Vbb |
Vertical back porch rows |
u16Vfb |
Vertical front porch rows |
u16Hact |
Phase number of horizontal image |
u16Hbb |
Horizontal back porch phase number |
u16Hfb |
Horizontal front porch phase number |
u16Hpw |
Number of horizontal synchronous phases |
u16Vpw |
Vertical synchronous rows |
bIdv |
Is Data valid reversed |
bIhs |
Is horizontal synchronization reversed |
bIvs |
Is vertical synchronization reversed |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.6. VO_PUB_ATTR_S¶
【Description】
Define output device structure.
【Syntax】
typedef struct _VO_PUB_ATTR_S {
CVI_U32 u32BgColor;
VO_INTF_TYPE_E enIntfType;
VO_INTF_SYNC_E enIntfSync;
VO_SYNC_INFO_S stSyncInfo;
union {
VO_I80_CFG_S sti80Cfg;
VO_LVDS_ATTR_S stLvdsAttr;
};
} VO_PUB_ATTR_S;
【Member】
Member |
Description |
---|---|
u32BgColor |
Background color. In RGBAAA format, bit[9:0] is B, bit[19:10] is G, and bit[29:20] is R. |
enIntfType |
The interface of the output device. |
enIntfSync |
Standard timing of output devices |
stSyncInfo |
The custom timing of the output device, only works when enIntfSync is VO_OUTPUT_USER . |
sti80Cfg |
Interface properties of the output device when the interface is I80 |
stLvdsAttr |
Interface properties when the output device interface is LCD |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.7. VO_VIDEO_LAYER_ATTR_S¶
【Description】
Define the video layer structure.
【Syntax】
typedef struct _VO_VIDEO_LAYER_ATTR_S {
RECT_S stDispRect;
SIZE_S stImageSize;
CVI_U32 u32DispFrmRt;
PIXEL_FORMAT_E enPixFormat;
} VO_VIDEO_LAYER_ATTR_S;
【Member】
Member |
Description |
---|---|
stDispRect |
The display range of the video layer should be smaller than that of the device. |
stImageSize |
Image size. If scaling is not supported, the image size should be equal to stDispRect |
u32DispFrmRt |
Display the number of updates |
enPixFormat |
Image format of video layer |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.8. VO_CHN_ATTR_S¶
【Description】
Define output channel structure.
【Syntax】
typedef struct _VO_CHN_ATTR_S {
CVI_U32 u32Priority;
RECT_S stRect;
} VO_CHN_ATTR_S;
【Member】
Member |
Description |
---|---|
u32Priority |
In case of multi-channel, the one with high priority (relatively small) will be on the channel. |
stRect |
The display area of the channel. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.9. VO_MIN_CHN_WIDTH¶
【Description】
Define the minimum channel width for video output devices.
【Syntax】
#define VO_MIN_CHN_WIDTH 32
【Note】
None.
【Related Data Type and Interface】
None.
5.4.10. VO_MIN_CHN_HEIGHT¶
【Description】
Define the minimum height of video output device channel.
【Syntax】
#define VO_MIN_CHN_HEIGHT 32
【Note】
None.
【Related Data Type and Interface】
None.
5.4.11. VO_MAX_DEV_NUM¶
【Description】
Define the maximum number of video output devices.
【Syntax】
#define VO_MAX_DEV_NUM 1
【Note】
None.
【Related Data Type and Interface】
None.
5.4.12. VO_MAX_LAYER_NUM¶
【Description】
Define the maximum number of video layers for video output devices.
【Syntax】
#define VO_MAX_DEV_NUM 1
【Note】
None.
【Related Data Type and Interface】
None.
5.4.13. VO_MAX_CHN_NUM¶
【Description】
Define the maximum number of channels for video output devices.
【Syntax】
#define VO_MAX_CHN_NUM 1
【Note】
None.
【Related Data Type and Interface】
None.
5.4.14. VO_I80_INSTR_S¶
【Description】
Define I80 instruction
【Definition】
typedef struct _VO_I80_INSTR_S {
CVI_U8 delay;
CVI_U8 data_type;
CVI_U8 data;
} VO_I80_INSTR_S;
【Member】
Member |
Description |
---|---|
delay |
Delay after instruction execution. |
data_type |
Data(1)/Command(0)。 |
data |
The data that needs to be sent. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.15. VO_PM_OPS_S¶
【Description】
Power management function pointer structure.
【Definition】
typedef struct _VO_PM_OPS_S {
pfnVoDevPmOps pfnPanelSuspend;
pfnVoDevPmOps pfnPanelResume;
} VO_PM_OPS_S;
【Member】
Member |
Description |
---|---|
pfnPanelSuspend |
Pointer to the screen sleep function. |
pfnPanelResume |
Pointer to the screen wake-up function. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.16. VO_GAMMA_INFO_S¶
【Description】
Defining Gamma Correction Information
【Definition】
typedef struct _VO_GAMMA_INFO_S {
VO_DEV s32VoDev;
CVI_BOOL enable;
CVI_BOOL osd_apply;
CVI_U32 value[VO_GAMMA_NODENUM];
} VO_GAMMA_INFO_S;
【Member】
Member |
Description |
---|---|
s32VoDev |
Namely VO_DEV, device number |
enable |
Flag indicating whether enabled or not |
osd_apply |
Flag indicating whether to apply to OSD |
value |
Value of each node, maximum VO_GAMMA_NODENUM nodes |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.17. VO_BIN_INFO_S¶
【Description】
Gamma information structure.
【Definition】
typedef struct _VO_BIN_INFO_S {
VO_GAMMA_INFO_S gamma_info;
CVI_U32 guard_magic;
} VO_BIN_INFO_S;
【Member】
Member |
Description |
---|---|
gamma_info |
Gamma correction information structure. |
guard_magic |
Magic number. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.18. VO_PATTERN_MODE¶
【Description】
Define display pattern mode
【Definition】
enum VO_PATTERN_MODE {
VO_PAT_OFF = 0,
VO_PAT_SNOW,
VO_PAT_AUTO,
VO_PAT_RED,
VO_PAT_GREEN,
VO_PAT_BLUE,
VO_PAT_COLORBAR,
VO_PAT_GRAY_GRAD_H,
VO_PAT_GRAY_GRAD_V,
VO_PAT_BLACK,
VO_PAT_MAX,
};
【Note】
None.
【Related Data Type and Interface】
None.
5.4.19. VO_D_REMAP_S¶
【Description】
Define the pin mapping structure.
【Definition】
typedef struct VO_D_REMAP {
enum VO_TOP_D_SEL sel;
CVI_U32 mux;
} VO_D_REMAP_S;
【Member】
Member |
Description |
---|---|
sel |
pad name of the pin. |
mux |
The signal name of the pin. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.20. VO_PINMUX_S¶
【Description】
Define the pin PINMUX structure.
【Definition】
typedef struct VO_PINMUX {
unsigned char pin_num;
struct VO_D_REMAP d_pins[MAX_VO_PINS];
} VO_PINMUX_S;
【Member】
Member |
Description |
---|---|
pin_num |
pad name of the pin. |
d_pins |
Mapping of pins. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.21. VO_BT_ATTR_S¶
【Description】
Defines the configuration structure of the BT interface pin.
【Definition】
typedef struct _VO_BT_ATTR_S {
struct VO_PINMUX pins;
} VO_BT_ATTR_S;
【Member】
Member |
Description |
---|---|
pins |
BT data pin. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.22. VO_MCU_INSTRS_S¶
【Description】
Defines the MCU interface initialization structure.
【Definition】
typedef struct VO_MCU_INSTRS {
unsigned char instr_num;
VO_I80_INSTR_S instr_cmd[MAX_MCU_INSTR];
} VO_MCU_INSTRS_S;
【Member】
Member |
Description |
---|---|
instr_num |
MCU initialization sequence number. |
instr_cmd |
MCU initialization command. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.23. VO_HW_MCU_CFG_S¶
【Description】
Defines the configuration structure of the MCU interface.
【Definition】
typedef struct _VO_HW_MCU_CFG_S {
enum VO_MCU_MODE mode;
VO_PINMUX_S pins;
CVI_U32 lcd_power_gpio_num;
CVI_S8 lcd_power_avtive;
CVI_U32 backlight_gpio_num;
CVI_S8 backlight_avtive;
CVI_U32 reset_gpio_num;
CVI_S8 reset_avtive;
VO_MCU_INSTRS_S instrs;
} VO_HW_MCU_CFG_S;
【Member】
Member |
Description |
---|---|
mode |
MCU format mode |
pins |
Mapping of MCU data pins. |
lcd_power_gpio_num |
Serial number of the power pin. |
lcd_power_avtive |
Power supply pin polarity. |
backlight_gpio_num |
Serial number of the backlight pin. |
backlight_avtive |
Backlight pin polarity. |
reset_gpio_num |
Reset the serial number of the pin. |
reset_avtive |
Reset the pin polarity. |
instrs |
MCU initialization sequence. |
【Note】
None.
【Related Data Type and Interface】
None.
5.4.24. VO_CHN_STATUS_S¶
【Description】
Define the channel state structure.
【Definition】
typedef struct _VO_CHN_STATUS_S {
CVI_U32 u32frameCnt;
CVI_U64 u64PrevTime;
CVI_U32 u32RealFrameRate;
} VO_CHN_STATUS_S;
【Member】
u32frameCnt |
The number of frames triggered in one second。 |
---|---|
u64PrevTime |
Time of the current frame。 |
u32RealFrameRate; |
The true frame rate of the channel。 |
【Note】
None.
【Related Data Type and Interface】
None.