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

PNGD Parameters

Input Parameter: PngInputInfoAPI

Table 1 Input parameter PngInputInfoAPI

Member Variable

Description

void* inputData

Address of the input image data.

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 128-pixel aligned. For details about HIAI_DVPP_DMalloc, see Matrix API Reference.

NOTICE:

When HIAI_DVPP_DMalloc is used to allocate a buffer, ensure that the size of the allocated buffer is the same as the value of the input parameter inputSize.

uint64_t inputSize

Input buffer length, which is used to verify the input data

void* address

Address of the input image data. The current version does not support this parameter.

uint64_t size

Length of the input buffer. The current version does not support this parameter.

int32_t transformFlag

Transform flag. The value 1 indicates that RGBA is converted into RGB, whereas the value 0 indicates that the original format is retained.

Output Parameter: PngOutputInfoAPI

Table 2 Output parameter PngOutputInfoAPI

Member Variable

Description

void* outputData

Address of the output image data. The current version does not support this parameter.

uint64_t outputSize

Address of the output image data. The current version does not support this parameter.

void* address

Address of the output buffer.

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 128-pixel aligned. For details about HIAI_DVPP_DMalloc, see Matrix API Reference.

NOTICE:

When HIAI_DVPP_DMalloc is used to allocate a buffer, ensure that the size of the allocated buffer is the same as the value of the input parameter outputSize.

uint64_t size

Buffer size

int32_t format

Output image format

  • 2: RGB output
  • 6: RGBA output

uint32_t width

Output image width

uint32_t high

Output image height

uint32_t widthAlign

Width alignment. Align the size of the buffer occupied by a line of image data to a 128-byte boundary. If the output format is RGB, multiply the width by 3 and align the result to a 128-byte boundary. If the output format is RGBA, multiply the width by 4 and align the result to a 128-byte boundary.

uint32_t highAlign

Height alignment. Currently, 16-byte alignment is used.