11bd4fe43Sopenharmony_ci/*
21bd4fe43Sopenharmony_ci * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
31bd4fe43Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
41bd4fe43Sopenharmony_ci * you may not use this file except in compliance with the License.
51bd4fe43Sopenharmony_ci * You may obtain a copy of the License at
61bd4fe43Sopenharmony_ci *
71bd4fe43Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
81bd4fe43Sopenharmony_ci *
91bd4fe43Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
101bd4fe43Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
111bd4fe43Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
121bd4fe43Sopenharmony_ci * See the License for the specific language governing permissions and
131bd4fe43Sopenharmony_ci * limitations under the License.
141bd4fe43Sopenharmony_ci */
151bd4fe43Sopenharmony_ci
161bd4fe43Sopenharmony_ci#ifndef _HI_API_TDE2_H_
171bd4fe43Sopenharmony_ci#define _HI_API_TDE2_H_
181bd4fe43Sopenharmony_ci
191bd4fe43Sopenharmony_ci#include "hi_type.h"
201bd4fe43Sopenharmony_ci#include "hi_tde_type.h"
211bd4fe43Sopenharmony_ci
221bd4fe43Sopenharmony_ci#ifdef __cplusplus
231bd4fe43Sopenharmony_ci#if __cplusplus
241bd4fe43Sopenharmony_ciextern "C" {
251bd4fe43Sopenharmony_ci#endif /* __cplusplus */
261bd4fe43Sopenharmony_ci#endif /* __cplusplus */
271bd4fe43Sopenharmony_ci
281bd4fe43Sopenharmony_ci#define HI_TDE_Open HI_TDE2_Open
291bd4fe43Sopenharmony_ci#define HI_TDE_Close HI_TDE2_Close
301bd4fe43Sopenharmony_ci#define HI_TDE_BeginJob HI_TDE2_BeginJob
311bd4fe43Sopenharmony_ci
321bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_Open(HI_VOID);
331bd4fe43Sopenharmony_ci
341bd4fe43Sopenharmony_ciHI_VOID HI_TDE2_Close(HI_VOID);
351bd4fe43Sopenharmony_ci
361bd4fe43Sopenharmony_ciTDE_HANDLE HI_TDE2_BeginJob(HI_VOID);
371bd4fe43Sopenharmony_ci
381bd4fe43Sopenharmony_ci/*
391bd4fe43Sopenharmony_ci * \brief Submits an existing TDE task.
401bd4fe43Sopenharmony_ci * \attention \n
411bd4fe43Sopenharmony_ci * Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob \n
421bd4fe43Sopenharmony_ci * to obtain a valid task handle. If the calling mode is set to block mode, and the API is returned due \n
431bd4fe43Sopenharmony_ci * to timeout or interruption, the operation continues till it is complete even though the API \n
441bd4fe43Sopenharmony_ci * called by the TDE is returned in advance.\n
451bd4fe43Sopenharmony_ci * The synchronization mode is not supported currently.\n
461bd4fe43Sopenharmony_ci * After a task is submitted, its handle becomes invalid. If the task is submitted again, \n
471bd4fe43Sopenharmony_ci * the error code HI_ERR_TDE_INVALID_HANDLE is returned. \n.
481bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
491bd4fe43Sopenharmony_ci * \param[in] bSync  Whether to submit a TDE task in synchronization mode.
501bd4fe43Sopenharmony_ci * \param[in] bBlock  Block flag.
511bd4fe43Sopenharmony_ci * \param[in] u32TimeOut  Timeout period 10 ms.
521bd4fe43Sopenharmony_ci * \retval ::HI_SUCCESS  A task is submitted successfully in non-block mode.
531bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The input task handle is invalid.
541bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_JOB_TIMEOUT  A task is not completed due to timeout.
551bd4fe43Sopenharmony_ci * \see \n
561bd4fe43Sopenharmony_ci * N/A
571bd4fe43Sopenharmony_ci */
581bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_EndJob(TDE_HANDLE s32Handle, HI_BOOL bSync, HI_BOOL bBlock, HI_U32 u32TimeOut);
591bd4fe43Sopenharmony_ci
601bd4fe43Sopenharmony_ci/*
611bd4fe43Sopenharmony_ci * \brief Cancels an operation added in a TDE task.
621bd4fe43Sopenharmony_ci * \attention \n
631bd4fe43Sopenharmony_ci * Before calling this API, you must call HI_TDE2_Open to start a TDE device and \n
641bd4fe43Sopenharmony_ci * call HI_TDE2_BeginJob to obtain a valid task handle.\n
651bd4fe43Sopenharmony_ci * A submitted task cannot be cancelled.\n
661bd4fe43Sopenharmony_ci * No operations can be added to cancelled tasks, because the cancelled tasks are invalid.\n
671bd4fe43Sopenharmony_ci * This API is called when an error occurs during TDE operation configuration.\n
681bd4fe43Sopenharmony_ci * \param[in] s32Handle Handle of a TDE task.
691bd4fe43Sopenharmony_ci * \retval 0 success.
701bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
711bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  The specified task cannot be cancelled because it has been submitted.
721bd4fe43Sopenharmony_ci * \see \n
731bd4fe43Sopenharmony_ci * N/A
741bd4fe43Sopenharmony_ci */
751bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_CancelJob(TDE_HANDLE s32Handle);
761bd4fe43Sopenharmony_ci
771bd4fe43Sopenharmony_ci/*
781bd4fe43Sopenharmony_ci * \brief Waits for the completion of a specified TDE task.
791bd4fe43Sopenharmony_ci * \attention \n
801bd4fe43Sopenharmony_ci * As a block interface, this API is blocked until the specified task is complete.\n
811bd4fe43Sopenharmony_ci * \param[in] s32Handle Handle of a TDE task.
821bd4fe43Sopenharmony_ci * \retval 0  The specified TDE task is not completed.
831bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
841bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
851bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_QUERY_TIMEOUT  The specified task is not completed due to timeout.
861bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION  The operation is not supported.
871bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INTERRUPT Blocked job was interrupted.
881bd4fe43Sopenharmony_ci * \see \n
891bd4fe43Sopenharmony_ci * N/A
901bd4fe43Sopenharmony_ci */
911bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_WaitForDone(TDE_HANDLE s32Handle);
921bd4fe43Sopenharmony_ci
931bd4fe43Sopenharmony_ci/*
941bd4fe43Sopenharmony_ci * \brief Waits for the completion of all TDE tasks.
951bd4fe43Sopenharmony_ci * \attention \n
961bd4fe43Sopenharmony_ci * As a block interface, this API is blocked until all TDE tasks are complete.\n
971bd4fe43Sopenharmony_ci * \param  N/A
981bd4fe43Sopenharmony_ci * \retval 0  The specified TDE task is not completed.
991bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
1001bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION  The operation is not supported.
1011bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INTERRUPT Blocked job was interrupted.
1021bd4fe43Sopenharmony_ci * N/A
1031bd4fe43Sopenharmony_ci */
1041bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_WaitAllDone(HI_VOID);
1051bd4fe43Sopenharmony_ci
1061bd4fe43Sopenharmony_ci/*
1071bd4fe43Sopenharmony_ci * \brief Resets all statuses of the TDE.
1081bd4fe43Sopenharmony_ci * \attention \n
1091bd4fe43Sopenharmony_ci * This API is used to reset software and hardware if a timeout error occurs due to \n
1101bd4fe43Sopenharmony_ci * the inconsistency of the software and hardware for standby wakeup.\n
1111bd4fe43Sopenharmony_ci * \param  N/A
1121bd4fe43Sopenharmony_ci * \retval 0  TDE reset successfully.
1131bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
1141bd4fe43Sopenharmony_ci * \see \n
1151bd4fe43Sopenharmony_ci * N/A
1161bd4fe43Sopenharmony_ci */
1171bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_Reset(HI_VOID);
1181bd4fe43Sopenharmony_ci
1191bd4fe43Sopenharmony_ci/*
1201bd4fe43Sopenharmony_ci * \brief Adds the fast copy operation to a TDE task.
1211bd4fe43Sopenharmony_ci * \attention \n
1221bd4fe43Sopenharmony_ci * HI_TDE2_QuickCopy adopts the direct memory access (DMA) transfer technology; therefore, \n
1231bd4fe43Sopenharmony_ci * HI_TDE2_QuickCopy is superior to HI_TDE2_Bitblit in transfer. \n
1241bd4fe43Sopenharmony_ci * Because the format conversion is not supported during fast copying, \n
1251bd4fe43Sopenharmony_ci * the formats of the source bitmap and the target bitmap must be the same.\n
1261bd4fe43Sopenharmony_ci * In addition, scaling is not supported during fast copying. If the operating area size of \n
1271bd4fe43Sopenharmony_ci * the source bitmap is different from that of the target bitmap, \n
1281bd4fe43Sopenharmony_ci * the copy and transfer operations are performed based on the minimum width and height.\n
1291bd4fe43Sopenharmony_ci * The specified operating area and the specified bitmap must have a public area; otherwise, \n
1301bd4fe43Sopenharmony_ci * an error is returned. This requirement is applicable to other operations.\n
1311bd4fe43Sopenharmony_ci * If the pixel format of a bitmap is greater than or equal to a byte, \n
1321bd4fe43Sopenharmony_ci * the base address and stride of the bitmap format must be aligned based on the pixel format. \n
1331bd4fe43Sopenharmony_ci * If the pixel format of a bitmap is smaller than a byte, the base address and \n
1341bd4fe43Sopenharmony_ci * stride of the bitmap must be aligned based on byte. This requirement is applicable to other operations.\n
1351bd4fe43Sopenharmony_ci * If the pixel format of a bitmap is smaller than a byte, \n
1361bd4fe43Sopenharmony_ci * the horizontal start point and width of the bitmap must be aligned based on pixel.\n
1371bd4fe43Sopenharmony_ci * The horizontal start point and width of the YCbCr422 bitmap must be even numbers. \n
1381bd4fe43Sopenharmony_ci * This requirement is applicable to other operations.\n
1391bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
1401bd4fe43Sopenharmony_ci * \param[in] pstSrc  Source bitmap.
1411bd4fe43Sopenharmony_ci * \param[in] pstSrcRect  Operating area of the source bitmap.
1421bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
1431bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
1441bd4fe43Sopenharmony_ci * \retval 0 success.
1451bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
1461bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
1471bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
1481bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
1491bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
1501bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
1511bd4fe43Sopenharmony_ci * \see \n
1521bd4fe43Sopenharmony_ci * N/A
1531bd4fe43Sopenharmony_ci */
1541bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_QuickCopy(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstSrc, const TDE2_RECT_S *pstSrcRect,
1551bd4fe43Sopenharmony_ci                         const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect);
1561bd4fe43Sopenharmony_ci
1571bd4fe43Sopenharmony_ci/*
1581bd4fe43Sopenharmony_ci * \brief Rapidly fills in the target bitmap with a fixed value.
1591bd4fe43Sopenharmony_ci * \attention \n
1601bd4fe43Sopenharmony_ci * The data to be filled in must be specified based on the format of the target bitmap.\n
1611bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
1621bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
1631bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
1641bd4fe43Sopenharmony_ci * \param[in] u32FillData  Data to be filled in.
1651bd4fe43Sopenharmony_ci * \retval 0 success.
1661bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
1671bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
1681bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
1691bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
1701bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
1711bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
1721bd4fe43Sopenharmony_ci * \see \n
1731bd4fe43Sopenharmony_ci * N/A
1741bd4fe43Sopenharmony_ci */
1751bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_QuickFill(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect,
1761bd4fe43Sopenharmony_ci                         HI_U32 u32FillData);
1771bd4fe43Sopenharmony_ci
1781bd4fe43Sopenharmony_ci/*
1791bd4fe43Sopenharmony_ci * \brief Scales the source bitmap based on a specified size of the target bitmap.
1801bd4fe43Sopenharmony_ci * The source bitmap and target bitmap can be the same. \n
1811bd4fe43Sopenharmony_ci * \attention \n
1821bd4fe43Sopenharmony_ci * The maximum minification is smaller than 256, there is no limit on magnification, \n
1831bd4fe43Sopenharmony_ci * but the max size of the bitmap is 4095*4095\n
1841bd4fe43Sopenharmony_ci * You can scale a bitmap that serves as both source bitmap and target bitmap. \n
1851bd4fe43Sopenharmony_ci * If the memories for storing the source bitmap and target bitmap overlap, the bitmaps cannot be scaled.\n
1861bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
1871bd4fe43Sopenharmony_ci * \param[in] pstSrc  Source bitmap.
1881bd4fe43Sopenharmony_ci * \param[in] pstSrcRect  Operating area of the source bitmap.
1891bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
1901bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
1911bd4fe43Sopenharmony_ci * \retval 0 success.
1921bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
1931bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
1941bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
1951bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
1961bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
1971bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NOT_ALIGNED  The start address or stride of the bitmap is not aligned based on pixel.
1981bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_MINIFICATION  The start address or stride of the bitmap is not aligned based on pixel.
1991bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NOT_ALIGNED  The start address of the color look-up table (CLUT) is not 4-byte aligned.
2001bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION  The operation is not supported.
2011bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
2021bd4fe43Sopenharmony_ci * \see \n
2031bd4fe43Sopenharmony_ci * N/A
2041bd4fe43Sopenharmony_ci */
2051bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_QuickResize(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstSrc, const TDE2_RECT_S *pstSrcRect,
2061bd4fe43Sopenharmony_ci                           const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect);
2071bd4fe43Sopenharmony_ci
2081bd4fe43Sopenharmony_ci/*
2091bd4fe43Sopenharmony_ci * \brief Adds the anti-flicker operation to a TDE task.
2101bd4fe43Sopenharmony_ci * \attention \n
2111bd4fe43Sopenharmony_ci * The anti-flicker operation supports vertical filtering only.\n
2121bd4fe43Sopenharmony_ci * The anti-flicker operation can be performed on the source bitmap \n
2131bd4fe43Sopenharmony_ci * and target bitmap that are stored in the same memory.\n
2141bd4fe43Sopenharmony_ci * If the sizes of the specified input area and output area are different, scaling is performed.\n
2151bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
2161bd4fe43Sopenharmony_ci * \param[in] pstSrc  Source bitmap.
2171bd4fe43Sopenharmony_ci * \param[in] pstSrcRect  Operating area of the source bitmap.
2181bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
2191bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
2201bd4fe43Sopenharmony_ci * \retval 0 success.
2211bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
2221bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
2231bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
2241bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
2251bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
2261bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NOT_ALIGNED  The start address or stride of the bitmap is not aligned based on pixel.
2271bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION  The operation is not supported.
2281bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_MINIFICATION  The minification is too large.
2291bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
2301bd4fe43Sopenharmony_ci * \see \n
2311bd4fe43Sopenharmony_ci * N/A
2321bd4fe43Sopenharmony_ci */
2331bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_QuickDeflicker(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstSrc, const TDE2_RECT_S *pstSrcRect,
2341bd4fe43Sopenharmony_ci                              const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect);
2351bd4fe43Sopenharmony_ci
2361bd4fe43Sopenharmony_ci/*
2371bd4fe43Sopenharmony_ci * \brief Adds the transfer operation (with additional functions available for the raster or
2381bd4fe43Sopenharmony_ci * macroblock bitmap) to a TDE task.
2391bd4fe43Sopenharmony_ci * \attention \n
2401bd4fe43Sopenharmony_ci * Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to \n
2411bd4fe43Sopenharmony_ci * obtain a valid task handle. If the sizes of the foreground bitmap and target bitmap are different, \n
2421bd4fe43Sopenharmony_ci * scaling is performed based on the preset scaling area. If no scaling area is set, \n
2431bd4fe43Sopenharmony_ci * the clip and transfer operations are performed based on the minimum value of the public area.\n
2441bd4fe43Sopenharmony_ci * The value of the global alpha, Alpha0, or Alpha1 ranges from 0 to 255.\n
2451bd4fe43Sopenharmony_ci * The background bitmap and the target bitmap can be the same.\n
2461bd4fe43Sopenharmony_ci * If only the single-source transfer operation with additional functions, \n
2471bd4fe43Sopenharmony_ci * you can set the structure information and the pointer of the \n
2481bd4fe43Sopenharmony_ci * operating area of the background or the background bitmap to null,\n
2491bd4fe43Sopenharmony_ci * but the pointer to the operation option type can't be null,and it doesn't support ColorKey and Blend.\n
2501bd4fe43Sopenharmony_ci * Scaling is not supported if the mirror function is enabled.\n
2511bd4fe43Sopenharmony_ci * If only the single-source transfer operation (for example, \n
2521bd4fe43Sopenharmony_ci * performing the ROP and reverse operations on the source bitmap only) is required, \n
2531bd4fe43Sopenharmony_ci * you can set the structure information and the pointer of the operating area of the background or \n
2541bd4fe43Sopenharmony_ci * the background bitmap to null. Scaling is not supported if the mirror function is enabled.\n
2551bd4fe43Sopenharmony_ci * The clip operation can be performed only when the clipping area overlaps the operating area; otherwise,
2561bd4fe43Sopenharmony_ci   an error occurs.\n
2571bd4fe43Sopenharmony_ci * When the color extension (from CLUT to ARGB/AYCbCr) is performed for the first time,
2581bd4fe43Sopenharmony_ci * the CLUT Reload flag function must be enabled.\n
2591bd4fe43Sopenharmony_ci * During a simple transfer operation (the operation does not contain additional \n
2601bd4fe43Sopenharmony_ci * functions and the pixel format of source and target bitmaps are the same), you can set the pointer to \n
2611bd4fe43Sopenharmony_ci * the operation option type to null. Then fast transfer is implemented.\n
2621bd4fe43Sopenharmony_ci * The pixel format of the target bitmap cannot be the macroblock format.\n
2631bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
2641bd4fe43Sopenharmony_ci * \param[in] pstBackGround  Background bitmap.
2651bd4fe43Sopenharmony_ci * \param[in] pstBackGroundRect  Operating area of the background bitmap.
2661bd4fe43Sopenharmony_ci * \param[in] pstForeGround  Foreground bitmap.
2671bd4fe43Sopenharmony_ci * \param[in] pstForeGroundRect  Operating area of the foreground bitmap.
2681bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
2691bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
2701bd4fe43Sopenharmony_ci * \param[in] pstOpt  Structure for setting operation parameters.
2711bd4fe43Sopenharmony_ci * \retval 0 success.
2721bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
2731bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
2741bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
2751bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
2761bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
2771bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NOT_ALIGNED  The start address of the CLUT is not 4-byte aligned.
2781bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_MINIFICATION  The minification is too large.
2791bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION  The bitmap does not support this operation.
2801bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_CLIP_AREA  The operating area does not overlap the clipping area,
2811bd4fe43Sopenharmony_ci * and the displayed information is not updated.
2821bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
2831bd4fe43Sopenharmony_ci * \see \n
2841bd4fe43Sopenharmony_ci * N/A
2851bd4fe43Sopenharmony_ci */
2861bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_Bitblit(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstBackGround, const TDE2_RECT_S *pstBackGroundRect,
2871bd4fe43Sopenharmony_ci                       const TDE2_SURFACE_S *pstForeGround, const TDE2_RECT_S *pstForeGroundRect,
2881bd4fe43Sopenharmony_ci                       const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect, const TDE2_OPT_S *pstOpt);
2891bd4fe43Sopenharmony_ci
2901bd4fe43Sopenharmony_ci/*
2911bd4fe43Sopenharmony_ci * \brief Adds the fill and transfer operations (with additional functions available for the
2921bd4fe43Sopenharmony_ci    raster bitmap) to a TDE task. \n
2931bd4fe43Sopenharmony_ci * After addition, the functions of drawing a point, drawing a line, filling in a color block on the surface, \n
2941bd4fe43Sopenharmony_ci * and filling in a memory can be implemented.
2951bd4fe43Sopenharmony_ci * \attention \n
2961bd4fe43Sopenharmony_ci * Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to
2971bd4fe43Sopenharmony_ci   obtain a valid task handle.\n
2981bd4fe43Sopenharmony_ci * When the foreground bitmap is null, the functions of this API are the same as those of HI_TDE2_QuickFil.\n
2991bd4fe43Sopenharmony_ci * During solid drawing, the foreground bitmap supports the colorkey operation only.\n
3001bd4fe43Sopenharmony_ci * To draw a rectangle, a vertical line, or a horizontal line by calling HI_TDE2_SolidDraw, \n
3011bd4fe43Sopenharmony_ci * you need to set the width and height of the filled rectangle. For example, drawing a vertical \n
3021bd4fe43Sopenharmony_ci * line is to draw a rectangle with the width of one pixel.
3031bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
3041bd4fe43Sopenharmony_ci * \param[in] pstForeGround  Foreground bitmap.
3051bd4fe43Sopenharmony_ci * \param[in] pstForeGroundRect  Operating area of the foreground bitmap.
3061bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
3071bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
3081bd4fe43Sopenharmony_ci * \param[in] pstFillColor  Structure of fill colors.
3091bd4fe43Sopenharmony_ci * \param[in] pstOpt  Structure of operation attributes.
3101bd4fe43Sopenharmony_ci * \retval 0 success.
3111bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
3121bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
3131bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
3141bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
3151bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
3161bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NOT_ALIGNED  The start address of the CLUT is not 4-byte aligned.
3171bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_MINIFICATION  The minification is too large.
3181bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION  The bitmap does not support this operation.
3191bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_CLIP_AREA  The operating area does not overlap the clipping area,
3201bd4fe43Sopenharmony_ci   and the displayed information is not updated.
3211bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
3221bd4fe43Sopenharmony_ci * \see \n
3231bd4fe43Sopenharmony_ci * N/A
3241bd4fe43Sopenharmony_ci */
3251bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_SolidDraw(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstForeGround,
3261bd4fe43Sopenharmony_ci    const TDE2_RECT_S *pstForeGroundRect, const TDE2_SURFACE_S *pstDst,
3271bd4fe43Sopenharmony_ci    const TDE2_RECT_S *pstDstRect, const TDE2_FILLCOLOR_S *pstFillColor, const TDE2_OPT_S *pstOpt);
3281bd4fe43Sopenharmony_ci
3291bd4fe43Sopenharmony_ci/*
3301bd4fe43Sopenharmony_ci * \brief Adds the transfer operation (with additional functions available for the macroblock bitmap) \n
3311bd4fe43Sopenharmony_ci * to a TDE task. That is, the luminance macroblock data and the chrominance macroblock data are combined
3321bd4fe43Sopenharmony_ci   into raster data. \n
3331bd4fe43Sopenharmony_ci * During the combination, the scaling, anti-flicker, and clip operations can be performed concurrently.
3341bd4fe43Sopenharmony_ci * \attention \n
3351bd4fe43Sopenharmony_ci * Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob
3361bd4fe43Sopenharmony_ci   to obtain a valid task handle.\n
3371bd4fe43Sopenharmony_ci * For the YCbCr422 macroblock, the horizontal coordination of the start point and the width of the
3381bd4fe43Sopenharmony_ci   operating area must be an even number.\n
3391bd4fe43Sopenharmony_ci * The pixel format of the target bitmap cannot be the macroblock format.\n
3401bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
3411bd4fe43Sopenharmony_ci * \param[in] pstMB  Surface of a macroblock.
3421bd4fe43Sopenharmony_ci * \param[in] pstMbRect  Operating area of a macroblock.
3431bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
3441bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
3451bd4fe43Sopenharmony_ci * \param[in] pstMbOpt  Operation attributes of a macroblock.
3461bd4fe43Sopenharmony_ci * \retval 0 success.
3471bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
3481bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
3491bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
3501bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
3511bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
3521bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_MINIFICATION  The minification is too large because its maximum value is 255.
3531bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION  The bitmap does not support this operation.
3541bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_CLIP_AREA  The operating area does not overlap the clipping area,
3551bd4fe43Sopenharmony_ci * and the displayed information is not updated.
3561bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
3571bd4fe43Sopenharmony_ci * \see \n
3581bd4fe43Sopenharmony_ci * N/A
3591bd4fe43Sopenharmony_ci */
3601bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_MbBlit(TDE_HANDLE s32Handle, const TDE2_MB_S *pstMB, const TDE2_RECT_S *pstMbRect,
3611bd4fe43Sopenharmony_ci                      const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect, const TDE2_MBOPT_S *pstMbOpt);
3621bd4fe43Sopenharmony_ci
3631bd4fe43Sopenharmony_ci/*
3641bd4fe43Sopenharmony_ci * \brief Adds the mask raster of operation (ROP) (available for the raster bitmap) to a TDE task. That is, \n
3651bd4fe43Sopenharmony_ci * the ROP operation is performed on the foreground bitmap and the background bitmap based on the mask bitmap.
3661bd4fe43Sopenharmony_ci * \attention \n
3671bd4fe43Sopenharmony_ci * Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob
3681bd4fe43Sopenharmony_ci   to obtain a valid task handle.\n
3691bd4fe43Sopenharmony_ci * The sizes of the operating areas of the mask bitmap, foreground bitmap, and background bitmap must be the same.\n
3701bd4fe43Sopenharmony_ci * The mask bitmap must be in A1 format.\n
3711bd4fe43Sopenharmony_ci * The target bitmap and foreground bitmap must be in the same color space.\n
3721bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
3731bd4fe43Sopenharmony_ci * \param[in] pstBackGround  Background bitmap.
3741bd4fe43Sopenharmony_ci * \param[in] pstBackGroundRect  Operating area of the background bitmap.
3751bd4fe43Sopenharmony_ci * \param[in] pstForeGround  Foreground bitmap.
3761bd4fe43Sopenharmony_ci * \param[in] pstForeGroundRect  Operating area of the foreground bitmap.
3771bd4fe43Sopenharmony_ci * \param[in] pstMask  Mask bitmap.
3781bd4fe43Sopenharmony_ci * \param[in] pstMaskRect  Operating area of the mask bitmap.
3791bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
3801bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
3811bd4fe43Sopenharmony_ci * \param[in] enRopCode_Color  ROP code of a color component.
3821bd4fe43Sopenharmony_ci * \param[in] enRopCode_Alpha  ROP code of the alpha component.
3831bd4fe43Sopenharmony_ci * \retval 0 success.
3841bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
3851bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
3861bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
3871bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
3881bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
3891bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
3901bd4fe43Sopenharmony_ci * \see \n
3911bd4fe43Sopenharmony_ci * N/A
3921bd4fe43Sopenharmony_ci */
3931bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_BitmapMaskRop(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstBackGround,
3941bd4fe43Sopenharmony_ci                             const TDE2_RECT_S *pstBackGroundRect, const TDE2_SURFACE_S *pstForeGround,
3951bd4fe43Sopenharmony_ci                             const TDE2_RECT_S *pstForeGroundRect, const TDE2_SURFACE_S *pstMask,
3961bd4fe43Sopenharmony_ci                             const TDE2_RECT_S *pstMaskRect, const TDE2_SURFACE_S *pstDst,
3971bd4fe43Sopenharmony_ci                             const TDE2_RECT_S *pstDstRect, TDE2_ROP_CODE_E enRopCode_Color,
3981bd4fe43Sopenharmony_ci                             TDE2_ROP_CODE_E enRopCode_Alpha);
3991bd4fe43Sopenharmony_ci
4001bd4fe43Sopenharmony_ci/*
4011bd4fe43Sopenharmony_ci * \brief Adds the mask blend operation (available for the raster bitmap) to a TDE task. That is, \n
4021bd4fe43Sopenharmony_ci * the foreground bitmap and the background bitmap are blending with the mask bitmap based on the mask bitmap.
4031bd4fe43Sopenharmony_ci * \attention \n
4041bd4fe43Sopenharmony_ci * Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to
4051bd4fe43Sopenharmony_ci   obtain a valid task handle.\n
4061bd4fe43Sopenharmony_ci * The target bitmap and background bitmap must be in the same color space.\n
4071bd4fe43Sopenharmony_ci * If the foreground bitmap contains the premultiplied data, the premultiplied mode must \n
4081bd4fe43Sopenharmony_ci * be selected during alpha blending; otherwise, the non-premultiplied mode is selected.
4091bd4fe43Sopenharmony_ci * The parameter enBlendMode cannot be set to TDE2_ALUCMD_ROP.\n
4101bd4fe43Sopenharmony_ci * \param[in] s32Handle   Handle of a TDE task.
4111bd4fe43Sopenharmony_ci * \param[in] pstBackGround  Background bitmap.
4121bd4fe43Sopenharmony_ci * \param[in] pstBackGroundRect  Operating area of the background bitmap.
4131bd4fe43Sopenharmony_ci * \param[in] pstForeGround  Foreground bitmap.
4141bd4fe43Sopenharmony_ci * \param[in] pstForeGroundRect  Operating area of the foreground bitmap.
4151bd4fe43Sopenharmony_ci * \param[in] pstMask  Mask bitmap.
4161bd4fe43Sopenharmony_ci * \param[in] pstMaskRect  Operating area of the mask bitmap.
4171bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
4181bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating area of the target bitmap.
4191bd4fe43Sopenharmony_ci * \param[in] u8Alpha  Global alpha value during alpha blending.
4201bd4fe43Sopenharmony_ci * \param[in] enBlendMode  Alpha blending mode.
4211bd4fe43Sopenharmony_ci * \retval 0 success.
4221bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
4231bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
4241bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
4251bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
4261bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NO_MEM  Adding an operation fails due to insufficient memory.
4271bd4fe43Sopenharmony_ci * \retval ::HI_FAILURE  A system error or an unknown error occurs.
4281bd4fe43Sopenharmony_ci * \see \n
4291bd4fe43Sopenharmony_ci * N/A
4301bd4fe43Sopenharmony_ci */
4311bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_BitmapMaskBlend(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstBackGround,
4321bd4fe43Sopenharmony_ci                               const TDE2_RECT_S *pstBackGroundRect, const TDE2_SURFACE_S *pstForeGround,
4331bd4fe43Sopenharmony_ci                               const TDE2_RECT_S *pstForeGroundRect, const TDE2_SURFACE_S *pstMask,
4341bd4fe43Sopenharmony_ci                               const TDE2_RECT_S *pstMaskRect, const TDE2_SURFACE_S *pstDst,
4351bd4fe43Sopenharmony_ci                               const TDE2_RECT_S *pstDstRect, HI_U8 u8Alpha, TDE2_ALUCMD_E enBlendMode);
4361bd4fe43Sopenharmony_ci
4371bd4fe43Sopenharmony_ci/*
4381bd4fe43Sopenharmony_ci * \brief  Adds the rotation operation to a TDE task.
4391bd4fe43Sopenharmony_ci * \attention \n
4401bd4fe43Sopenharmony_ci * The pixel formats of the source bitmap and target bitmap must be the same, and the format
4411bd4fe43Sopenharmony_ci   cannot be YUV, CLUT1, or CLUT4.\n
4421bd4fe43Sopenharmony_ci * The parameters s32DstPointX and s32DstPointY are set to 0 by default. \n
4431bd4fe43Sopenharmony_ci * Because the two parameters are not used at present, they can be set to any values.\n
4441bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
4451bd4fe43Sopenharmony_ci * \param[in] pstSrc  Source bitmap.
4461bd4fe43Sopenharmony_ci * \param[in] pstSrcRect  Operating area of the source bitmap.
4471bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
4481bd4fe43Sopenharmony_ci * \param[in] s32DstPointX  Horizontal coordinate of the start point of the operating area in the target bitmap.
4491bd4fe43Sopenharmony_ci * \param[in] s32DstPointY  Vertical coordinate of the start point of the operating area in the target bitmap.
4501bd4fe43Sopenharmony_ci * \param[in] enRotateAngle  Rotate angle.
4511bd4fe43Sopenharmony_ci * \retval 0 success.
4521bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_DEV_NOT_OPEN  Calling this API fails because no TDE device is started.
4531bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_HANDLE  The handle of a TDE task is invalid.
4541bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_NULL_PTR  The parameter contains a null pointer.
4551bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION  The operation is not supported.
4561bd4fe43Sopenharmony_ci * \retval ::HI_ERR_TDE_INVALID_PARA  The parameter is invalid.
4571bd4fe43Sopenharmony_ci * \see \n
4581bd4fe43Sopenharmony_ci * N/A
4591bd4fe43Sopenharmony_ci */
4601bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_Rotate(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstSrc, const TDE2_RECT_S *pstSrcRect,
4611bd4fe43Sopenharmony_ci                      const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect, TDE_ROTATE_ANGLE_E enRotateAngle);
4621bd4fe43Sopenharmony_ci
4631bd4fe43Sopenharmony_ci/*
4641bd4fe43Sopenharmony_ci * \brief Sets the anti-flicker level.
4651bd4fe43Sopenharmony_ci * \attention \n
4661bd4fe43Sopenharmony_ci * N/A
4671bd4fe43Sopenharmony_ci * \param[in] enDeflickerLevel  Anti-flicker level.
4681bd4fe43Sopenharmony_ci * \retval 0 success.
4691bd4fe43Sopenharmony_ci * \retval ::
4701bd4fe43Sopenharmony_ci * \see none
4711bd4fe43Sopenharmony_ci */
4721bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_SetDeflickerLevel(TDE_DEFLICKER_LEVEL_E enDeflickerLevel);
4731bd4fe43Sopenharmony_ci
4741bd4fe43Sopenharmony_ci/*
4751bd4fe43Sopenharmony_ci * \brief Obtains the anti-flicker level.
4761bd4fe43Sopenharmony_ci * \attention \n
4771bd4fe43Sopenharmony_ci * N/A
4781bd4fe43Sopenharmony_ci * \param[in] pDeflickerLevel  Anti-flicker level.
4791bd4fe43Sopenharmony_ci * \retval 0 success.
4801bd4fe43Sopenharmony_ci * \retval ::
4811bd4fe43Sopenharmony_ci * \see \n
4821bd4fe43Sopenharmony_ci * N/A
4831bd4fe43Sopenharmony_ci */
4841bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_GetDeflickerLevel(TDE_DEFLICKER_LEVEL_E *pDeflickerLevel);
4851bd4fe43Sopenharmony_ci
4861bd4fe43Sopenharmony_ci/*
4871bd4fe43Sopenharmony_ci * \brief Sets the alpha judgment threshold.
4881bd4fe43Sopenharmony_ci * \attention \n
4891bd4fe43Sopenharmony_ci * N/A
4901bd4fe43Sopenharmony_ci * \param[in] u8ThresholdValue  Judgment threshold.
4911bd4fe43Sopenharmony_ci * \retval 0 success.
4921bd4fe43Sopenharmony_ci * \retval ::
4931bd4fe43Sopenharmony_ci * \see \n
4941bd4fe43Sopenharmony_ci * N/A
4951bd4fe43Sopenharmony_ci */
4961bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_SetAlphaThresholdValue(HI_U8 u8ThresholdValue);
4971bd4fe43Sopenharmony_ci
4981bd4fe43Sopenharmony_ci/*
4991bd4fe43Sopenharmony_ci * \brief Obtains the alpha judgment threshold.
5001bd4fe43Sopenharmony_ci * \attention \n
5011bd4fe43Sopenharmony_ci * N/A
5021bd4fe43Sopenharmony_ci * \param[in] pu8ThresholdValue  Judgment threshold.
5031bd4fe43Sopenharmony_ci * \retval 0 success.
5041bd4fe43Sopenharmony_ci * \retval ::
5051bd4fe43Sopenharmony_ci * \see \n
5061bd4fe43Sopenharmony_ci * N/A
5071bd4fe43Sopenharmony_ci */
5081bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_GetAlphaThresholdValue(HI_U8 *pu8ThresholdValue);
5091bd4fe43Sopenharmony_ci
5101bd4fe43Sopenharmony_ci/*
5111bd4fe43Sopenharmony_ci * \brief Enables or disables the alpha judgment.
5121bd4fe43Sopenharmony_ci * \attention  N/A
5131bd4fe43Sopenharmony_ci * \param[in] bEnAlphaThreshold  Whether to enable the alpha judgment.
5141bd4fe43Sopenharmony_ci * \retval 0 success.
5151bd4fe43Sopenharmony_ci * \retval ::
5161bd4fe43Sopenharmony_ci * \see \n
5171bd4fe43Sopenharmony_ci * N/A
5181bd4fe43Sopenharmony_ci */
5191bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_SetAlphaThresholdState(HI_BOOL bEnAlphaThreshold);
5201bd4fe43Sopenharmony_ci
5211bd4fe43Sopenharmony_ci/*
5221bd4fe43Sopenharmony_ci * \brief Obtains the enable status of the alpha judgment.
5231bd4fe43Sopenharmony_ci * \attention N/A
5241bd4fe43Sopenharmony_ci * \param[in]  p_bEnAlphaThreshold  Whether to enable the alpha judgment.
5251bd4fe43Sopenharmony_ci * \retval 0 success.
5261bd4fe43Sopenharmony_ci * \retval ::
5271bd4fe43Sopenharmony_ci * \see \n
5281bd4fe43Sopenharmony_ci * N/A
5291bd4fe43Sopenharmony_ci */
5301bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_GetAlphaThresholdState(HI_BOOL *p_bEnAlphaThreshold);
5311bd4fe43Sopenharmony_ci
5321bd4fe43Sopenharmony_ci/*
5331bd4fe43Sopenharmony_ci * \brief Fills in the pattern.
5341bd4fe43Sopenharmony_ci * \attention N/A
5351bd4fe43Sopenharmony_ci * \param[in] s32Handle  Handle of a TDE task.
5361bd4fe43Sopenharmony_ci * \param[in] pstBackGround  Background bitmap.
5371bd4fe43Sopenharmony_ci * \param[in] pstBackGroundRect  Operating rectangle of the background bitmap.
5381bd4fe43Sopenharmony_ci * \param[in] pstForeGround  Foreground bitmap.
5391bd4fe43Sopenharmony_ci * \param[in] pstForeGroundRect  Operating rectangle of the foreground bitmap.
5401bd4fe43Sopenharmony_ci * \param[in] pstDst  Target bitmap.
5411bd4fe43Sopenharmony_ci * \param[in] pstDstRect  Operating rectangle of the target bitmap.
5421bd4fe43Sopenharmony_ci * \param[in] pstOpt  Options for pattern filling.
5431bd4fe43Sopenharmony_ci * \retval 0 success.
5441bd4fe43Sopenharmony_ci * \retval ::
5451bd4fe43Sopenharmony_ci * \see \n
5461bd4fe43Sopenharmony_ci * N/A
5471bd4fe43Sopenharmony_ci */
5481bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_PatternFill(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstBackGround,
5491bd4fe43Sopenharmony_ci                           const TDE2_RECT_S *pstBackGroundRect, const TDE2_SURFACE_S *pstForeGround,
5501bd4fe43Sopenharmony_ci                           const TDE2_RECT_S *pstForeGroundRect, const TDE2_SURFACE_S *pstDst,
5511bd4fe43Sopenharmony_ci                           const TDE2_RECT_S *pstDstRect, const TDE2_PATTERN_FILL_OPT_S *pstOpt);
5521bd4fe43Sopenharmony_ci
5531bd4fe43Sopenharmony_ci/*
5541bd4fe43Sopenharmony_ci * \brief Enables or disables the regional anti-flicker function.
5551bd4fe43Sopenharmony_ci * \attention N/A
5561bd4fe43Sopenharmony_ci * \param[in] bRegionDeflicker  Enable/disable flag.
5571bd4fe43Sopenharmony_ci * \retval 0 success.
5581bd4fe43Sopenharmony_ci * \retval ::
5591bd4fe43Sopenharmony_ci * \see \n
5601bd4fe43Sopenharmony_ci * N/A
5611bd4fe43Sopenharmony_ci */
5621bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_EnableRegionDeflicker(HI_BOOL bRegionDeflicker);
5631bd4fe43Sopenharmony_ci
5641bd4fe43Sopenharmony_ci/*
5651bd4fe43Sopenharmony_ci * \brief: multi blend surface by surface list
5661bd4fe43Sopenharmony_ci * \param[in]: composed surface list
5671bd4fe43Sopenharmony_ci * \retval: 0 success
5681bd4fe43Sopenharmony_ci */
5691bd4fe43Sopenharmony_ciHI_S32 HI_TDE2_MultiBlending(TDE_HANDLE s32Handle, const TDE_SURFACE_LIST_S *pstSurfaceList);
5701bd4fe43Sopenharmony_ci
5711bd4fe43Sopenharmony_ci/** @} */ /** <!-- ==== API declaration end ==== */
5721bd4fe43Sopenharmony_ci#ifdef __cplusplus
5731bd4fe43Sopenharmony_ci#if __cplusplus
5741bd4fe43Sopenharmony_ci}
5751bd4fe43Sopenharmony_ci#endif /* __cplusplus */
5761bd4fe43Sopenharmony_ci#endif /* __cplusplus */
5771bd4fe43Sopenharmony_ci
5781bd4fe43Sopenharmony_ci#endif /* _HI_API_TDE2_H_ */
579