From ed7e35f927d7d9e90a64c07920faf6150d31e30f Mon Sep 17 00:00:00 2001 From: changzherui Date: Tue, 26 Jan 2021 19:53:33 +0800 Subject: [PATCH] sync code 0125 .h --- inc/external/acl/ops/acl_dvpp.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/inc/external/acl/ops/acl_dvpp.h b/inc/external/acl/ops/acl_dvpp.h index 1a0f582d..8f5d3904 100644 --- a/inc/external/acl/ops/acl_dvpp.h +++ b/inc/external/acl/ops/acl_dvpp.h @@ -147,6 +147,17 @@ enum aclvencChannelDescParamType { ACL_VENC_MAX_IP_PROP_UINT32 }; +// Jpeg picture format +enum acldvppJpegFormat { + ACL_JPEG_CSS_444 = 0, + ACL_JPEG_CSS_422, + ACL_JPEG_CSS_420, + ACL_JPEG_CSS_GRAY, + ACL_JPEG_CSS_440, + ACL_JPEG_CSS_411, + ACL_JPEG_CSS_UNKNOWN = 1000 +}; + /** * @ingroup AscendCL * @brief alloc device memory for dvpp. @@ -1520,6 +1531,24 @@ ACL_FUNC_VISIBILITY aclError aclvdecDestroyFrameConfig(aclvdecFrameConfig *vdecF ACL_FUNC_VISIBILITY aclError acldvppJpegGetImageInfo(const void *data, uint32_t size, uint32_t *width, uint32_t *height, int32_t *components); +/** + * @ingroup AscendCL + * @brief Get image width and height of jpeg. + * + * @param data [IN] image data in host memory + * @param size [IN] the size of image data + * @param width [OUT] the width of image from image header + * @param height [OUT] the height of image from image header + * @param components [OUT] the components of image from image header + * @param format [OUT] the format of image from image header + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError acldvppJpegGetImageInfoV2(const void *data, uint32_t size, uint32_t *width, + uint32_t *height, int32_t *components, + acldvppJpegFormat *format); + /** * @ingroup AscendCL * @brief Predict encode size of jpeg image.