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
Offset Explanation: stride is in the range of [bytes_per_pixel * width, bytes_per_pixel * MAX_IMAGE_WIDTH],
bytes_per_pixel represents the number of bytes per pixel, determined by the image format imageFormat or image type imageType. width represents the image pixel width, and MAX_IMAGE_WIDTH represents the maximum image pixel width.
When the picture format is NV12, uvStride ranges from [2*uv_width, MAX_IMAGE_WIDTH] and must be even.
When the image format is NV12, if it is 8-bit, the imageType should be set to HB_VP_IMAGE_TYPE_U8C1. If it is 10-bit or 12-bit, the imageType should be set to HB_VP_IMAGE_TYPE_U16C1, indicating that the channel data is aligned to 16-bit storage.
Specifically, if the imageFormat is set to HB_VP_IMAGE_FORMAT_NV12_Y10C8_MSB or HB_VP_IMAGE_FORMAT_NV12_Y12C8_MSB, it means only the Y component has a pixel width of 10-bit or 12-bit and is aligned to 16-bit storage, while the UV components still have an 8-bit pixel width.
When the image is in multi-plane formats such as RGB_P, BGR_P, or YUV444_P, the imageType should be set according to the actual data type of the elements to the corresponding single-channel type. For example, for 3-channel multi-plane data in S16 format, choose HB_VP_IMAGE_TYPE_S16C1.
