Updated on 2022-03-13 GMT+08:00

Structures in VpcUserImageConfigure

The structures are defined in the ddk/include/inc/dvpp/Vpc.h file in the DDK installation directory.

  • VpcUserRoiConfigure structure

    Member Variable

    Description

    VpcUserRoiInputConfigure inputConfigure

    User ROI input configuration. For details, see VpcUserRoiInputConfigure structure. If the 8K image scaling function is implemented, this parameter does not need to be set.

    VpcUserRoiOutputConfigure outputConfigure

    User ROI output configuration. For details, see VpcUserRoiOutputConfigure structure.

    VpcUserRoiConfigure* next

    Next user ROI configuration. If the single-image multi-ROI mode is used, configure this parameter. Otherwise, set this parameter to NULL. The default value is NULL.

    uint64_t reserve1

    Reserved

  • VpcCompressDataConfigure structure

    Member Variable

    Description

    uint64_t lumaHeadAddr

    Header address of the Y component

    uint64_t chromaHeadAddr

    Header address of the U and V components

    uint32_t lumaHeadStride

    Header stride of the Y component, which must be the same as the value of stride_head in the FRAME structure.

    uint32_t chromaHeadStride

    Header stride of the U and V components, which must be the same as the value of stride_head in the FRAME structure.

    uint64_t lumaPayloadAddr

    Payload address of the Y component

    uint64_t chromaPayloadAddr

    Payload address of the U and V components

    uint32_t lumaPayloadStride

    Payload stride of the Y component, which must be the same as the value of stride_payload in the FRAME structure.

    uint32_t chromaPayloadStride

    Payload stride of the U and V components, which must be the same as the value of stride_payload in the FRAME structure.

  • VpcUserYuvSum structure

    Member Variable

    Description

    uint32_t ySum

    Y component sum

    uint32_t uSum

    U component sum

    uint32_t vSum

    V component sum

    uint64_t reserve1

    Reserved

  • VpcUserPerformanceTuningParameter structure

    Member Variable

    Description

    uint64_t reserve1

    Reserved parameter 1

    uint64_t reserve2

    Reserved parameter 2

    uint64_t reserve3

    Reserved parameter 3

    uint64_t reserve4

    Reserved parameter 4

    uint64_t reserve5

    Reserved parameter 5

  • VpcUserRoiInputConfigure structure

    Member Variable

    Description

    VpcUserCropConfigure cropArea

    Input data configuration of the cropped area. For details, see VpcUserCropConfigure structure.

    uint64_t reserve1

    Reserved

  • VpcUserRoiOutputConfigure structure

    Member Variable

    Description

    uint8_t* addr

    Start address of the output image

    You are advised to allocate the buffer by calling HIAI_DVPP_DMalloc provided by Matrix. The allocated buffer must meet the DVPP requirements, that is, the buffer addresses of the input and output images must be in the same 4 GB space, and the start addresses must be 16-pixel aligned. For details about HIAI_DVPP_DMalloc, see Matrix API Reference.

    uint32_t bufferSize

    Output buffer size calculated based on the YUV420SP format

    uint32_t widthStride

    Width stride of the output image, which must be 16-pixel aligned. The minimum width stride is 32, and the maximum width stride is 4096.

    uint32_t heightStride

    Height stride of the output image, which must be 2-pixel aligned. The minimum height stride is 6, and the maximum height stride is 4096.

    If the output is a YUV420SP image, you need to calculate the start addresses of the U and V data based on the value of heightStride.

    VpcUserCropConfigure outputArea

    Coordinates of the output area specified by the user. For details, see VpcUserCropConfigure structure.

    If the 8K image scaling function is implemented, this parameter does not need to be set.

    uint64_t reserve1

    Reserved

  • VpcUserCropConfigure structure

    For details about the top offset, bottom offset, left offset, and right offset, see Table 1.

    Member Variable

    Description

    uint32_t leftOffset

    Left offset. The value must be an even number.

    The left offset of the overwritten area relative to the output image is 16-pixel aligned.

    uint32_t rightOffset

    Right offset. The value must be an odd number.

    uint32_t upOffset

    Top offset. The value must be an even number.

    uint32_t downOffset

    Bottom offset. The value must be an odd number.

    uint64_t reserve1

    Reserved