17777dab0Sopenharmony_ci/*
27777dab0Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
37777dab0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47777dab0Sopenharmony_ci * you may not use this file except in compliance with the License.
57777dab0Sopenharmony_ci * You may obtain a copy of the License at
67777dab0Sopenharmony_ci *
77777dab0Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
87777dab0Sopenharmony_ci *
97777dab0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107777dab0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117777dab0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127777dab0Sopenharmony_ci * See the License for the specific language governing permissions and
137777dab0Sopenharmony_ci * limitations under the License.
147777dab0Sopenharmony_ci */
157777dab0Sopenharmony_ci
167777dab0Sopenharmony_ci/**
177777dab0Sopenharmony_ci * @addtogroup ImageProcessing
187777dab0Sopenharmony_ci * @{
197777dab0Sopenharmony_ci *
207777dab0Sopenharmony_ci * @brief Provide APIs for image quality processing.
217777dab0Sopenharmony_ci *
227777dab0Sopenharmony_ci * @since 13
237777dab0Sopenharmony_ci */
247777dab0Sopenharmony_ci
257777dab0Sopenharmony_ci/**
267777dab0Sopenharmony_ci * @file image_processing.h
277777dab0Sopenharmony_ci *
287777dab0Sopenharmony_ci * @brief Declare image processing functions.
297777dab0Sopenharmony_ci *
307777dab0Sopenharmony_ci * Provides SDR content processing for images, including color space conversion, metadata generation
317777dab0Sopenharmony_ci * and image scaling.
327777dab0Sopenharmony_ci *
337777dab0Sopenharmony_ci * @library libimage_processing.so
347777dab0Sopenharmony_ci * @syscap SystemCapability.Multimedia.VideoProcessingEngine
357777dab0Sopenharmony_ci * @kit ImageKit
367777dab0Sopenharmony_ci * @since 13
377777dab0Sopenharmony_ci */
387777dab0Sopenharmony_ci
397777dab0Sopenharmony_ci#ifndef VIDEO_PROCESSING_ENGINE_C_API_IMAGE_PROCESSING_H
407777dab0Sopenharmony_ci#define VIDEO_PROCESSING_ENGINE_C_API_IMAGE_PROCESSING_H
417777dab0Sopenharmony_ci
427777dab0Sopenharmony_ci#include <stdint.h>
437777dab0Sopenharmony_ci#include <stdbool.h>
447777dab0Sopenharmony_ci#include "image_processing_types.h"
457777dab0Sopenharmony_ci
467777dab0Sopenharmony_ci#ifdef __cplusplus
477777dab0Sopenharmony_ciextern "C" {
487777dab0Sopenharmony_ci#endif
497777dab0Sopenharmony_ci
507777dab0Sopenharmony_ci/**
517777dab0Sopenharmony_ci * @brief Initialize global environment for image processing.
527777dab0Sopenharmony_ci *
537777dab0Sopenharmony_ci * This function is optional. \n
547777dab0Sopenharmony_ci * Typically, this function is called once when the host process is started to initialize the global environment for
557777dab0Sopenharmony_ci * image processing, which can reduce the time of {@link OH_ImageProcessing_Create}. \n
567777dab0Sopenharmony_ci * To deinitialize global environment, call {@link OH_ImageProcessing_DeinitializeEnvironment}.
577777dab0Sopenharmony_ci *
587777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if initialization is successful. \n
597777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INITIALIZE_FAILED} if initialization is failed. \n
607777dab0Sopenharmony_ci * You can check if the device GPU is working properly.
617777dab0Sopenharmony_ci * @since 13
627777dab0Sopenharmony_ci */
637777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_InitializeEnvironment(void);
647777dab0Sopenharmony_ci
657777dab0Sopenharmony_ci/**
667777dab0Sopenharmony_ci * @brief Deinitialize global environment for image processing.
677777dab0Sopenharmony_ci *
687777dab0Sopenharmony_ci * This function is required if {@link OH_ImageProcessing_InitializeEnvironment} is called. Typically, this
697777dab0Sopenharmony_ci * function is called when the host process is about to exit to deinitialize the global environment, which is
707777dab0Sopenharmony_ci * initialized by calling {@link OH_ImageProcessing_InitializeEnvironment}. \n
717777dab0Sopenharmony_ci * If there is some image processing instance existing, this function should not be called. \n
727777dab0Sopenharmony_ci * If the {@link OH_ImageProcessing_InitializeEnvironment} is not called, this function should not be called.
737777dab0Sopenharmony_ci *
747777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if deinitialization is successful. \n
757777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_OPERATION_NOT_PERMITTED} if some image processing instance is not destroyed or
767777dab0Sopenharmony_ci * {@link OH_ImageProcessing_InitializeEnvironment} is not called. \n
777777dab0Sopenharmony_ci * @since 13
787777dab0Sopenharmony_ci */
797777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_DeinitializeEnvironment(void);
807777dab0Sopenharmony_ci
817777dab0Sopenharmony_ci/**
827777dab0Sopenharmony_ci * @brief Query whether the image color space conversion is supported.
837777dab0Sopenharmony_ci *
847777dab0Sopenharmony_ci * @param sourceImageInfo Input image color space information pointer.
857777dab0Sopenharmony_ci * @param destinationImageInfo Output image color space information pointer.
867777dab0Sopenharmony_ci * @return <b>true</b> if the color space conversion is supported. \n
877777dab0Sopenharmony_ci * <b>false</b> if the the color space conversion is unsupported.
887777dab0Sopenharmony_ci * @since 13
897777dab0Sopenharmony_ci */
907777dab0Sopenharmony_cibool OH_ImageProcessing_IsColorSpaceConversionSupported(
917777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* sourceImageInfo,
927777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* destinationImageInfo);
937777dab0Sopenharmony_ci
947777dab0Sopenharmony_ci/**
957777dab0Sopenharmony_ci * @brief Query whether the image composition is supported.
967777dab0Sopenharmony_ci *
977777dab0Sopenharmony_ci * @param sourceImageInfo Input image color space information pointer.
987777dab0Sopenharmony_ci * @param sourceGainmapInfo Input gainmap color space information pointer.
997777dab0Sopenharmony_ci * @param destinationImageInfo Output image color space information pointer.
1007777dab0Sopenharmony_ci * @return <b>true</b> if the image composition is supported. \n
1017777dab0Sopenharmony_ci * <b>false</b> if the image composition is unsupported.
1027777dab0Sopenharmony_ci * @since 13
1037777dab0Sopenharmony_ci */
1047777dab0Sopenharmony_cibool OH_ImageProcessing_IsCompositionSupported(
1057777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* sourceImageInfo,
1067777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* sourceGainmapInfo,
1077777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* destinationImageInfo);
1087777dab0Sopenharmony_ci
1097777dab0Sopenharmony_ci/**
1107777dab0Sopenharmony_ci * @brief Query whether the image decomposition is supported.
1117777dab0Sopenharmony_ci *
1127777dab0Sopenharmony_ci * @param sourceImageInfo Input image color space information pointer.
1137777dab0Sopenharmony_ci * @param destinationImageInfo Output image color space information pointer.
1147777dab0Sopenharmony_ci * @param destinationGainmapInfo Output gainmap information pointer.
1157777dab0Sopenharmony_ci * @return <b>true</b> if the image decomposition is supported. \n
1167777dab0Sopenharmony_ci * <b>false</b> if the image decomposition is unsupported.
1177777dab0Sopenharmony_ci * @since 13
1187777dab0Sopenharmony_ci */
1197777dab0Sopenharmony_cibool OH_ImageProcessing_IsDecompositionSupported(
1207777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* sourceImageInfo,
1217777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* destinationImageInfo,
1227777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* destinationGainmapInfo);
1237777dab0Sopenharmony_ci
1247777dab0Sopenharmony_ci/**
1257777dab0Sopenharmony_ci * @brief Query whether the image metadata generation is supported.
1267777dab0Sopenharmony_ci *
1277777dab0Sopenharmony_ci * @param sourceImageInfo Input image color space information pointer.
1287777dab0Sopenharmony_ci * @return <b>true</b> if the image metadata generation is supported.. \n
1297777dab0Sopenharmony_ci * <b>false</b> if the image metadata generation is unsupported.
1307777dab0Sopenharmony_ci * @since 13
1317777dab0Sopenharmony_ci */
1327777dab0Sopenharmony_cibool OH_ImageProcessing_IsMetadataGenerationSupported(
1337777dab0Sopenharmony_ci    const ImageProcessing_ColorSpaceInfo* sourceImageInfo);
1347777dab0Sopenharmony_ci
1357777dab0Sopenharmony_ci/**
1367777dab0Sopenharmony_ci * @brief Create an image processing instance.
1377777dab0Sopenharmony_ci *
1387777dab0Sopenharmony_ci * @param imageProcessor Output parameter. The *imageProcessor points to a new image processing object.
1397777dab0Sopenharmony_ci * The *imageProcessor must be null before passed in.
1407777dab0Sopenharmony_ci * @param type Use IMAGE_PROCESSING_TYPE_XXX to specify the processing type. The processing type of the instance can not
1417777dab0Sopenharmony_ci * be changed.
1427777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if creating an image processing successfully. \n
1437777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING} if the type is not supported. For example, if metadata
1447777dab0Sopenharmony_ci * generation is not supported by vendor, it returns unsupported processing. \n
1457777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_CREATE_FAILED} if failed to create an image processing. \n
1467777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or <b>*</b>instance is <b>not</b> null. \n
1477777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_PARAMETER} if type is invalid. \n
1487777dab0Sopenharmony_ci * @since 13
1497777dab0Sopenharmony_ci */
1507777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_Create(OH_ImageProcessing** imageProcessor, int32_t type);
1517777dab0Sopenharmony_ci
1527777dab0Sopenharmony_ci/**
1537777dab0Sopenharmony_ci * @brief Destroy the image processing instance.
1547777dab0Sopenharmony_ci *
1557777dab0Sopenharmony_ci * @param imageProcessor An image processing instance pointer. It is recommended setting the
1567777dab0Sopenharmony_ci * instance pointer to null after the instance is destroyed.
1577777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if the instance is destroyed successfully. \n
1587777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or not an image processing instance.
1597777dab0Sopenharmony_ci * @since 13
1607777dab0Sopenharmony_ci */
1617777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_Destroy(OH_ImageProcessing* imageProcessor);
1627777dab0Sopenharmony_ci
1637777dab0Sopenharmony_ci/**
1647777dab0Sopenharmony_ci * @brief Set parameter for image processing.
1657777dab0Sopenharmony_ci *
1667777dab0Sopenharmony_ci * Add parameter identified by the specified parameter key.
1677777dab0Sopenharmony_ci *
1687777dab0Sopenharmony_ci * @param imageProcessor An image processing instance pointer.
1697777dab0Sopenharmony_ci * @param parameter The parameter for image processing.
1707777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if setting parameter is successful. \n
1717777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or not an image processing instance. \n
1727777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_PARAMETER} if the parameter is null. \n
1737777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_VALUE} if some property of the parameter is invalid. For example, the parameter
1747777dab0Sopenharmony_ci * contains unsupported parameter key or value. \n
1757777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_NO_MEMORY} if memory allocation failed.
1767777dab0Sopenharmony_ci * @since 13
1777777dab0Sopenharmony_ci */
1787777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_SetParameter(OH_ImageProcessing* imageProcessor,
1797777dab0Sopenharmony_ci    const OH_AVFormat* parameter);
1807777dab0Sopenharmony_ci
1817777dab0Sopenharmony_ci/**
1827777dab0Sopenharmony_ci * @brief Get parameter of image processing.
1837777dab0Sopenharmony_ci *
1847777dab0Sopenharmony_ci * Get parameter identified by the specified parameter key.
1857777dab0Sopenharmony_ci *
1867777dab0Sopenharmony_ci * @param imageProcessor An image processing instance pointer.
1877777dab0Sopenharmony_ci * @param parameter The parameter used by the image processing instance.
1887777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if getting parameter is successful. \n
1897777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or not an image processing instance. \n
1907777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_PARAMETER} if the parameter is null. \n
1917777dab0Sopenharmony_ci * @since 13
1927777dab0Sopenharmony_ci */
1937777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_GetParameter(OH_ImageProcessing* imageProcessor,
1947777dab0Sopenharmony_ci    OH_AVFormat* parameter);
1957777dab0Sopenharmony_ci
1967777dab0Sopenharmony_ci/**
1977777dab0Sopenharmony_ci * @brief Conversion between single-layer images.
1987777dab0Sopenharmony_ci *
1997777dab0Sopenharmony_ci * The function generate the destinationImage from sourceImage. It include the colorspace conversion from
2007777dab0Sopenharmony_ci * HDR image to SDR image, SDR image to HDR image, SDR image to SDR image and HDR image to HDR image.
2017777dab0Sopenharmony_ci *
2027777dab0Sopenharmony_ci * @param imageProcessor An image processing instance pointer. The instance should be created with
2037777dab0Sopenharmony_ci * type {@link IMAGE_PROCESSING_TYPE_COLOR_SPACE_CONVERSION}.
2047777dab0Sopenharmony_ci * @param sourceImage Input image pointer.
2057777dab0Sopenharmony_ci * @param destinationImage Output image pointer.
2067777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if processing image is successful. \n
2077777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or not an image processing instance. \n
2087777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_PARAMETER} if the image is null. \n
2097777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_VALUE} if some property of image is invalid. For example, the color space
2107777dab0Sopenharmony_ci * of the image is unsupported. \n
2117777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING} if the processing is not supported. \n
2127777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_PROCESS_FAILED} if processing error occurs. \n
2137777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_NO_MEMORY} if memory allocation failed.
2147777dab0Sopenharmony_ci * @since 13
2157777dab0Sopenharmony_ci */
2167777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_ConvertColorSpace(OH_ImageProcessing* imageProcessor,
2177777dab0Sopenharmony_ci    OH_PixelmapNative* sourceImage, OH_PixelmapNative* destinationImage);
2187777dab0Sopenharmony_ci
2197777dab0Sopenharmony_ci/**
2207777dab0Sopenharmony_ci * @brief Composition from dual-layer HDR images to single-layer HDR images.
2217777dab0Sopenharmony_ci *
2227777dab0Sopenharmony_ci * The function generate the destinationImage from sourceImage and sourceGainmap.
2237777dab0Sopenharmony_ci *
2247777dab0Sopenharmony_ci * @param imageProcessor An image processing instance pointer. The instance should be created with
2257777dab0Sopenharmony_ci * type {@link IMAGE_PROCESSING_TYPE_COMPOSITION}.
2267777dab0Sopenharmony_ci * @param sourceImage Input image pointer.
2277777dab0Sopenharmony_ci * @param sourceGainmap Input gainmap pointer.
2287777dab0Sopenharmony_ci * @param destinationImage Output image pointer.
2297777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if processing image is successful. \n
2307777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or not an image processing instance. \n
2317777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_PARAMETER} if the image is null. \n
2327777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_VALUE} if some property of image is invalid. For example, the color space
2337777dab0Sopenharmony_ci * of the image is unsupported. \n
2347777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING} if the processing is not supported. \n
2357777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_PROCESS_FAILED} if processing error occurs. \n
2367777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_NO_MEMORY} if memory allocation failed.
2377777dab0Sopenharmony_ci * @since 13
2387777dab0Sopenharmony_ci */
2397777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_Compose(OH_ImageProcessing* imageProcessor,
2407777dab0Sopenharmony_ci    OH_PixelmapNative* sourceImage, OH_PixelmapNative* sourceGainmap, OH_PixelmapNative* destinationImage);
2417777dab0Sopenharmony_ci
2427777dab0Sopenharmony_ci/**
2437777dab0Sopenharmony_ci * @brief Decomposition from single-layer HDR images to dual-layer HDR images.
2447777dab0Sopenharmony_ci *
2457777dab0Sopenharmony_ci * The function generate the destinationImage and destinationGainmap from sourceImage.
2467777dab0Sopenharmony_ci *
2477777dab0Sopenharmony_ci * @param imageProcessor An image processing instance pointer. The instance should be created with
2487777dab0Sopenharmony_ci * type {@link IMAGE_PROCESSING_TYPE_DECOMPOSITION}.
2497777dab0Sopenharmony_ci * @param sourceImage Input image pointer.
2507777dab0Sopenharmony_ci * @param destinationImage Output image pointer.
2517777dab0Sopenharmony_ci * @param destinationGainmap Output gainmap pointer.
2527777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if processing image is successful. \n
2537777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or not an image processing instance. \n
2547777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_PARAMETER} if the image is null. \n
2557777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_VALUE} if some property of image is invalid. For example, the color space
2567777dab0Sopenharmony_ci * of the image is unsupported. \n
2577777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING} if the processing is not supported. \n
2587777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_PROCESS_FAILED} if processing error occurs. \n
2597777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_NO_MEMORY} if memory allocation failed.
2607777dab0Sopenharmony_ci * @since 13
2617777dab0Sopenharmony_ci */
2627777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_Decompose(OH_ImageProcessing* imageProcessor,
2637777dab0Sopenharmony_ci    OH_PixelmapNative* sourceImage, OH_PixelmapNative* destinationImage, OH_PixelmapNative* destinationGainmap);
2647777dab0Sopenharmony_ci
2657777dab0Sopenharmony_ci/**
2667777dab0Sopenharmony_ci * @brief Metadata Generation for HDR images.
2677777dab0Sopenharmony_ci *
2687777dab0Sopenharmony_ci * The function generate metadata for the sourceImage.
2697777dab0Sopenharmony_ci *
2707777dab0Sopenharmony_ci * @param imageProcessor An image processing instance pointer. The instance should be created with
2717777dab0Sopenharmony_ci * type {@link IMAGE_PROCESSING_TYPE_METADATA_GENERATION}.
2727777dab0Sopenharmony_ci * @param sourceImage Input image pointer.
2737777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if processing image is successful. \n
2747777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or not an image processing instance. \n
2757777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_PARAMETER} if the image is null. \n
2767777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_VALUE} if some property of image is invalid. For example, the color space
2777777dab0Sopenharmony_ci * of the image is unsupported. \n
2787777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING} if the processing is not supported. \n
2797777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_PROCESS_FAILED} if processing error occurs. \n
2807777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_NO_MEMORY} if memory allocation failed.
2817777dab0Sopenharmony_ci * @since 13
2827777dab0Sopenharmony_ci */
2837777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_GenerateMetadata(OH_ImageProcessing* imageProcessor,
2847777dab0Sopenharmony_ci    OH_PixelmapNative* sourceImage);
2857777dab0Sopenharmony_ci
2867777dab0Sopenharmony_ci/**
2877777dab0Sopenharmony_ci * @brief Clarity enhancement for images.
2887777dab0Sopenharmony_ci *
2897777dab0Sopenharmony_ci * The function generate the destinationImage from sourceImage with necessary scaling operation according to the size
2907777dab0Sopenharmony_ci * preset in the sourceImage and destinationImage. Different levels of scaling methonds are provided to balance
2917777dab0Sopenharmony_ci * performance and image quality.
2927777dab0Sopenharmony_ci *
2937777dab0Sopenharmony_ci * @param imageProcessor An image processing instance pointer. The instance should be created with
2947777dab0Sopenharmony_ci * type {@link IMAGE_PROCESSING_TYPE_DETAIL_ENHANCER}.
2957777dab0Sopenharmony_ci * @param sourceImage Input image pointer.
2967777dab0Sopenharmony_ci * @param destinationImage Output image pointer.
2977777dab0Sopenharmony_ci * @return {@link IMAGE_PROCESSING_SUCCESS} if processing image is successful. \n
2987777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_INSTANCE} if instance is null or not an image processing instance. \n
2997777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_PARAMETER} if the image is null. \n
3007777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_INVALID_VALUE} if some property of image is invalid. For example, the color space
3017777dab0Sopenharmony_ci * of the image is unsupported. \n
3027777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_UNSUPPORTED_PROCESSING} if the processing is not supported. \n
3037777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_PROCESS_FAILED} if processing error occurs. \n
3047777dab0Sopenharmony_ci * {@link IMAGE_PROCESSING_ERROR_NO_MEMORY} if memory allocation failed.
3057777dab0Sopenharmony_ci * @since 13
3067777dab0Sopenharmony_ci */
3077777dab0Sopenharmony_ciImageProcessing_ErrorCode OH_ImageProcessing_EnhanceDetail(OH_ImageProcessing* imageProcessor,
3087777dab0Sopenharmony_ci    OH_PixelmapNative* sourceImage, OH_PixelmapNative* destinationImage);
3097777dab0Sopenharmony_ci#ifdef __cplusplus
3107777dab0Sopenharmony_ci}
3117777dab0Sopenharmony_ci#endif
3127777dab0Sopenharmony_ci
3137777dab0Sopenharmony_ci#endif // VIDEO_PROCESSING_ENGINE_C_API_IMAGE_PROCESSING_H
3147777dab0Sopenharmony_ci/** @} */
315