DvppJpegEncode
Function Usage
JPEG encoding function of DVPP. Before calling this API, call Init to initialize this function.
- Maximum resolution of the input data: 8192 x 8192.
- Minimum resolution of the input data: 32 x 32.
- Format of the input data:
Atlas 200/300/500 inference product : YUV_SP_420 and YVU_SP_420 (nv12 and nv21).Atlas 200I/500 A2 inference product : supports YUV_SP_420 and YVU_SP_420 (nv12 and nv21).- Atlas inference product: YUV_SP_420, YVU_SP_420, RGB_888 and BGR_888 (nv12, nv21, rgb, and bgr). The resolution of the RGB (BGR) image format cannot exceed 4096 x 4096.
Prototype
1 | APP_ERROR DvppWrapper::DvppJpegEncode(DvppDataInfo& inputDataInfo, DvppDataInfo& outputDataInfo, uint32_t encodeLevel); |
1 | APP_ERROR DvppWrapper::DvppJpegEncode(DvppDataInfo& inputDataInfo, std::string outputPicPath, std::string outputPicName, uint32_t encodeLevel); |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
inputDataInfo |
Input |
Input data to be encoded |
outputDataInfo |
Output |
Output data after encoding |
outputPicPath |
Input |
Path of the generated image |
outputPicName |
Input |
Name of the generated image The .jpg extension is automatically generated for the finally generated image. If a .jpg file with the same name already exists in the target path, the generated image will overwrite the original one. |
encodeLevel |
Input |
Encoding quality level. Must be in the range of [0, 100]. The quality of level 0 is similar to that of level 100. A smaller value in the range of [1, 100] indicates poorer output image quality. |
Response Parameters
Data Structure |
Description |
|---|---|
APP_ERROR |
For details about the returned error codes, see APP_ERROR Description. |