hbVPJPEGDecode
Parameter for JPEG decoding.
-
Member
Creates the decoder context API and initialize context to nullptr in advance before creation.
- Parameter
- [out]
contextThe decoder context. - [in]
paramPointer to the decoding parameter.
- [out]
- Return Value
- Return
0means the API was successfully executed, otherwise the execution failed.
- Return
- Description of interface limitations
- Due to hardware limitations, encoding requires alignment, and the decoded data will also follow the alignment requirements used during encoding. Specifically, the alignment method used during encoding (16x16 or 8x8) directly determines the decoded resolution, aligning it to multiples of 16x16 or 8x8.
- JPU supports the creation of contexts for the highest 64-way encoding or decoding for one core.
- JPU only support 8bit data decoding.
Release the decoder context API.
- Parameter
- [in]
contextThe decoder context.
- [in]
- Return Value
- Return
0means the API was successfully executed, otherwise the execution failed.
- Return
The API for calling the JPEG decoding.
- Parameter
- [out]
taskHandleTask handles are responsible for the interaction of the operator with the UCP architecture. - [in]
srcBufInput JPEG file. - [in]
contextThe decoder context.
- [out]
- Return Value
- Return
0means the API was successfully executed, otherwise the execution failed.
- Return
- Description of interface limitations
- When JPEG decoding, if the decoding format is
HB_VP_IMAGE_FORMAT_YUV444, the input JPEG data is required to be in the format ofHB_VP_IMAGE_FORMAT_YUV444orHB_VP_IMAGE_FORMAT_YUV444_P. - When decoding JPEG images, the supported resolution range is 32x32 to 8192x8192 pixels, and the input image size must fall within the range of [1024, 10 * 1024 * 1024] bytes.
- Only asynchronous task creation is supported.
- To avoid wasting system resources and improve JPU decoding performance, it is recommended to reuse input addresses.
- When JPEG decoding, if the decoding format is
The API for calling the JPEG decoding output buffer.
- Parameter
- [out]
outImgOutput YUV Image. - [in]
taskHandleTask handles are responsible for the interaction of the operator with the UCP architecture.
- [out]
- Return Value
- Return
0means the API was successfully executed, otherwise the execution failed.
- Return
- Description of interface limitations
- The Image buffer
outImgis allocated internally by the JPU. - The buffer contains valid data upon the task is successfully completed, and is released during the task release phase.
- The Image buffer
