• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef HI_GO_BLITER_H
17 #define HI_GO_BLITER_H
18 
19 #include "hi_go_comm.h"
20 
21 #ifdef __cplusplus
22 #if __cplusplus
23 extern "C" {
24 #endif /* __cplusplus */
25 #endif /* __cplusplus */
26 
27 /* Pixel-level alpha blending operation. */
28 typedef enum {
29     HIGO_COMPOPT_NONE = 0, /* Porter/Duff None-blending operation. */
30     HIGO_COMPOPT_CLEAR,    /* Porter/Duff clear blending operation. */
31     HIGO_COMPOPT_SRC,      /* Porter/Duff SRC blending operation. */
32     HIGO_COMPOPT_SRCOVER,  /* Porter/Duff Srcover blending operation. */
33     HIGO_COMPOPT_DSTOVER,  /* Porter/Duff DstOver blending operation. */
34     HIGO_COMPOPT_SRCIN,    /* Porter/Duff SrcIn blending operation. */
35     HIGO_COMPOPT_DSTIN,    /* Porter/Duff DstIn blending operation. */
36     HIGO_COMPOPT_SRCOUT,   /* Porter/Duff SrcOut blending operation. */
37     HIGO_COMPOPT_DSTOUT,   /* Porter/Duff DstOut blending operation. */
38     HIGO_COMPOPT_SRCATOP,  /* Porter/Duff SrcAtop blending operation. */
39     HIGO_COMPOPT_DSTATOP,  /* Porter/Duff DstAtop blending operation. */
40     HIGO_COMPOPT_ADD,      /* Porter/Duff DstAtop blending operation. */
41     HIGO_COMPOPT_XOR,      /* Porter/Duff Xor blending operation. */
42     HIGO_COMPOPT_DST,      /* Porter/Duff DstAtop blending operation. */
43     HIGO_COMPOPT_AKS,      /*
44                             * Assume that the destination surface is not transparent. After the alpha blending is
45                             * performed, the source alpha is retained.
46                             *
47                             * alphaϣԴalpha
48                             */
49     HIGO_COMPOPT_AKD,      /*
50                             * Assume that the destination surface is not transparent.
51                             * After the alpha blending is performed, the destination alpha is retained.
52                             *
53                             */
54 
55     HIGO_COMPOPT_BUTT
56 } HIGO_COMPOPT_E;
57 
58 /* Operation mode corresponding to colorkey. */
59 typedef enum {
60     HIGO_CKEY_NONE = 0, /* Do not use the colorkey. */
61     HIGO_CKEY_SRC,      /* Use the source colorkey. */
62     HIGO_CKEY_DST,      /* Use the destination colorkey. */
63 
64     HIGO_CKEY_BUTT
65 } HIGO_CKEY_E;
66 
67 /* Two raster of operations (ROPs). */
68 typedef enum {
69     HIGO_ROP_BLACK = 0, /* <Blackness> */
70     HIGO_ROP_PSDon,     /* <~(PS+D)> */
71     HIGO_ROP_PSDna,     /* <~PS & D> */
72     HIGO_ROP_PSn,       /* <~PS> */
73     HIGO_ROP_DPSna,     /* <PS &> ~D */
74     HIGO_ROP_Dn,        /* <~D> */
75     HIGO_ROP_PSDx,      /* <PS^D> */
76     HIGO_ROP_PSDan,     /* <~(PS&D)> */
77     HIGO_ROP_PSDa,      /* <PS & D> */
78     HIGO_ROP_PSDxn,     /* <~(PS^D)> */
79     HIGO_ROP_D,         /* <D> */
80     HIGO_ROP_PSDno,     /* <~PS + D> */
81     HIGO_ROP_PS,        /* <PS> */
82     HIGO_ROP_DPSno,     /* <PS + ~D> */
83     HIGO_ROP_PSDo,      /* <PS+D> */
84     HIGO_ROP_WHITE,     /* <Whiteness> */
85 
86     HIGO_ROP_BUTT
87 } HIGO_ROP_E;
88 
89 typedef enum {
90     HIGO_ROTATE_NONE = 0,
91     HIGO_ROTATE_90,     /* Rotate 90 degrees clockwise. */
92     HIGO_ROTATE_180,    /* Rotate 180 degrees clockwise. */
93     HIGO_ROTATE_270,    /* Rotate 270 degrees clockwise. */
94 
95     HIGO_ROTATE_BUTT
96 } HIGO_ROTATE_E;
97 
98 typedef enum {
99     HIGO_MIRROR_NONE = 0,
100 
101     HIGO_MIRROR_LR,     /* Mirror the left and the right. */
102     HIGO_MIRROR_TB,     /* Mirror the top and the bottom. */
103 
104     HIGO_MIRROR_BUTT
105 } HIGO_MIRROR_E;
106 
107 typedef struct {
108     HI_BOOL EnableGlobalAlpha;      /* Global alpha enable flag. */
109     HI_BOOL EnablePixelAlpha;       /* Pixel alpha enable flag. */
110     HIGO_COMPOPT_E PixelAlphaComp;  /* Pixel alpha operation. */
111     HIGO_CKEY_E    ColorKeyFrom;    /* Colorkey operation. */
112     HI_BOOL        EnableRop;       /* Enable the ROP2 operation. */
113     HIGO_ROP_E     Rop;             /* ROP2 operation type. */
114     HIGO_ROP_E     RopAlpha;        /* Type of the ROP alpha operation. */
115 } HIGO_BLTOPT2_S;
116 
117 /* */
118 typedef struct {
119     HI_BOOL EnableGlobalAlpha;      /*
120                                      * Global alpha enable flag. If this flag is enabled, the PixelAlphaComp blending
121                                      * mode must be specified.
122                                      *
123                                      */
124     HI_BOOL EnablePixelAlpha;       /* Pixel alpha enable flag. */
125     HIGO_COMPOPT_E PixelAlphaComp;  /* Pixel alpha operation. */
126     HIGO_CKEY_E    ColorKeyFrom;    /* colorkey operation. */
127     HI_BOOL        EnableRop;       /* Enable the ROP2 operation. */
128     HIGO_ROP_E     Rop;             /* ROP2 operation type. */
129     HIGO_ROP_E     RopAlpha;        /* Type of the ROP alpha operation. */
130     HI_BOOL        EnableScale;     /* Enable the scaling function. */
131     HIGO_ROTATE_E  RotateType;      /* Rotation type. */
132     HIGO_MIRROR_E  MirrorType;      /* Mirror type . */
133 } HIGO_BLTOPT_S;
134 
135 typedef struct {
136     HI_BOOL EnableGlobalAlpha;      /* Global alpha enable flag. */
137     HIGO_COMPOPT_E PixelAlphaComp;  /* Pixel alpha operation. */
138     HI_BOOL        EnableRop;       /* Enable the ROP2 operation. */
139     HIGO_ROP_E     RopColor;        /* ROP2 operation type. */
140     HIGO_ROP_E     RopAlpha;
141 } HIGO_MASKOPT_S;
142 
143 /* Anti-flicker level. */
144 typedef enum {
145     HIGO_DEFLICKER_AUTO = 0, /*
146                               * Anti-flicker level, ranging from low to high. The higher the level, the better the
147                               * anti-flicker effect, but the more blurred the picture.
148                               *
149                               * ֵΪLOW~HIGH,ֵԽ˸ЧԽãԽģ
150                               */
151     HIGO_DEFLICKER_LOW,
152     HIGO_DEFLICKER_MIDDLE,
153     HIGO_DEFLICKER_HIGH,
154     HIGO_DEFLICKER_BUTT
155 }HIGO_DEFLICKEROPT_E;
156 
157 /* Anti-flicker level. */
158 typedef struct {
159     HIGO_DEFLICKEROPT_E DefLevel;
160 }HIGO_DEFLICKEROPT_S;
161 
162 /*
163  * \brief Initializes the Bliter module.
164  * \attention \n
165  * When ::HI_GO_Init is called, this API is also called.
166  * \param  N/A.
167  *
168  * \retval ::HI_SUCCESS
169  * \retval ::HI_FAILURE
170  * \retval ::HIGO_ERR_DEPEND_TDE
171  *
172  * \see \n
173  * ::HI_GO_Init \n
174  * ::HI_GO_DeinitBliter
175  */
176 HI_S32 HI_GO_InitBliter(HI_VOID);
177 
178 /*
179  * \brief Deinitializes the Bliter module.
180  * \attention \n
181  * When ::HI_GO_Deinit is called, this API is also called.
182  * \param N/A.
183  *
184  * \retval ::HI_SUCCESS
185  * \retval ::HIGO_ERR_NOTINIT
186  *
187  * \see \n
188  * ::HI_GO_Deinit \n
189  * ::HI_GO_InitBliter
190  */
191 HI_S32 HI_GO_DeinitBliter(HI_VOID);
192 
193 /*
194  * \brief Fills in a rectangle.
195  * \attention \n
196  * N/A.
197  * \param[in] Surface Surface handle.
198  * \param[in] pRect Size of the rectangle to be filled in. If the parameter is not set, it indicates that the entire
199  * surface is filled in.
200  * \param[in] Color Color Fill color. For the RGB format, 32-bit color is filled in; for the palette, color index(0-255)
201  * is filled in.
202  * \param[in] CompositeOpt Blending mode.
203  *
204  * \retval ::HI_SUCCESS
205  * \retval ::HI_FAILURE
206  * \retval ::HIGO_ERR_NOTINIT
207  * \retval ::HIGO_ERR_INVHANDLE
208  * \retval ::HIGO_ERR_INVCOMPTYPE
209  * \retval ::HIGO_ERR_OUTOFPAL
210  * \retval ::HIGO_ERR_UNSUPPORTED
211  * \retval ::HIGO_ERR_LOCKED
212  * \retval ::HIGO_ERR_INTERNAL
213  * \retval ::HIGO_ERR_INVPIXELFMT
214  * \retval ::HIGO_ERR_DEPEND_TDE
215  * \retval ::HIGO_ERR_EMPTYRECT
216  * \retval ::HIGO_ERR_OUTOFBOUNDS
217  * \see \n
218  * N/A.
219  */
220 HI_S32 HI_GO_FillRect(HI_HANDLE Surface, const HI_RECT *pRect, HI_COLOR Color, HIGO_COMPOPT_E CompositeOpt);
221 
222 /*
223  * \brief Transfers bit blocks. During the transfer, color space conversion (CSC), scaling, and rotation are supported.
224  *
225  * \attention \n
226  * Only the YUV-to-RGB CSC is supported. \n
227  * The operations of colorkey, alpha, ROP, and colorkey+ROP are supported.\
228  * Scaling, rotation, and mirror cannot be combined. \n
229  * For scaling, rotation, and mirror, the source and destination pixel formats must be the same, but the format cannot
230  * be YUV or CLUT.\n
231  *
232  * ֲ֧colorkeyalphaROPcolorkey+ROP\
233  * šת��ʹ \n
234  * šתҪԴĿظʽȫͬYUVʽCLUTʽ \n CNend
235  *
236  * \param[in] SrcSurface Source surface handle.
237  * \param[in] pSrcRect Source region for transfer. If the parameter is not set, it indicates the entire source surface.
238  *
239  * \param[in] DstSurface Destination surface handle.
240  * \param[in] pDstRect Destination region for transfer. If the parameter is not set, it indicates the entire destination
241  * surface.
242  * \param[in] pBlitOpt Blending mode.
243  *
244  * \retval ::HI_SUCCESS
245  * \retval ::HIGO_ERR_NOTINIT
246  * \retval ::HIGO_ERR_INVMIRRORTYPE
247  * \retval ::HIGO_ERR_INVROTATETYPE
248  * \retval ::HIGO_ERR_INVCKEYTYPE
249  * \retval ::HIGO_ERR_INVROPTYPE
250  * \retval ::HIGO_ERR_NOCOLORKEY
251  * \retval ::HIGO_ERR_INVPIXELFMT
252  * \retval ::HIGO_ERR_INTERNAL
253  * \retval ::HIGO_ERR_NULLPTR
254  * \retval ::HIGO_ERR_INVHANDLE
255  * \retval ::HIGO_ERR_INVCOMPTYPE
256  * \retval ::HIGO_ERR_UNSUPPORTED
257  * \retval ::HIGO_ERR_LOCKED
258  * \retval ::HIGO_ERR_DEPEND_TDE
259  * \retval ::HIGO_ERR_EMPTYRECT
260  * \retval ::HIGO_ERR_OUTOFBOUNDS
261  * \retval ::HIGO_ERR_INTERNAL
262  *
263  * \see \n
264  * N/A.
265  */
266 HI_S32 HI_GO_Blit(HI_HANDLE SrcSurface, const HI_RECT *pSrcRect, HI_HANDLE DstSurface, const HI_RECT *pDstRect,
267     const HIGO_BLTOPT_S *pBlitOpt);
268 
269 /*
270  * \brief set line width.
271  * \param[in] Surface Destination surface handle.
272  * \param[in] Width is for line width.
273  *
274  * \retval ::HI_SUCCESS
275  * \retval ::HI_FAILURE
276  * \retval ::HIGO_ERR_NOTINIT
277  * \retval ::HIGO_ERR_INVHANDLE
278  * \retval ::HIGO_ERR_UNSUPPORTED
279  * \retval ::HIGO_ERR_INVPIXELFMT
280  * \retval ::HIGO_ERR_DEPEND_TDE
281  *
282  * \see \n
283  * N/A.
284  */
285 HI_S32 HI_GO_SetLineWidth(HI_HANDLE Surface, HI_U32 Width);
286 
287 /*
288  * \brief Draws a line segment. Cropping is not supported.
289  * \attention \n
290  * Cropping is not supported. Users must keep the entire line within the surface region.
291  *
292  *
293  * \param[in] Surface Destination surface handle.
294  * \param[in] x0 Horizontal coordinate of the start point.
295  * \param[in] y0 Vertical coordinate of the start point.
296  * \param[in] x1 Horizontal coordinate of the end point.
297  * \param[in] y1 Vertical coordinate of the end point .
298  * \param[in] color Line segment color.
299  *
300  * \retval ::HI_SUCCESS
301  * \retval ::HI_FAILURE
302  * \retval ::HIGO_ERR_NOTINIT
303  * \retval ::HIGO_ERR_INVHANDLE
304  * \retval ::HIGO_ERR_UNSUPPORTED
305  * \retval ::HIGO_ERR_INVPIXELFMT
306  * \retval ::HIGO_ERR_DEPEND_TDE
307  *
308  * \see \n
309  * N/A.
310  */
311 HI_S32 HI_GO_DrawLine(HI_HANDLE Surface, HI_S32 x0, HI_S32 y0, HI_S32 x1, HI_S32 y1, HI_COLOR color);
312 
313 /*
314  * \brief Draws an ellipse.
315  * \attention \n
316  * Cropping is not supported. Users must keep the entire ellipse within the surface region.
317  *
318  *
319  * \param[in] Surface Destination surface handle.
320  * \param[in] sx Horizontal coordinate of the ellipse center.
321  * \param[in] sy Vertical coordinate of the ellipse center.
322  * \param[in] rx X axis radius .
323  * \param[in] ry Y axis radius.
324  * \param[in] color Ellipse color.
325  *
326  * \retval ::HI_SUCCESS
327  * \retval ::HIGO_ERR_NOTINIT
328  * \retval ::HIGO_ERR_INVHANDLE
329  * \retval ::HIGO_ERR_UNSUPPORTED
330  *
331  * \see \n
332  * N/A.
333  */
334 HI_S32 HI_GO_DrawEllipse(HI_HANDLE Surface, HI_S32 sx, HI_S32 sy, HI_S32 rx, HI_S32 ry, HI_COLOR color);
335 
336 /*
337  * \brief Draws a circle. Cropping is not supported.
338  * \attention \n
339  * Cropping is not supported. Users must keep the entire circle within the surface region.
340  *
341  *
342  * \param[in] Surface Destination surface handle.
343  * \param[in] x Horizontal coordinate of the circle center.
344  * \param[in] y Vertical coordinate of the circle center.
345  * \param[in] r Radius.
346  * \param[in] color Circle color. The circle is filled in with 32-bit colors.
347  *
348  *
349  * \retval ::HI_SUCCESS
350  * \retval ::HIGO_ERR_NOTINIT
351  * \retval ::HIGO_ERR_INVHANDLE
352  * \retval ::HIGO_ERR_UNSUPPORTED
353  *
354  * \see \n
355  * N/A.
356  */
357 HI_S32 HI_GO_DrawCircle(HI_HANDLE Surface, HI_S32 x, HI_S32 y, HI_S32 r, HI_COLOR color);
358 
359 /*
360  * \brief Draws a rectangle.
361  * \attention \n
362  * If the rectangle is empty, it indicates that the rectangle size is the same as surface.
363  * Cropping is not supported; therefore, you must ensure that the entire rectangle is within the surface.
364  *
365  * ֲ֧üʹ߱뱣֤surface CNend
366  *
367  * \param[in] Surface Destination surface handle.
368  * \param[in] pRect Rectangle region.
369  * \param[in] color Rectangle color.
370  *
371  * \retval ::HI_SUCCESS
372  * \retval ::HIGO_ERR_NOTINIT
373  * \retval ::HIGO_ERR_INVHANDLE
374  * \retval ::HIGO_ERR_UNSUPPORTED
375  *
376  * \see \n
377  * N/A.
378  */
379 HI_S32 HI_GO_DrawRect(HI_HANDLE Surface, const HI_RECT *pRect, HI_COLOR color);
380 
381 /*
382  * \brief Performs the mask ROP or mask blend transfer on the raster bitmap.ԹդλͼMask RopMask Blend
383  *        Ʋ CNend
384  * \attention \n
385  * The mask bitmap is in A1 or A8 format.
386  * You need to overlay the mask bitmap with the source bitmap, overlay the result with the destination bitmap, and then
387  * output the final result to the destination bitmap.
388  * If the ROP and blending operation are perform at the same time, only the ROP takes effect.
389  *
390  * ȽMaskλͼԴλͼһεӣȻõӵĽĿĿλͼ
391  * RopBlendͬʱֻһЧģ߶ѡֻRopЧ CNend
392  *
393  * \param[in] SrcSurface Source surface handle.
394  * \param[in] pSrcRect Source rectangle.
395  * \param[in] DstSurface Destination surface handle.
396  * \param[in] pDstRect Destination rectangle.
397  * \param[in] MaskSurface Mask surface handle.
398  * \param[in] pMaskRect Mask rectangle.
399  * \param[in] pOpt Operation option.
400  *
401  * \retval ::HI_SUCCESS
402  * \retval ::HIGO_ERR_NOTINIT
403  * \retval ::HIGO_ERR_INVCOMPTYPE
404  * \retval ::HIGO_ERR_INVROPTYPE
405  * \retval ::HIGO_ERR_INVRECT
406  * \retval ::HIGO_ERR_NULLPTR
407  * \retval ::HIGO_ERR_NOTINIT
408  * \retval ::HIGO_ERR_INTERNAL
409  * \retval ::HIGO_ERR_UNSUPPORTED
410  * \retval ::HIGO_ERR_DEPEND_TDE
411  * \retval ::HIGO_ERR_INTERNAL
412  *
413  * \see \n
414  * N/A.
415  */
416 HI_S32 HI_GO_MaskBlit(HI_HANDLE SrcSurface, const HI_RECT *pSrcRect, HI_HANDLE DstSurface, const HI_RECT *pDstRect,
417     HI_HANDLE MaskSurface, const HI_RECT *pMaskRect, const HIGO_MASKOPT_S *pOpt);
418 
419 /*
420  * \brief Transfers bit blocks. During the transfer, CSC is supported.
421  *        ת CNend
422  * \attention \n
423  * Only the YUV-to-RGB CSC is supported. \n
424  * The operations of colorkey, alpha, ROP, and colorkey+ROP are supported.\
425  *
426  * ֲ֧colorkeyalphaROPcolorkey+ROP\ CNend
427  *
428  * \param[in] SrcSurface Source surface handle.
429  * \param[in] pSrcRect Source region for transfer. If the parameter is not set, it indicates the entire source surface.
430  *
431  * \param[in] DstSurface Destination surface handle.
432  * \param[in] pDstRect Destination region for transfer. If the parameter is not set, it indicates the entire destination
433  * surface.
434  * \param[in] pBlitOpt Blending mode. If the parameter is not set, default settings are used.
435  *
436  *
437  * \retval ::HI_SUCCESS
438  * \retval ::HIGO_ERR_NOTINIT
439  * \retval ::HIGO_ERR_NULLPTR
440  * \retval ::HIGO_ERR_INVHANDLE
441  * \retval ::HIGO_ERR_INVCOMPTYPE
442  * \retval ::HIGO_ERR_INVCKEYTYPE
443  * \retval ::HIGO_ERR_INVROPTYPE
444  * \retval ::HIGO_ERR_INVPIXELFMT
445  * \retval ::HIGO_ERR_DEPEND_TDE
446  * \retval ::HIGO_ERR_UNSUPPORTED
447  * \retval ::HIGO_ERR_LOCKED
448  * \retval ::HIGO_ERR_INTERNAL
449  * \retval ::HIGO_ERR_NOMEM
450  * \retval ::HIGO_ERR_EMPTYRECT
451  * \retval ::HIGO_ERR_OUTOFBOUNDS
452  *
453  * \see \n
454  * N/A.
455  */
456 HI_S32 HI_GO_BitBlit(HI_HANDLE SrcSurface, const HI_RECT *pSrcRect, HI_HANDLE DstSurface, const HI_RECT *pDstRect,
457                      const HIGO_BLTOPT2_S *pBlitOpt);
458 
459 /*
460  * \brief Transfers bit blocks. During the transfer, CSC and scaling are supported.
461  *        ʵɫʿռת,  CNend
462  * \attention \n
463  * Only the YUV-to-RGB CSC is supported. \n
464  * The operations of colorkey, alpha, ROP, and colorkey+ROP are supported.\
465  *
466  * ֲ֧colorkeyalphaROPcolorkey+ROP\ CNend
467  *
468  * \param[in] SrcSurface  Source surface handle.
469  * \param[in] pSrcRect Source region for transfer. If the parameter is not set, it indicates the entire source surface.
470  *
471  * \param[in] DstSurface Destination surface handle.
472  * \param[in] pDstRect pDstRect Destination region for transfer. If the parameter is not set, it indicates the entire
473  *            destination
474  * surface.
475  * \param[in] pBlitOpt Blending mode. If the parameter is not set, default settings are used.
476  *            ΪʹĬϲ CNend
477  *
478  * \retval ::HI_SUCCESS
479  * \retval ::HIGO_ERR_NOTINIT
480  * \retval ::HIGO_ERR_NULLPTR
481  * \retval ::HIGO_ERR_INVHANDLE
482  * \retval ::HIGO_ERR_INVCOMPTYPE
483  * \retval ::HIGO_ERR_INVCKEYTYPE
484  * \retval ::HIGO_ERR_INVROPTYPE
485  * \retval ::HIGO_ERR_INVPIXELFMT
486  * \retval ::HIGO_ERR_DEPEND_TDE
487  * \retval ::HIGO_ERR_UNSUPPORTED
488  * \retval ::HIGO_ERR_LOCKED
489  * \retval ::HIGO_ERR_INTERNAL
490  * \retval ::HIGO_ERR_NOMEM
491  * \retval ::HIGO_ERR_EMPTYRECT
492  * \retval ::HIGO_ERR_OUTOFBOUNDS
493  *
494  * \see \n
495  * N/A.
496  */
497 HI_S32 HI_GO_StretchBlit(HI_HANDLE SrcSurface, const HI_RECT *pSrcRect, HI_HANDLE DstSurface, const HI_RECT *pDstRect,
498     const HIGO_BLTOPT2_S *pBlitOpt);
499 
500 /*
501  * \brief  Fills in the pattern.
502  * \attention \n
503  * \param[in] SrcSurface  Source surface handle.
504  * \param[in] pSrcRect  Source region for transfer. If the parameter is not set, it indicates the entire source surface.
505  *
506  * \param[in] DstSurface  Destination surface handle.
507  * \param[in] pDstRect Destination region for transfer. If the parameter is not set, it indicates the entire destination
508  * surface.
509  * \param[in] pParOpt  Blending mode. If the parameter is not set, default settings are used.
510  *
511  *
512  * \retval ::HI_SUCCESS
513  * \retval ::HIGO_ERR_NOTINIT
514  * \retval ::HIGO_ERR_INVHANDLE
515  * \retval ::HIGO_ERR_INVCOMPTYPE
516  * \retval ::HIGO_ERR_INVCKEYTYPE
517  * \retval ::HIGO_ERR_INVROPTYPE
518  * \retval ::HIGO_ERR_NOCOLORKEY
519  * \retval ::HIGO_ERR_INVPIXELFMT
520  * \retval ::HIGO_ERR_DEPEND_TDE
521  * \retval ::HIGO_ERR_UNSUPPORTED
522  * \retval ::HIGO_ERR_INTERNAL
523  * \retval ::HIGO_ERR_EMPTYRECT
524  * \retval ::HIGO_ERR_OUTOFBOUNDS
525  *
526  * \see \n
527  * N/A.
528  */
529 HI_S32 HI_GO_PatternBlit(HI_HANDLE SrcSurface, const HI_RECT *pSrcRect, HI_HANDLE DstSurface, const HI_RECT *pDstRect,
530     const HIGO_BLTOPT2_S *pParOpt);
531 
532 /*
533  * \brief Performs anti-flicker and transfer. This API is used for the second anti-flicker.
534  *        ӿڵڶο˸CNend
535  * \attention \n
536  * This API is used in the following two application scenarios:
537  * 1. The automatic anti-flicker effect of a graphics layer is poor.
538  * 2. The buffer mode of a graphics layer is single-buffer mode (HIGO_LAYER_BUFFER_SINGLE). In this case, users need to
539  * perform anti-flicker by themselves.
540  * When the sizes of the source bitmap and destination bitmap are different, scaling is performed automatically.
541  *
542  * 1 ͼԶ˸ЧǺܺʱʹӿһΡ
543  * 2 ͼbufferģʽǵbufferģʽ(HIGO_LAYER_BUFFER_SINGLE)ʱûҪԼ˸
544  * ԴĿСͬʱԶšCNend
545  *
546  * \param[in] SrcSurface  SrcSurface Source surface handle.
547  * \param[in] pSrcRect  pSrcRect Source region for transfer. If the parameter is not set, it indicates the entire source
548  *                     surface.
549  * \param[in] DstSurface  DstSurface Destination surface handle.
550  * \param[in] pDstRect  pDstRect Destination region for transfer. If the parameter is not set, it indicates the entire
551  *                      destination
552  * surface.
553  * \param[in] pDefOpt  pDefOpt Anti-flicker level. If this parameter is not set, it indicates the automatic level.
554  *
555  *
556  * \retval ::HI_SUCCESS
557  * \retval ::HIGO_ERR_NOTINIT
558  * \retval ::HIGO_ERR_INVHANDLE
559  * \retval ::HIGO_ERR_INVCOMPTYPE
560  * \retval ::HIGO_ERR_INVCKEYTYPE
561  * \retval ::HIGO_ERR_INVROPTYPE
562  * \retval ::HIGO_ERR_NOCOLORKEY
563  * \retval ::HIGO_ERR_INVPARAM
564  * \retval ::HIGO_ERR_UNSUPPORTED
565  * \retval ::HIGO_ERR_INVPIXELFMT
566  * \retval ::HIGO_ERR_DEPEND_TDE
567  * \retval ::HIGO_ERR_INTERNAL
568  * \retval ::HIGO_ERR_EMPTYRECT
569  * \retval ::HIGO_ERR_OUTOFBOUNDS
570  *
571  * \see \n
572  * N/A.
573  */
574 HI_S32 HI_GO_DeflickerBlit(HI_HANDLE SrcSurface, const HI_RECT *pSrcRect, HI_HANDLE DstSurface, const HI_RECT *pDstRect,
575     const HIGO_DEFLICKEROPT_S *pDefOpt);
576 
577 /*
578  * \brief Do the alpha blending between the foreground surface and the background surface, transfers the result to the
579  *        destination surface. The background surface and the destination surface must be in the RGB color space.
580  * You can performs color space coversion, scale, or mirror, colorkey with alpha blending. úʵǰͱ
581  * Ŀ깦ܣĿsurfaceλRGBռ䣬ӹпԸɫռתšȲ֧ת
582  * \attention \n
583  * Only the YUV-to-RGB CSC is supported. \n
584  * The operations of colorkey, alpha, ROP, and colorkey+ROP are supported, rotation is not supported.\
585  * Scaling, and mirror cannot be combined. \n
586  * For scaling, and mirror, the source and destination pixel formats must be the same, but the format cannot
587  * be YUV or CLUT.\n
588  *
589  * ֲ֧colorkeyalphaROPcolorkey+ROP֧\
590  * š��ʹ \n
591  * ŻҪԴĿظʽȫͬYUVʽCLUTʽ \n CNend
592  *
593  * \param[in] BckSurface background surface handle.
594  * \param[in] pBckRect background region for transfer. If the parameter is not set,
595  *            it indicates the entire background surface.
596  *
597  * \param[in] ForSurface foreground surface handle.
598  * \param[in] pForRect foreground region for transfer. If not set, it indicates the entire foreground surface.
599  * surface.
600  * \param[in] DstSurface destination surface handle.
601  * \param[in] pDstRect destination region for transfer. If not set, it indicates the entire destination surface.
602  * surface.
603  * \param[in] pBlitOpt Blending mode.
604  *
605  * \retval ::HI_SUCCESS
606  * \retval ::HIGO_ERR_NOTINIT
607  * \retval ::HIGO_ERR_INVMIRRORTYPE
608  * \retval ::HIGO_ERR_INVROTATETYPE
609  * \retval ::HIGO_ERR_INVCKEYTYPE
610  * \retval ::HIGO_ERR_INVROPTYPE
611  * \retval ::HIGO_ERR_NOCOLORKEY
612  * \retval ::HIGO_ERR_INVPIXELFMT
613  * \retval ::HIGO_ERR_INTERNAL
614  * \retval ::HIGO_ERR_NULLPTR
615  * \retval ::HIGO_ERR_INVHANDLE
616  * \retval ::HIGO_ERR_INVCOMPTYPE
617  * \retval ::HIGO_ERR_UNSUPPORTED
618  * \retval ::HIGO_ERR_LOCKED
619  * \retval ::HIGO_ERR_DEPEND_TDE
620  * \retval ::HIGO_ERR_EMPTYRECT
621  * \retval ::HIGO_ERR_OUTOFBOUNDS
622  * \retval ::HIGO_ERR_INTERNAL
623  *
624  * \see \n
625  * N/A.
626  */
627 HI_S32 HI_GO_Blit3Source(HI_HANDLE BckSurface, const HI_RECT *pBckRect, HI_HANDLE ForSurface, const HI_RECT *pForRect,
628     HI_HANDLE DstSurface, const HI_RECT *pDstRect, const HIGO_BLTOPT_S *pBlitOpt);
629 /*
630  * \brief Fills in a rounded rectangle.
631  * \attention \n
632  * N/A.
633  * \param[in] Surface Surface handle.
634  * \param[in] pRect Size of the rectangle to be filled in. If the parameter is not set, it indicates that the entire
635  * surface is filled in.
636  * \param[in] Color Color Fill color. For the RGB format, 32-bit color is filled in; for the palette, color index(0-255)
637  * is filled in.
638  * \param[in] s32Radius radius.
639  *
640  * \retval ::HI_SUCCESS
641  * \retval ::HI_FAILURE
642  * \retval ::HIGO_ERR_NOTINIT
643  * \retval ::HIGO_ERR_INVHANDLE
644  * \retval ::HIGO_ERR_INVCOMPTYPE
645  * \retval ::HIGO_ERR_OUTOFPAL
646  * \retval ::HIGO_ERR_UNSUPPORTED
647  * \retval ::HIGO_ERR_LOCKED
648  * \retval ::HIGO_ERR_INTERNAL
649  * \retval ::HIGO_ERR_INVPIXELFMT
650  * \retval ::HIGO_ERR_DEPEND_TDE
651  * \retval ::HIGO_ERR_EMPTYRECT
652  * \retval ::HIGO_ERR_OUTOFBOUNDS
653  * \see \n
654  * N/A.
655  */
656 HI_S32 HI_GO_FillRoundRect(HI_HANDLE Surface, const HI_RECT *pRect, HI_COLOR Color, HI_S32 s32Radius);
657 
658 #ifdef __cplusplus
659 #if __cplusplus
660 }
661 #endif /* __cplusplus */
662 #endif /* __cplusplus */
663 
664 #endif /* HI_GO_BLITER_H */
665