hbVPImage

typedef struct hbVPImage { uint8_t imageFormat; uint8_t imageType; int32_t width; int32_t height; int32_t stride; void *dataVirAddr; uint64_t dataPhyAddr; void *uvVirAddr; uint64_t uvPhyAddr; int32_t uvStride; } hbVPImage;

Picture Structure. Only BPU memory is supported.

Picture channel description: take HB_VP_IMAGE_FORMAT_RGB as an example, when the number of channels is 3, the imageType is HB_VP_IMAGE_TYPE_U8C3. When the number of channels is 4, the data exists an extra memory due to alignment requirements, at this time it is necessary to specify the imageType as HB_VP_IMAGE_TYPE_U8C4 (RRR* GGG* BBB*).

  • Member

    Member NameDescription
    imageFormatPicture format.
    imageTypePicture type.
    widthThe pixel width of the picture.
    heightThe pixel height of the picture.
    strideThe pixel offset of the picture, expressed as a number of bytes.
    dataVirAddrThe logical address of the picture on the arm side.
    dataPhyAddrThe physical address of the picture.
    uvVirAddrThe uv data logical address when the picture format is NV12.
    uvPhyAddrThe uv data physical address when the picture format is NV12.
    uvStrideThe offset of the uv data when the picture format is NV12, expressed as the number of bytes.

Offset description: stride is in the range [bytes_per_pixel * width, bytes_per_pixel * MAX_IMAGE_WIDTH] and satisfies the bytes_per_pixel alignment. The bytes_per_pixel indicate the number of bytes per pixel, the size of which depends on the picture format imageFormat, width indicates the pixel width of the picture, MAX_IMAGE_WIDTH indicates the maximum width of the picture pixels. When the picture format is NV12, uvStride ranges from [2*uv_width, MAX_IMAGE_WIDTH] and must be even. When using pyramid and gdc hardware, the values ​​of stride and uvStride should be greater than the width and meet the 16-byte alignment requirement.