Display

    The driver functions provided for the GUI include the layer, hardware acceleration, memory, and callback functions.

    Since:

    1.0

    Version:

    1.0

    Summary

    Files

    Data Structures

    Data Structure Name

    Description

    Defines pointers to the hardware acceleration driver functions.

    GrallocFuncs

    Defines pointers to the memory driver functions.

    Defines pointers to the layer driver functions.

    DisplayInfo

    Defines display information.

    Defines layer information.

    LayerAlpha

    Defines alpha operations on a layer.

    Defines the buffer handle type. The virtual address of a handle maps to its physical address.

    GrallocBuffer

    Defines the memory buffer, including the buffer handle, memory type, memory size, and virtual memory address.

    Defines buffer data of a layer, including the virtual and physical memory addresses.

    LayerBuffer

    Defines the buffer, which is used to store layer data.

    Defines the coordinates of the upper left corner of a rectangle as well as its width and height to describe a rectangular area for an image.

    ISurface

    Stores surface information for hardware acceleration, such as draw image, and bit blit.

    Describes a line to help draw lines in hardware acceleration.

    ICircle

    Describes a circle to help draw circles in hardware acceleration.

    Describes a rectangle to help draw rectangles in hardware acceleration.

    GfxOpt

    Defines hardware acceleration options.

    Enumerations

    Enumeration Name

    Description

    { DISPLAY_SUCCESS = 0, = -1, DISPLAY_FD_ERR = -2, = -3, DISPLAY_NULL_PTR = -4, = -5, DISPLAY_NOMEM = -6, = -7, DISPLAY_NOT_PERM = -8 }

    Enumerates return values of the functions.

    { LAYER_TYPE_GRAPHIC, , LAYER_TYPE_SDIEBAND, }

    Enumerates layer types.

    PixelFormat { , PIXEL_FMT_RGBA_5658, , PIXEL_FMT_RGBA_4444, , PIXEL_FMT_RGBX_5551, , PIXEL_FMT_RGB_555, , PIXEL_FMT_RGBA_8888, , PIXEL_FMT_BGR_565, , PIXEL_FMT_BGRA_4444, , PIXEL_FMT_BGRA_5551, , PIXEL_FMT_BGRA_8888, , PIXEL_FMT_YCBCR_422_SP, , PIXEL_FMT_YCBCR_420_SP, , PIXEL_FMT_YCBCR_422_P, , PIXEL_FMT_YCBCR_420_P, , PIXEL_FMT_YUYV_422_PKG, , PIXEL_FMT_YVYU_422_PKG, , PIXEL_FMT_BUTT }

    Enumerates pixel formats.

    { ROTATE_NONE = 0, , ROTATE_180, , ROTATE_BUTT }

    Enumerates transform types of images.

    { NORMAL_MEM = 0, , SHM_MEM }

    Enumerates memory types.

    { BLEND_NONE = 0, , BLEND_SRC, , BLEND_DSTOVER, , BLEND_DSTIN, , BLEND_DSTOUT, , BLEND_DSTATOP, , BLEND_XOR, , BLEND_AKS, , BLEND_BUTT }

    Enumerates image blending types.

    { ROP_BLACK = 0, , ROP_MASKNOTPEN, , ROP_MASKPENNOT, , ROP_XORPEN, , ROP_MASKPEN, , ROP_NOP, , ROP_COPYPE, , ROP_MERGEPEN, , ROP_BUTT }

    Enumerates ROP types supported by hardware acceleration.

    { CKEY_NONE = 0, , CKEY_DST, }

    Enumerates color key types supported by hardware acceleration.

    MirrorType { = 0, MIRROR_LR, , MIRROR_BUTT }

    Enumerates mirror types supported by hardware acceleration.

    { INVALID = 0, , DISCONNECTED }

    Enumerates connection types of hot plugging.

    Functions

    Function Name

    Description

    (GfxFuncs funcs)

    int32_t

    Initializes the hardware acceleration module to obtain the pointer to functions for hardware acceleration operations.

    (GfxFuncs *funcs)

    int32_t

    Deinitializes the hardware acceleration module to release the memory allocated to the pointer to functions for hardware acceleration operations.

    (GrallocFuncs funcs)

    int32_t

    Initializes the memory module to obtain the pointer to functions for memory operations.

    (GrallocFuncs funcs)

    int32_t

    Deinitializes the memory module to release the memory allocated to the pointer to functions for memory operations.

    (LayerFuncs **funcs)

    int32_t

    Initializes the layer to apply for resources used by the layer and obtain the pointer to functions for layer operations.

    (LayerFuncs funcs)

    int32_t

    Deinitializes the layer module to release the memory allocated to the pointer to functions for layer operations.

    Details

    Enumeration Type Documentation

    Description:

    Enumerates image blending types.

    The system combines images based on a specified blending type during hardware acceleration.

    Enumerator

    Description

    BLEND_NONE

    No blending

    BLEND_CLEAR

    CLEAR blending

    BLEND_SRC

    SRC blending

    BLEND_SRCOVER

    SRC_OVER blending

    BLEND_DSTOVER

    DST_OVER blending

    BLEND_SRCIN

    SRC_IN blending

    BLEND_DSTIN

    DST_IN blending

    BLEND_SRCOUT

    SRC_OUT blending

    BLEND_DSTOUT

    DST_OUT blending

    BLEND_SRCATOP

    SRC_ATOP blending

    BLEND_DSTATOP

    DST_ATOP blending

    BLEND_ADD

    ADD blending

    BLEND_XOR

    XOR blending

    BLEND_DST

    DST blending

    BLEND_AKS

    AKS blending

    BLEND_AKD

    AKD blending

    BLEND_BUTT

    Null operation

    ColorKey

    Description:

    Enumerates color key types supported by hardware acceleration.

    Enumerator

    Description

    CKEY_NONE

    No color key

    CKEY_SRC

    Source color key

    CKEY_DST

    Destination color key

    CKEY_BUTT

    Null operation

    Connection

    1. enum [Connection]($api-api-SmartVision-Devices-Display.md#gab0845c0c8d309ee865c78b095b00e671)

    Enumerates connection types of hot plugging.

    DispErrCode

    1. enum [DispErrCode]($api-api-SmartVision-Devices-Display.md#ga12a925dadef7573cd74d63d06824f9b0)

    Description:

    Enumerates return values of the functions.

    Enumerator

    Description

    DISPLAY_SUCCESS

    Success

    DISPLAY_FAILURE

    Failure

    DISPLAY_FD_ERR

    File handle (FD) error

    DISPLAY_PARAM_ERR

    Parameter error

    DISPLAY_NULL_PTR

    Null pointer

    DISPLAY_NOT_SUPPORT

    Unsupported feature

    DISPLAY_NOMEM

    Insufficient memory

    DISPLAY_SYS_BUSY

    System busy

    DISPLAY_NOT_PERM

    Forbidden operation

    LayerType

    1. enum [LayerType]($api-api-SmartVision-Devices-Display.md#ga56943a0946e5f15e5e58054b8e7a04a4)

    Description:

    Enumerates layer types.

    Enumerator

    Description

    LAYER_TYPE_GRAPHIC

    Graphic layer

    LAYER_TYPE_OVERLAY

    Overlay layer

    LAYER_TYPE_SDIEBAND

    Sideband layer

    LAYER_TYPE_BUTT

    Empty layer

    MemType

    Description:

    Enumerates memory types.

    Memory is allocated based on the type specified by the GUI.

    Enumerator

    Description

    NORMAL_MEM

    Memory without cache

    CACHE_MEM

    Memory with cache

    SHM_MEM

    Shared memory

    MirrorType

    Description:

    Enumerates mirror types supported by hardware acceleration.

    Enumerator

    Description

    MIRROR_NONE

    No mirror

    MIRROR_LR

    Left and right mirrors

    MIRROR_TB

    Top and bottom mirrors

    MIRROR_BUTT

    Null operation

    PixelFormat

    1. enum [PixelFormat](Codec.md#ga60883d4958a60b91661e97027a85072a)

    Description:

    Enumerates pixel formats.

    Enumerator

    Description

    PIXEL_FMT_RGB_565

    RGB565 format

    PIXEL_FMT_RGBA_5658

    RGBA5658 format

    PIXEL_FMT_RGBX_4444

    RGBX4444 format

    PIXEL_FMT_RGBA_4444

    RGBA4444 format

    PIXEL_FMT_RGB_444

    RGB444 format

    PIXEL_FMT_RGBX_5551

    RGBX5551 format

    PIXEL_FMT_RGBA_5551

    RGBA5551 format

    PIXEL_FMT_RGB_555

    RGB555 format

    PIXEL_FMT_RGBX_8888

    RGBX8888 format

    PIXEL_FMT_RGBA_8888

    RGBA8888 format

    PIXEL_FMT_RGB_888

    RGB888 format

    PIXEL_FMT_BGR_565

    BGR565 format

    PIXEL_FMT_BGRX_4444

    BGRX4444 format

    PIXEL_FMT_BGRA_4444

    BGRA4444 format

    PIXEL_FMT_BGRX_5551

    BGRX5551 format

    PIXEL_FMT_BGRA_5551

    BGRA5551 format

    PIXEL_FMT_BGRX_8888

    BGRX8888 format

    PIXEL_FMT_BGRA_8888

    BGRA8888 format

    PIXEL_FMT_YUV_422_I

    YUV422 interleaved format

    PIXEL_FMT_YCBCR_422_SP

    YCBCR422 semi-planar format

    PIXEL_FMT_YCRCB_422_SP

    YCRCB422 semi-planar format

    PIXEL_FMT_YCBCR_420_SP

    YCBCR420 semi-planar format

    PIXEL_FMT_YCRCB_420_SP

    YCRCB420 semi-planar format

    PIXEL_FMT_YCBCR_422_P

    PIXEL_FMT_YCRCB_422_P

    YCRCB422 planar format

    PIXEL_FMT_YCBCR_420_P

    YCBCR420 planar format

    PIXEL_FMT_YCRCB_420_P

    YCRCB420 planar format

    PIXEL_FMT_YUYV_422_PKG

    YUYV422 packed format

    PIXEL_FMT_UYVY_422_PKG

    UYVY422 packed format

    PIXEL_FMT_YVYU_422_PKG

    YVYU422 packed format

    PIXEL_FMT_VYUY_422_PKG

    VYUY422 packed format

    PIXEL_FMT_BUTT

    Invalid pixel format

    1. enum [RopType]($api-api-SmartVision-Devices-Display.md#ga24265f7618fbdba53d3da4806d3097c4)

    Description:

    Enumerates ROP types supported by hardware acceleration.

    ROP performs bitwise Boolean operations (including bitwise AND and bitwise OR) on the RGB color and alpha values of the foreground bitmap with those of the background bitmap, and then outputs the result.

    TransformType

    1. enum [TransformType]($api-api-SmartVision-Devices-Display.md#gaa65f3b21a9a92ff022e435a7304126d2)

    Description:

    Enumerates transform types of images.

    Enumerator

    Description

    ROTATE_NONE

    No rotation

    ROTATE_90

    Rotation by 90 degrees

    ROTATE_180

    Rotation by 180 degrees

    ROTATE_270

    Rotation by 270 degrees

    ROTATE_BUTT

    Invalid operation

    Function Documentation

    GfxInitialize()

    Description:

    Initializes the hardware acceleration module to obtain the pointer to functions for hardware acceleration operations.

    Parameters:

    Name

    Description

    funcs

    Indicates the double pointer to functions for hardware acceleration operations. Memory is allocated automatically when you initiate the hardware acceleration module, so you can simply use the pointer to gain access to the functions.

    Returns:

    Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

    See also:

    GfxUninitialize()

    Description:

    Deinitializes the hardware acceleration module to release the memory allocated to the pointer to functions for hardware acceleration operations.

    Parameters:

    Name

    Description

    funcs

    Indicates the pointer to functions for hardware acceleration operations.

    Returns:

    Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

    See also:

    GrallocInitialize()

    1. int32_t GrallocInitialize ([GrallocFuncs]($api-api-SmartVision-Devices-zh-cn_topic_0000001054918153.md) ** funcs)

    Description:

    Initializes the memory module to obtain the pointer to functions for memory operations.

    Parameters:

    Name

    Description

    funcs

    Indicates the double pointer to functions for memory operations. Memory is allocated automatically when you initiate the memory module initialization, so you can simply use the pointer to gain access to the functions.

    Returns:

    Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

    GrallocUninitialize()

      Description:

      Deinitializes the memory module to release the memory allocated to the pointer to functions for memory operations.

      Parameters:

      Name

      Description

      funcs

      Indicates the pointer to functions for memory operations.

      Returns:

      Returns 0 if the operation is successful; returns an error code defined in otherwise.

      LayerInitialize()

      1. int32_t LayerInitialize ([LayerFuncs]($api-api-SmartVision-Devices-zh-cn_topic_0000001055678100.md) ** funcs)

      Description:

      Initializes the layer to apply for resources used by the layer and obtain the pointer to functions for layer operations.

      Parameters:

      Returns:

      Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

      See also:

      Description:

      Deinitializes the layer module to release the memory allocated to the pointer to functions for layer operations.

      Parameters:

      Name

      Description

      funcs

      Indicates the pointer to functions for layer operations.

      Returns:

      Returns 0 if the operation is successful; returns an error code defined in otherwise.

      See also: