7.3.8 Video Output
Overview
The Video Output (VOT) module actively reads image and graphics data from memory and outputs the image through the corresponding display output device. The supported display/write-back devices, video layers, and graphics layers of the chip are shown in the following table.

Functional Description
Basic Concepts
-
HD Display Device
The SDK identifies HD devices as DHVx, where x is the index number starting from 0, indicating the number of HD devices. X3 has one HD device, DHV0.
-
Video Layer
- For the video layer fixed on each display device, the SDK uses VHVx to identify it. X3 DHV0 has one video layer, VHV0.
- VHV0 supports zooming and has 2 channels.
- X3 output interface supports RGB, BT1120/BT656, and MIPI. All three interfaces support a maximum output timing of 1080P@60fps.
-
Video Write-Back
The write-back device is referred to as WD. The write-back function: X3 only supports device-level write-back, capturing video data output at the device level, which can be used for display and encoding.
-
Channels
Channels are managed by video layers. Each video layer of X3 supports 2 channels.
-
Graphics Layer
X3 has 2 graphics layers, which are fixedly bound to DHV0.
-
Input and Output Data Formats
VOT supports input and output data in specified formats, where output refers to writing back data to DDR. The supported input and output data formats of X3 are shown in the table below.
| Input Format | Output Format |
|---|---|
| FORMAT_YUV422_UYVY | FORMAT_YUV422_UYVY |
| FORMAT_YUV422_VYUY | FORMAT_YUV422_VYUY |
| FORMAT_YUV422_YVYU | FORMAT_YUV422_YVYU |
| FORMAT_YUV422_YUYV | FORMAT_YUV422_YUYV |
| FORMAT_YUV422SP_UV | FORMAT_YUV420SP_UV |
| FORMAT_YUV422SP_VU | FORMAT_YUV420SP_VU |
| FORMAT_YUV420SP_UV | FORMAT_BGR0 |
| FORMAT_YUV420SP_VU | |
| FORMAT_YUV422P_VU | |
| FORMAT_YUV420P_UV |
API Reference
Video Output (VOT) implements functions to enable video output devices or channels, and send video data to output channels.
VOT provides the following APIs:
HB_VOT_SetPubAttr: Set the public attributes of the video output device.
HB_VOT_GetPubAttr: Get the public attributes of the video output device.
HB_VOT_Enable: Enable the video output device.
HB_VOT_Disable: Disable the video output device.
HB_VOT_SetLcdBackLight: Set the LCD backlight.
HB_VOT_SetVideoLayerAttr: Set the attributes of the video layer.
HB_VOT_GetVideoLayerAttr: Get the attributes of the video layer.
HB_VOT_EnableVideoLayer: Enable the video layer.
HB_VOT_DisableVideoLayer: Disable the video layer.
HB_VOT_SetVideoLayerCSC: Set the CSC (Color Space Conversion) of the video layer.
HB_VOT_GetVideoLayerCSC: Get the CSC (Color Space Conversion) of the video layer.
HB_VOT_SetVideoLayerUpScale: Set the upscaling parameters of the video layer.
HB_VOT_GetVideoLayerUpScale: Get the upscaling parameters of the video layer.
HB_VOT_BatchBegin: Start batch processing of video layer attributes.
HB_VOT_BatchEnd: End batch processing of video layer attributes.
HB_VOT_GetScreenFrame: Get the output image of the device.
HB_VOT_ReleaseScreenFrame: Release the output image of the device.
HB_VOT_SetChnAttr: Set the attributes of the video output channel.
HB_VOT_GetChnAttr: Get the attributes of the video output channel.
HB_VOT_SetChnAttrEx: Set the advanced parameters of the video output channel.
HB_VOT_GetChnAttrEx: Get the advanced parameters of the video output channel.
HB_VOT_EnableChn: Enable the video output channel.
HB_VOT_DisableChn: Disable the video output channel.
HB_VOT_SetChnCrop: Set the cropping attributes of the channel.
HB_VOT_GetChnCrop: Get the cropping attributes of the channel.
HB_VOT_SetChnDisplayPosition: Set the display position of the channel.
HB_VOT_GetChnDisplayPosition: Get the display position of the channel.
HB_VOT_SetChnFrameRate: Set the display frame rate of the channel.
HB_VOT_GetChnFrameRate: Get the display frame rate of the channel.
HB_VOT_ShowChn: Show the channel image.
HB_VOT_HideChn: Hide the channel image.
HB_VOT_SendFrame: Send the output image.
HB_VOT_ClearChnBuf: Clear the image buffer.
HB_VOT_EnableWB: Enable write back.
HB_VOT_DisableWB: Disable write back.
HB_VOT_SetWBAttr: Set the write back attributes.
HB_VOT_GetWBAttr: Get the write back attributes.
HB_VOT_GetWBFrame: Get the write back image.HB_VOT_ReleaseWBFrame: Release write-back image.
HB_VOT_ShutDownHDMI: Turn off HDMI output image to the device, and the display module still works normally.
HB_VOT_StartHDMI: Enable HDMI output image to the device.
HB_VOT_SetPubAttr
【Function Declaration】
int HB_VOT_SetPubAttr(uint8_t dev, const VOT_PUB_ATTR_S *pstPubAttr);
【Description】
Set the public attributes of video output.
【Parameter Description】
| Parameter Name | Description | Input/Output |
|---|---|---|
| dev | Video output device ID. Range: 0. | Input |
| pstPubAttr | Video output device public attributes. | Input |
【Return Value】
| Return Value | Description |
|---|---|
| 0 | Success. |
| Non-zero | Failure. |
【Notes】
None.
【Reference Code】
Refer to HB_VOT_Enable.
HB_VOT_GetPubAttr
【Function Declaration】
int HB_VOT_GetPubAttr(uint8_t dev, VOT_PUB_ATTR_S *pstPubAttr);
【Description】
Get the public attributes of video output.
【Parameter Description】
| Parameter Name | Description | Input/Output |
|---|---|---|
| dev | Video output device ID. Range: 0. | Input |
| pstPubAttr | Video output device public attributes. | Output |
【Return Value】
| Return value | Description |
|---|---|
| 0 | Success. |
| Non-0 | Failure. |
【Notes】
None
【Reference Code】
See HB_VOT_Enable
HB_VOT_Enable
【Function Declaration】
int HB_VOT_Enable(uint8_t dev);
【Function Description】
Enable video output device.
【Parameter Description】
| Parameter Name | Description | Input/Output |
|---|---|---|
| dev | Video output device ID. Range: 0. | Input |
【Return Value】
| Return value | Description |
|---|---|
| 0 | Success. |
| Non-0 | Failure. |
【Notes】
None
【Reference Code】
int ret = 0; VOT_PUB_ATTR_S stPubAttr = {};
ret = HB_VOT_GetPubAttr(0, &stPubAttr);
if (ret) {
printf("HB_VOT_GetPubAttr failed.\n");
// break;
}
stPubAttr.enOutputMode = HB_VOT_OUTPUT_BT1120;
stPubAttr.u32BgColor = 0xFF7F88;
ret = HB_VOT_SetPubAttr(0, &stPubAttr);
if (ret) {
printf("HB_VOT_SetPubAttr failed.\n");
// break;
}
ret = HB_VOT_Enable(0);
if (ret) {
printf("HB_VOT_Enable failed.\n");
}
ret = HB_VOT_Disable(0);
if (ret) {
printf("HB_VOT_Disable failed.\n");
}
HB_VOT_Disable
【Function Declaration】
int HB_VOT_Disable(uint8_t dev);
【Description】
Disable video output device.
【Parameters】
| Parameter Name | Description | Input/Output |
|---|---|---|
| dev | Video output device ID. Range: 0. | Input |
【Return Value】
| Return Value | Description |
|---|---|
| 0 | Success |
| Non-zero | Failure |
【Notes】
None
【Reference Code】
See HB_VOT_Enable
HB_VOT_SetLcdBackLight
【Function Declaration】
int HB_VOT_SetLcdBackLight (uint8_t dev, uint32_t backlight);
【Description】
Set LCD backlight brightness.
【Parameters】
| Parameter Name | Description | Input/Output |
|---|---|---|
| dev | Video output device ID. Range:0. | Input |
| backlight | Backlight brightness value. Value range: 0-10. The larger the value, the brighter the backlight. When the brightness value is 0, the screen is completely black. | Input |
【Return Value】
| Return Value | Description |
|---|---|
| 0 | Success. |
| Non-zero | Failure. |
【Notes】
None
【Reference Code】
None
HB_VOT_SetVideoLayerAttr
【Function Declaration】
int HB_VOT_SetVideoLayerAttr(uint8_t layer, const VOT_VIDEO_LAYER_ATTR_S *pstLayerAttr);
【Function Description】
Set the attributes of the video layer.
【Parameter Description】
| Parameter Name | Description | Input/Output |
|---|---|---|
| layer | Video output layer id. Value range: 0. | Input |
| pstLayerAttr | Attributes of the video output layer. | Input |
【Return Value】
| Return Value | Description |
|---|---|
| 0 | Success. |
| Non-zero | Failure. |