xref: /utopia/UTPA2-700.0.x/projects/tmplib/include/apiGOP.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 //<MStar Software>
2 //******************************************************************************
3 // MStar Software
4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5 // All software, firmware and related documentation herein ("MStar Software") are
6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7 // law, including, but not limited to, copyright law and international treaties.
8 // Any use, modification, reproduction, retransmission, or republication of all
9 // or part of MStar Software is expressly prohibited, unless prior written
10 // permission has been granted by MStar.
11 //
12 // By accessing, browsing and/or using MStar Software, you acknowledge that you
13 // have read, understood, and agree, to be bound by below terms ("Terms") and to
14 // comply with all applicable laws and regulations:
15 //
16 // 1. MStar shall retain any and all right, ownership and interest to MStar
17 //    Software and any modification/derivatives thereof.
18 //    No right, ownership, or interest to MStar Software and any
19 //    modification/derivatives thereof is transferred to you under Terms.
20 //
21 // 2. You understand that MStar Software might include, incorporate or be
22 //    supplied together with third party`s software and the use of MStar
23 //    Software may require additional licenses from third parties.
24 //    Therefore, you hereby agree it is your sole responsibility to separately
25 //    obtain any and all third party right and license necessary for your use of
26 //    such third party`s software.
27 //
28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29 //    MStar`s confidential information and you agree to keep MStar`s
30 //    confidential information in strictest confidence and not disclose to any
31 //    third party.
32 //
33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34 //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35 //    without limitation, any warranties of merchantability, non-infringement of
36 //    intellectual property rights, fitness for a particular purpose, error free
37 //    and in conformity with any international standard.  You agree to waive any
38 //    claim against MStar for any loss, damage, cost or expense that you may
39 //    incur related to your use of MStar Software.
40 //    In no event shall MStar be liable for any direct, indirect, incidental or
41 //    consequential damages, including without limitation, lost of profit or
42 //    revenues, lost or damage of data, and unauthorized system use.
43 //    You agree that this Section 4 shall still apply without being affected
44 //    even if MStar Software has been modified by MStar in accordance with your
45 //    request or instruction for your use, except otherwise agreed by both
46 //    parties in writing.
47 //
48 // 5. If requested, MStar may from time to time provide technical supports or
49 //    services in relation with MStar Software to you for your use of
50 //    MStar Software in conjunction with your or your customer`s product
51 //    ("Services").
52 //    You understand and agree that, except otherwise agreed by both parties in
53 //    writing, Services are provided on an "AS IS" basis and the warranty
54 //    disclaimer set forth in Section 4 above shall apply.
55 //
56 // 6. Nothing contained herein shall be construed as by implication, estoppels
57 //    or otherwise:
58 //    (a) conferring any license or right to use MStar name, trademark, service
59 //        mark, symbol or any other identification;
60 //    (b) obligating MStar or any of its affiliates to furnish any person,
61 //        including without limitation, you and your customers, any assistance
62 //        of any kind whatsoever, or any information; or
63 //    (c) conferring any license or right under any intellectual property right.
64 //
65 // 7. These terms shall be governed by and construed in accordance with the laws
66 //    of Taiwan, R.O.C., excluding its conflict of law rules.
67 //    Any and all dispute arising out hereof or related hereto shall be finally
68 //    settled by arbitration referred to the Chinese Arbitration Association,
69 //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70 //    Rules of the Association by three (3) arbitrators appointed in accordance
71 //    with the said Rules.
72 //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73 //    be English.
74 //    The arbitration award shall be final and binding to both parties.
75 //
76 //******************************************************************************
77 //<MStar Software>
78 ////////////////////////////////////////////////////////////////////////////////
79 //
80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
81 // All rights reserved.
82 //
83 // Unless otherwise stipulated in writing, any and all information contained
84 // herein regardless in any format shall remain the sole proprietary of
85 // MStar Semiconductor Inc. and be kept in strict confidence
86 // ("MStar Confidential Information") by the recipient.
87 // Any unauthorized act including without limitation unauthorized disclosure,
88 // copying, use, reproduction, sale, distribution, modification, disassembling,
89 // reverse engineering and compiling of the contents of MStar Confidential
90 // Information is unlawful and strictly prohibited. MStar hereby reserves the
91 // rights to any and all damages, losses, costs and expenses resulting therefrom.
92 //
93 ////////////////////////////////////////////////////////////////////////////////
94 ///////////////////////////////////////////////////////////////////////////////
95 ///
96 /// @file   apiGOP.h
97 /// @brief  MStar GOP Driver Interface
98 /// @author MStar Semiconductor Inc.
99 /// @version 1.0
100 ///////////////////////////////////////////////////////////////////////////////
101 //-------------------------------------------------
102 /*! \defgroup GOP GOP interface
103 
104  \image html apiGOP_schema.png
105  <b>Mstar GOP(Graphic Output Path) engine is used to for graphic output. </b> \n
106  - Alpha blending??the content of framebuffer to video.
107  - GWIN is a window defined for displaying framebuffer content of GOP.
108  - Once enabled, GOP read framebuffer pixel data continuously upon output timing
109 
110  <b> Features: </b> \ns
111  - Data Format : RGB565/RGB1555/ARGB4444/I8/ARGB8888/2266/YUV??etc
112  - Output mode : RGB/YUV
113  - Window dimension : h-start, h-end, v-start, v-end
114  - Out path:  MVOP/IP main/IP sub/VOP/MIXER/VE/OC
115  - Scaling UP
116  - H/V Mirror
117  - H/V Scolling
118  - Testpattern
119  - Color colorkey
120 
121  <b> Operation Code Flow:  </b> \ns
122  -# ResetPool
123  -# ResetGOP
124  -# InitByGOP
125  -# UpdateRegOnce(TRUE)
126  -# ...AP Behavior...
127  -# GWIN_Enable
128  -# UpdateRegOnce(FALSE)
129 
130   *! \defgroup GOP_INIT GOP init related functions
131   *   \ingroup   GOP
132 
133   *! \defgroup INIT GOP init related functions
134   *   \ingroup   GOP_INIT
135 
136   *! \defgroup RESET GOP rest related functions
137   *   \ingroup   GOP_INIT
138 
139   *! \defgroup PRE_CONFIG GOP pre config related functions
140   *   \ingroup   GOP_INIT
141 
142   *! \defgroup GOP_CAPS GOP get capability related functions
143   *   \ingroup   GOP
144 
145   *! \defgroup GOP_CB GOP call back related functions
146   *   \ingroup   GOP
147 
148   *! \defgroup GOP_LOCK_BEGINE_END GOP lock begine/end related functions
149   *   \ingroup   GOP
150 
151   *! \defgroup GOP_CONFIG GOP config related functions
152   *   \ingroup   GOP
153 
154   *! \defgroup DST GOP dst related functions
155   *   \ingroup   GOP_CONFIG
156 
157   *! \defgroup MIRROR GOP mirror related functions
158   *   \ingroup   GOP_CONFIG
159 
160   *! \defgroup PALETTE GOP palette related functions
161   *   \ingroup   GOP_CONFIG
162 
163   *! \defgroup 3D GOP 3D related functions
164   *   \ingroup   GOP_CONFIG
165 
166   *! \defgroup GOP_ORDER GOP order related functions
167   *   \ingroup   GOP_CONFIG
168 
169   *! \defgroup COLOR_TRANSFOR GOP color transfor related functions
170   *   \ingroup   GOP_CONFIG
171 
172   *! \defgroup TRANSPARENT_CLR_CEY GOP transparent color key related functions
173   *   \ingroup   GOP_CONFIG
174 
175   *! \defgroup MIU GOP MIU related functions
176   *   \ingroup   GOP_CONFIG
177 
178   *! \defgroup BW GOP BW related functions
179   *   \ingroup   GOP_CONFIG
180 
181   *! \defgroup GOP_OPTION GOP option related functions
182   *   \ingroup   GOP_CONFIG
183 
184   *! \defgroup GOP_UPDATE GOP update related functions
185   *   \ingroup   GOP
186 
187   *! \defgroup FORCE_WRITE GOP force write related functions
188   *   \ingroup   GOP_UPDATE
189 
190   *! \defgroup UPDATE_GROUP_ONCE GOP update group once related functions
191   *   \ingroup   GOP_UPDATE
192 
193   *! \defgroup UPDATE GOP update related functions
194   *   \ingroup   GOP_UPDATE
195 
196   *! \defgroup GOP_TEST_PATTERN GOP test pattern related functions
197   *   \ingroup   GOP
198 
199   *! \defgroup GOP_POWER_STATE GOP power state related functions
200   *   \ingroup   GOP
201 
202   *! \defgroup STRETCH_WINDOW Stretch-window related functions
203   *   \ingroup   GOP
204 
205   *! \defgroup SET_STRETCH_WINDOW Stretch-window set window related functions
206   *   \ingroup   STRETCH_WINDOW
207 
208   *! \defgroup SCALE Stretch-window scaling related functions
209   *   \ingroup   STRETCH_WINDOW
210 
211   *! \defgroup GWIN GWIN related functions
212   *   \ingroup   GOP
213 
214   *! \defgroup GWIN_CREATE GWIN create related functions
215   *   \ingroup   GWIN
216 
217   *! \defgroup SHARE GWIN share related functions
218   *   \ingroup   GWIN
219 
220   *! \defgroup GWIN_DELETE GWIN delete related functions
221   *   \ingroup   GWIN
222 
223   *! \defgroup SET_GWIN_WINDOW GWIN set window related functions
224   *   \ingroup   GWIN
225 
226   *! \defgroup FLIP GWIN flip related functions
227   *   \ingroup   GWIN
228 
229   *! \defgroup ALPHA_BLENDING GWIN alpha blending related functions
230   *   \ingroup   GWIN
231 
232   *! \defgroup BASIC GWIN alpha blending basic related functions
233   *   \ingroup   ALPHA_BLENDING
234 
235   *! \defgroup EXTRA GWIN alpha blending option related functions
236   *   \ingroup   ALPHA_BLENDING
237 
238   *! \defgroup ENABLE GWIN enable related functions
239   *   \ingroup   GWIN
240 
241   *! \defgroup GWIN_STATUS GWIN status related functions
242   *   \ingroup   GWIN
243 
244   *! \defgroup GWIN_OPTION GWIN option related functions
245   *   \ingroup   GWIN
246 
247   *! \defgroup GWIN_ORDER GWIN order related functions
248   *   \ingroup   GWIN_OPTION
249 
250   *! \defgroup BG GWIN BG related functions
251   *   \ingroup   GWIN_OPTION
252 
253   *! \defgroup SCROLL GWIN scroll related functions
254   *   \ingroup   GWIN_OPTION
255 
256   *! \defgroup FADING GWIN fading related functions
257   *   \ingroup   GWIN_OPTION
258 
259   *! \defgroup BLINK GWIN blink related functions
260   *   \ingroup   GWIN_OPTION
261 
262   *! \defgroup PINPON GWIN pin-pon related functions
263   *   \ingroup   GWIN_OPTION
264 
265   *! \defgroup TILE_MODE GWIN tile-mode related functions
266   *   \ingroup   GWIN_OPTION
267 
268   *! \defgroup FB FB related functions
269   *   \ingroup   GOP
270 
271   *! \defgroup POOL FB pool related functions
272   *   \ingroup   FB
273 
274   *! \defgroup FB_CREATE FB create related functions
275   *   \ingroup   FB
276 
277   *! \defgroup SET FB set related functions
278   *   \ingroup   FB
279 
280   *! \defgroup FB_STATUS FB status related functions
281   *   \ingroup   FB
282 
283   *! \defgroup FB_DELETE FB delete related functions
284   *   \ingroup   FB
285 
286   *! \defgroup DWIN DWIN related functions
287   *   \ingroup   GOP
288 
289   *! \defgroup DWIN_CONFIG DWIN config related functions
290   *   \ingroup   DWIN
291 
292   *! \defgroup DWIN_INTERRUPT DWIN interrupt related functions
293   *   \ingroup   DWIN
294 
295   *! \defgroup DWIN_CAPTURE DWIN capture related functions
296   *   \ingroup   DWIN
297 
298   *! \defgroup DWIN_OPTION DWIN option related functions
299   *   \ingroup   DWIN
300 
301   *! \defgroup GOP_MIXER MIXER related functions
302   *   \ingroup   GOP
303 
304   *! \defgroup GOP_VE VE related functions
305   *   \ingroup   GOP
306 
307   *! \defgroup GOP_ToBeRemove GOP to be remove related functions
308   *   \ingroup   GOP
309 
310   */
311 //-------------------------------------------------
312 
313 
314 #ifndef _API_GOP_H_
315 #define _API_GOP_H_
316 
317 
318 
319 #ifdef __cplusplus
320 extern "C"
321 {
322 #endif
323 
324 #include "MsCommon.h"
325 #include "MsDevice.h"
326 #include "apiGOP_v2.h"
327 //-------------------------------------------------------------------------------------------------
328 //  Macro and Define
329 //-------------------------------------------------------------------------------------------------
330 /// GOP Version
331 #define MSIF_GOP_LIB_CODE                   {'G','O','P','_'}    //Lib code
332 #define MSIF_GOP_LIBVER                     {'8','9'}            //LIB version
333 #define MSIF_GOP_BUILDNUM                   {'0','2'}            //Build Number
334 #define MSIF_GOP_CHANGELIST                 {'0','0','5','2','4','9','1','6'} //P4 ChangeList Number
335 
336 #define GOP_API_VERSION                   /* Character String for DRV/API version             */  \
337     MSIF_TAG,                             /* 'MSIF'                                           */  \
338     MSIF_CLASS,                           /* '00'                                             */  \
339     MSIF_CUS,                             /* 0x0000                                           */  \
340     MSIF_MOD,                             /* 0x0000                                           */  \
341     MSIF_CHIP,                                                                                  \
342     MSIF_CPU,                                                                                   \
343     MSIF_GOP_LIB_CODE,                    /* IP__                                             */  \
344     MSIF_GOP_LIBVER,                      /* 0.0 ~ Z.Z                                        */  \
345     MSIF_GOP_BUILDNUM,                    /* 00 ~ 99                                          */  \
346     MSIF_GOP_CHANGELIST,                  /* CL#                                              */  \
347     MSIF_OS
348 
349 ///GOP_PALETTE_ENTRY_NUM
350 #define GOP_PALETTE_ENTRY_NUM   256UL
351 ///FB_FMT_AS_DEFAULT
352 #define FB_FMT_AS_DEFAULT   0xFFFFUL
353 ///DEFAULT_FB_FMT
354 #define DEFAULT_FB_FMT 0xFFFFUL
355 ///INVALID_WIN_ID
356 #define INVALID_WIN_ID GWIN_NO_AVAILABLE
357 ///GWIN_ID_INVALID
358 #define GWIN_ID_INVALID 0xFFUL
359 ///LAYER_ID_INVALID
360 #define LAYER_ID_INVALID 0xFFFFUL
361 ///INVALID_GOP_NUM
362 #define INVALID_GOP_NUM  0xFFUL
363 ///MAX_GWIN_SUPPORT
364 #define MAX_GWIN_SUPPORT MApi_GOP_GWIN_GetTotalGwinNum()
365 
366 
367 #ifndef MAX_GWIN_FB_SUPPORT
368 #define MAX_GWIN_FB_SUPPORT MApi_GOP_GWIN_GetMax32FBNum()
369 #endif
370 
371 #define MAX_NUM_GOP_API_INF_SUPPORT 6UL
372 
373 //the macro defines only be applied for the upper user, not for the internal driver,otherwise it will cause the deadlock
374 #define MAX_GOP0_SUPPORT MApi_GOP_GWIN_GetGwinNum(0)
375 #define MAX_GOP1_SUPPORT MApi_GOP_GWIN_GetGwinNum(1)
376 #define MAX_GOP2_SUPPORT MApi_GOP_GWIN_GetGwinNum(2)
377 #define MAX_GOP3_SUPPORT MApi_GOP_GWIN_GetGwinNum(3)
378 #define MAX_GOP4_SUPPORT MApi_GOP_GWIN_GetGwinNum(4)
379 #define MAX_GOP5_SUPPORT MApi_GOP_GWIN_GetGwinNum(5)
380 //#define MAX_GOP_SUPPORT MApi_GOP_GWIN_GetMaxGOPNum()
381 
382 //the macro defines only be applied for the upper user, not for the internal driver,otherwise it will cause the deadlock
383 #define GOP0_GWIN_START 0UL
384 #define GOP1_GWIN_START MAX_GOP0_SUPPORT
385 #define GOP2_GWIN_START MAX_GOP0_SUPPORT + MAX_GOP1_SUPPORT
386 #define GOP3_GWIN_START MAX_GOP0_SUPPORT + MAX_GOP1_SUPPORT + MAX_GOP2_SUPPORT
387 #define GOP4_GWIN_START MAX_GOP0_SUPPORT + MAX_GOP1_SUPPORT + MAX_GOP2_SUPPORT + MAX_GOP3_SUPPORT
388 #define GOP5_GWIN_START MAX_GOP0_SUPPORT + MAX_GOP1_SUPPORT + MAX_GOP2_SUPPORT + MAX_GOP3_SUPPORT + MAX_GOP4_SUPPORT
389 
390 /// GOP API return value
391 typedef enum
392 {
393     ///GOP API return fail.
394     GOP_API_FAIL                        = 0,
395     ///GOP API return success.
396     GOP_API_SUCCESS                     = 1,
397     ///GOP API return non align address.
398     GOP_API_NON_ALIGN_ADDRESS           ,
399     ///GOP API return non align pitch.
400     GOP_API_NON_ALIGN_PITCH             ,
401     ///GOP API return depend no avail.
402     GOP_API_DEPEND_NOAVAIL              ,
403     ///GOP API return mutex obtain fail.
404     GOP_API_MUTEX_OBTAIN_FAIL           ,
405     ///GOP API return mutex obtain.
406     GOP_API_MUTEX_OBTAINED              ,
407     ///GOP API return invalid buffer info.
408     GOP_API_INVALID_BUFF_INFO          ,
409     ///GOP API return invalid parameter.
410     GOP_API_INVALID_PARAMETERS,
411     ///GOP API return this interface not supported.
412     GOP_API_FUN_NOT_SUPPORTED,
413     ///GOP API return enum not supported.
414     GOP_API_ENUM_NOT_SUPPORTED,
415     ///GOP API return create gwin fail.
416     GOP_API_CRT_GWIN_FAIL               = 0xFE,
417     ///GOP API return create no avail
418     GOP_API_CRT_GWIN_NOAVAIL            = 0xFF,
419 } E_GOP_API_Result;
420 
421 ///GWIN_FAIL
422 #define GWIN_FAIL         GOP_API_CRT_GWIN_FAIL
423 ///GWIN_OK
424 #define GWIN_OK           GOP_API_SUCCESS
425 ///GWIN_NO_AVAILABLE
426 #define GWIN_NO_AVAILABLE GOP_API_CRT_GWIN_NOAVAIL
427 
428 
429 ///GWINID
430 typedef MS_U8 GWINID;
431 
432 //-------------------------------------------------------------------------------------------------
433 //  Type and Structure
434 //-------------------------------------------------------------------------------------------------
435 /// GWIN display property
436 typedef struct
437 {
438     ///gwin id.
439     MS_U8 gId;
440     ///gwin start x coordinate.
441     MS_U16 StartX;
442     ///gwin start y coordinate.
443     MS_U16 StartY;
444     ///gwin win width.
445     MS_U16 Win_Width;
446     ///gwin win height.
447     MS_U16 Win_Height;
448     ///gwin frame buffer offset x.
449     MS_U16 FBOffset_X;
450     ///gwin frame buffer offset y.
451     MS_U16 FBOffset_Y;
452 } GOP_GwinDispProperty;
453 
454 /// GOP init info
455 typedef struct
456 {
457     ///panel width.
458     MS_U16 u16PanelWidth;
459     ///panel height.
460     MS_U16 u16PanelHeight;
461     ///panel h-start.
462     MS_U16 u16PanelHStr;
463     ///vsync interrupt flip enable flag.
464     MS_BOOL bEnableVsyncIntFlip;
465     ///gop frame buffer starting address.
466     MS_PHY u32GOPRBAdr;
467     ///gop frame buffer length.
468     MS_U32 u32GOPRBLen;
469     ///gop regdma starting address.
470     MS_PHY u32GOPRegdmaAdr;
471     ///gop regdma length.
472     MS_U32 u32GOPRegdmaLen;
473 }GOP_InitInfo;
474 
475 
476 /// GOP palette entry
477 typedef struct
478 {
479     /// A.
480     MS_U8 u8A;
481     /// R.
482     MS_U8 u8R;
483     /// G.
484     MS_U8 u8G;
485     /// B.
486     MS_U8 u8B;
487 } GOP_Palette;
488 
489 /// Frame buffer attributes for GWIN
490 typedef struct
491 {
492     /// frame buffer is mapped to which gwin.
493     MS_U8 gWinId;
494     /// frame buffer enable flag.
495     MS_U8 enable:1;
496     /// frame buffer allocated flag.
497     MS_U8 allocated:1;
498     /// frame buffer x0 (unit: pix).
499     MS_U16 x0;
500     /// frame buffer y0 (unit: line).
501     MS_U16 y0;
502     /// frame buffer x1 (unit: pix).
503     MS_U16 x1;
504     /// frame buffer y1 (unit: line).
505     MS_U16 y1;
506     /// frame buffer width (unit: pix).
507     MS_U16 width;
508     /// frame buffer height (unit: line).
509     MS_U16 height;
510     /// frame buffer pitch (unit: byte).
511     MS_U16 pitch;
512     /// frame buffer color format.
513     MS_U16 fbFmt;
514     /// frame buffer starting address.
515     MS_PHY addr;
516     /// frame buffer size.
517     MS_U32 size;
518     /// next frame buffer id in the same pool.
519     MS_U8 next;
520     /// previous frame buffer in the same pool.
521     MS_U8 prev;
522     ///store which AP use this FB.
523     MS_U8 string;
524     /// frame buffer s_x (unit: pix).
525     MS_U16 s_x;
526     /// frame buffer  s_y (unit: pix).
527     MS_U16 s_y;
528     /// frame buffer dispWidth (unit: pix).
529     MS_U16 dispWidth;
530     /// frame buffer dispHeight (unit: line).
531     MS_U16 dispHeight;
532 } GOP_GwinFBAttr;
533 
534 /// Dump Window Information
535 typedef struct
536 {
537     /// dwin v-start (unit:line).
538     MS_U16 u16VPixelStart;
539     /// dwin v-end (unit: line).
540     MS_U16 u16VPixelEnd;
541     /// dwin h-start (unit: pix).
542     MS_U16 u16HPixelStart;
543     /// dwin h-end (unit: pix).
544     MS_U16 u16HPixelEnd;
545     /// dwin dram starting address (unit: Byte).
546     MS_PHY u32TFDRAMAddr;
547     /// dwin access address high bond (unit: Byte).
548     MS_PHY u32BFDRAMAddr;
549     /// dwin jump address length after each dwin line end to next line start (unit: Byte).
550     MS_U16 u16DRAMJumpLen;
551     /// DWIN format: 0 UV7Y8, 1 UV8Y8, 2 ARGB8888, 3 RGB565.
552     MS_U8 u8fmt;
553 } GOP_DwinInfo;
554 
555 
556 /// DWIN source selection
557 typedef enum
558 {
559     /// DWIN OP source
560     DWIN_SRC_OP = 0,
561     /// DWIN MVOP source
562     DWIN_SRC_MVOP = 1,
563     /// DWIN IP source
564     DWIN_SRC_IP = 2,
565     /// DWIN OP1 source
566     DWIN_SRC_OP1 = 3,
567     /// DWIN SUBMVOP source
568     DWIN_SRC_SUBMVOP = 4,
569     /// DWIN GOPScaling source
570     DWIN_SRC_GOPScaling = 5,
571     DWIN_SRC_MAX = 6,
572 }EN_GOP_DWIN_SRC_SEL;
573 
574 /// DWIN source data format
575 typedef enum
576 {
577     /// CrYCb domain.
578     DWIN_DATA_FMT_UV7Y8 = 0,
579     /// CrYCb domain.
580     DWIN_DATA_FMT_UV8Y8,
581     /// RGB domain (CSC bypass).
582     DWIN_DATA_FMT_ARGB8888,
583     /// RGB domain (CSC bypass).
584     DWIN_DATA_FMT_RGB565,
585     DWIN_DATA_FMT_MAX
586 } EN_GOP_DWIN_DATA_FMT;
587 
588 
589 /// DWIN Interrupt mask
590 typedef enum
591 {
592     /// DWIN PROG INT mask
593     GOPDWIN_INT_MASK_PROG   = 0x0010,
594     /// DWIN TOP Field INT mask
595     GOPDWIN_INT_MASK_TF     = 0x0020,
596     /// DWIN Bottom Field INT mask
597     GOPDWIN_INT_MASK_BF     = 0x0040,
598     /// DWIN Vsync INT mask
599     GOPDWIN_INT_MASK_VS     = 0x0080,
600 } EN_GOP_DWIN_INT_MASK;
601 
602 /// GWIN output color domain
603 typedef enum
604 {
605     /// output color RGB.
606     GOPOUT_RGB,
607     /// output color YUV.
608     GOPOUT_YUV,
609 } EN_GOP_OUTPUT_COLOR;
610 
611 
612 /// Define GOP FB string.
613 typedef enum
614 {
615     E_GOP_FB_NULL,
616     /// OSD frame buffer.
617     E_GOP_FB_OSD,
618     /// Mute frame buffer.
619     E_GOP_FB_MUTE,
620     /// subtitle frame buffer.
621     E_GOP_FB_SUBTITLE,
622     /// teltext frame buffer.
623     E_GOP_FB_TELTEXT,
624     /// MHEG5 frame buffer.
625     E_GOP_FB_MHEG5,
626     /// CC frame buffer.
627     E_GOP_FB_CLOSEDCAPTION,
628 } EN_GOP_FRAMEBUFFER_STRING;
629 
630 
631 /// Define GOP Event for Notification.
632 typedef enum
633 {
634     /// E_GOP_EVENT_BUF_ARRANGE. Begin of Rearrange GOP buffers.
635     E_GOP_EVENT_BUF_ARRANGE_BEGIN    = 0,
636     /// E_GOP_Event_Buffer_Rearrange. End of Rearrange GOP buffers.
637     E_GOP_EVENT_BUF_ARRANGE_END    = 1,
638 } EN_GOP_EVENT_TYPE;
639 
640 /// Define GOP G3D DATA FORMAT.
641 typedef enum
642 {
643     /// E_GOP_TILE_DATA_16BPP. 16 BPP DATA FOR TILE MODE
644     E_GOP_TILE_DATA_16BPP    = 0,
645     /// E_GOP_TILE_DATA_16BPP. 32 BPP DATA FOR TILE MODE
646     E_GOP_TILE_DATA_32BPP    = 1,
647 } EN_GOP_TILE_DATA_TYPE;
648 
649 /// Define GOP MIU SEL
650 typedef enum
651 {
652     /// E_GOP_SEL_MIU0. gop access miu 0
653     E_GOP_SEL_MIU0    = 0,
654     /// E_GOP_SEL_MIU1. gop access miu1
655     E_GOP_SEL_MIU1    = 1,
656     /// E_GOP_SEL_MIU2. gop access miu2
657     E_GOP_SEL_MIU2    = 2,
658     /// E_GOP_SEL_MIU3. gop access miu3
659     E_GOP_SEL_MIU3    = 3,
660 } EN_GOP_SEL_TYPE;
661 
662 
663 
664 ///the GOP and mux setting info on utopia
665 typedef struct _GOP_MuxConfig
666 {
667   //GopMux arrays record the u8GopIndex and the corresponding MuxIndex
668   //u8MuxCounts: how many mux need to modify the gop settings
669 
670   struct
671   {
672       MS_U8 u8GopIndex;
673       MS_U8 u8MuxIndex;
674   }GopMux[6];
675   MS_U8 u8MuxCounts;
676 }GOP_MuxConfig, *PGOP_MuxConfig;
677 
678 ///the GOP and OSD Layer setting info on utopia
679 typedef struct _GOP_LayerConfig
680 {
681   struct
682   {
683       MS_U32 u32GopIndex;
684       MS_U32 u32LayerIndex;
685   }stGopLayer[6];
686   MS_U32 u32LayerCounts;
687 }GOP_LayerConfig, *PGOP_LayerConfig;
688 
689 typedef struct
690 {
691     MS_U8 gWinId;
692     MS_PHY u32FlipAddr;
693     MS_PHY u32SubAddr;
694     MS_U16 u16WaitTagID;
695     MS_U16 *pU16QueueCnt;
696 }GOP_FlipConfig, *PGOP_FlipConfig;
697 
698 typedef struct
699 {
700     MS_U8 u8InfoCnt;
701     GOP_FlipConfig astGopInfo[GOP_MULTIINFO_NUM];
702 }GOP_MultiFlipInfo, *PGOP_MultiFlipInfo;
703 
704 /// Define Mux
705 typedef enum
706 {
707     ///Select gop output to mux0
708     EN_GOP_MUX0 = 0,
709     /// Select gop output to mux1
710     EN_GOP_MUX1 = 1,
711     /// Select gop output to mux2
712     EN_GOP_MUX2 = 2,
713     /// Select gop output to mux3
714     EN_GOP_MUX3 = 3,
715         ///Select gop output to IP0
716     EN_GOP_IP0_MUX = 4,
717     /// Select gop output to IP1
718     EN_GOP_IP1_MUX = 5,
719     /// Select gop output to vop0
720     EN_GOP_VOP0_MUX = 6,
721     /// Select gop output to vop1
722     EN_GOP_VOP1_MUX = 7,
723     /// Select gop output to FRC mux0
724     EN_GOP_FRC_MUX0 = 8,
725     /// Select gop output to FRC mux1
726     EN_GOP_FRC_MUX1 = 9,
727     /// Select gop output to FRC mux2
728     EN_GOP_FRC_MUX2 = 10,
729     /// Select gop output to FRC mux3
730     EN_GOP_FRC_MUX3 = 11,
731     /// Select gop output to BYPASS mux
732     EN_GOP_BYPASS_MUX0 = 12,
733     /// Select gop output to IP0_SUB
734     EN_GOP_IP0_SUB_MUX = 13,
735     /// Select gop output to VOP0_SUB
736     EN_GOP_VOP0_SUB_MUX = 14,
737     /// Select gop output to OP1
738     EN_GOP_OP1_MUX = 15,
739     /// Select gop output to DIP
740     EN_GOP_DIP_MUX = 16,
741     /// Select gop output to DIP
742     EN_GOP_GS_MUX = 17,
743     /// Select gop output to mux4
744     EN_GOP_MUX4  = 18,
745     EN_MAX_GOP_MUX_SUPPORT,
746 } EN_Gop_MuxSel;
747 
748 /// Define DEBUG level.
749 typedef enum
750 {
751     /// GOP DEBUG LEVEL LOW. Just printf error message.
752     E_GOP_Debug_Level_LOW    = 0,
753     /// GOP DEBUG LEVEL Medium. printf warning message and error message.
754     E_GOP_Debug_Level_MED    = 1,
755     /// GOP DEBUG LEVEL hIGH. printf all message with function.
756     E_GOP_Debug_Level_HIGH    = 2,
757 } EN_GOP_DEBUG_LEVEL;
758 
759 
760 /// Define GOP gwin fade in/out.
761 typedef enum
762 {
763     /// GOP gwin fade in.
764     E_GOP_GWIN_FADE_IN,
765     /// GOP gwin fade out.
766     E_GOP_GWIN_FADE_OUT,
767     /// GOP gwin fade unknow type.
768     E_GOP_GWIN_FADE_UNKNOWN,
769 } EN_GOP_FADE_TYPE;
770 
771 
772 typedef enum
773 {
774     GOP_PINPON_G3D ,
775     GOP_PINPON_VE,
776     GOP_PINPON_DWIN,
777     GOP_PINPON_DIP,
778     GOP_PINPON_DWIN0,
779     GOP_PINPON_DWIN1,
780 }GOP_PINPON_MODE;
781 
782 typedef struct
783 {
784     MS_BOOL bEnable; //InOut
785     MS_U8   u8FrameCount; //Out, value range: 0~3
786     MS_U8   u8Result; //Out
787 }MS_GOP_VECAPTURESTATE, *PMS_GOP_VECAPTURESTATE;
788 
789 
790 typedef enum
791 {
792     E_GOP_VALID_6BITS             =   0,
793     E_GOP_VALID_8BITS             =   1,
794 } EN_GOP_CONSALPHA_BITS;
795 
796 
797 /// Define GOP Ignore init value
798 typedef enum
799 {
800     /// GOP init ingore mux init
801     E_GOP_IGNORE_MUX              =   0x0001,
802     /// GOP init ingore gwin reset
803     E_GOP_IGNORE_GWIN             =   0x0002,
804     /// GOP init ingore stretchwin reset
805     E_GOP_IGNORE_STRETCHWIN      =   0x0004,
806     /// GOP init ingore palette table reset
807     E_GOP_IGNORE_PALETTE          =   0x0008,
808     /// GOP init ingore rest GOP destination to OP
809     E_GOP_IGNORE_SET_DST_OP       =   0x0010,
810     /// GOP init ingore enable transparent color key
811     E_GOP_IGNORE_ENABLE_TRANSCLR =   0x0020,
812     /// GOP set destination ignore VEOSD for bootlogo case
813     E_GOP_BOOTLOGO_IGNORE_VEOSDEN =  0x0040,
814     /// GOP init ingore all
815     E_GOP_IGNORE_ALL              =   0xFFFF,
816     ///Not Ingore
817     E_GOP_IGNORE_DISABLE          =   0x0000,
818 } EN_GOP_IGNOREINIT;
819 
820 
821 //GOP Capability
822 typedef enum
823 {
824     E_GOP_CAP_WORD_UNIT ,
825     E_GOP_CAP_GWIN_NUM,
826     E_GOP_CAP_VERSION,
827     E_GOP_CAP_RESERVED,
828     E_GOP_CAP_CONSALPHA_VALIDBITS,
829     E_GOP_CAP_PALETTE,
830     E_GOP_CAP_DWIN,
831     E_GOP_CAP_GOP_MUX,
832     E_GOP_CAP_PIXELMODE_SUPPORT,
833     E_GOP_CAP_STRETCH,
834     E_GOP_CAP_TLBMODE_SUPPORT,
835 }EN_GOP_CAPS;
836 
837 // GOP palette type
838 typedef enum
839 {
840     E_GOP_CAP_PAL_SIZE_NONE = 0x0000,
841     E_GOP_CAP_PAL_SIZE_256  = 0x0100,
842     E_GOP_CAP_PAL_SIZE_64   = 0x0200,
843     E_GOP_CAP_PAL_SIZE_MASK = 0x0F00,
844 }EN_GOP_CAP_PAL;
845 
846 
847 ///Dwin Capability of IC
848 typedef struct
849 {
850     MS_BOOL bSupportWindowDECapture; //TRUE: Support it; FALSE:Not support, should use FrameDE to capture video
851     MS_BOOL bSupportOSDCapture;      //TRUE: Support it; FALSE:Not support
852 }GOP_DWIN_CAP, *PGOP_DWIN_CAP;
853 
854 ///GOP MUX PRIORITY when gop goes OP
855 typedef struct
856 {
857     MS_U8 u8MuxNumber;
858     MS_U8 *pu8MuxProrityArray;
859     MS_BOOL bNewMux;
860     MS_BOOL bNeedSetMUX1ToIP0;
861     MS_BOOL bNeedSetMUX3ToIP0;
862 }ST_GOP_MUX_CAP, *PST_GOP_MUX_CAP;
863 
864 ///GOP lib info
865 typedef struct
866 {
867     MS_U32 GOP_LibVer;
868     MS_U32 GOP_BuildNum;
869     MS_U32 GOP_ChangeList;
870 }GOP_LIB_VER, *PGOP_LIB_VER;
871 
872 ///GOP palette info
873 typedef struct
874 {
875     MS_U32 GOP_NumOfTbl;
876     MS_U32 GOP_PalTbl[0x10];
877     MS_U32 GOP_PalTblIdx;
878 }GOP_CAP_PAL_TYPE, *PGOP_CAP_PAL_TYPE;
879 typedef enum
880 {
881     E_GOP_DWIN_INIT ,
882     E_GOP_DWIN_ENABLE ,
883     E_GOP_DWIN_ENABLEINTR ,
884     E_GOP_DWIN_SRCSLCT ,
885     E_GOP_DWIN_ONESHOT ,
886     E_GOP_DWIN_ONESHOT2 ,
887     E_GOP_DWIN_SET_INFO ,
888     E_GOP_DWIN_SET_YUORD ,
889     E_GOP_DWIN_GET_BUFSTUS ,
890     E_GOP_DWIN_CLR_BUFSTUS ,
891     E_GOP_DWIN_SET_SCANTYPE ,
892     E_GOP_DWIN_SET_DATAFMT ,
893     E_GOP_DWIN_SET_ALPHA ,
894     E_GOP_DWIN_SET_R2Y ,
895 } EN_GOP_DWIN_CNTL;
896 
897 ///GOP palette info
898 typedef struct
899 {
900     MS_U32 GOP_VStretch_Support;
901 }GOP_CAP_STRETCH_INFO, *PGOP_CAP_STRETCH_INFO;
902 
903 ///GOP TLB support info
904 typedef struct
905 {
906     MS_U32 GOP_TLB_Support;
907 }GOP_CAP_TLB_INFO, *PGOP_CAP_TLB_INFO;
908 
909 ///GOP timing Information
910 typedef struct
911 {
912     MS_U16 u16HDTotal;// Output horizontal total
913     MS_U16 u16VDTotal; //Output vertical total
914 
915     MS_U16 u16DEHStart; //Output DE horizontal start
916     MS_U16 u16DEHSize;// Output DE horizontal size
917 
918     MS_U16 u16DEVStart; //Output DE vertical start
919     MS_U16 u16DEVSize;//Output DE Vertical size
920 
921     MS_BOOL bInterlaceMode;
922     MS_BOOL bYUVInput;
923     MS_BOOL bCLK_EN;
924     MS_BOOL bINVALPHA_EN;
925 }ST_GOP_TIMING_INFO, *PST_GOP_TIMING_INFO;
926 
927 //-----------------------------------------------------------------------------
928 //  Functions
929 //-----------------------------------------------------------------------------
930 //-----------------
931 // GOP_INIT
932 //-----------------
933 //-----------------
934 // INIT
935 //-----------------
936 //-------------------------------------------------------------------------------------------------
937 /// Initial all GOP driver (include gop0, gop1 ext..)
938 /// @ingroup INIT
939 /// @param pGopInit \b IN:gop driver init info
940 /// @return GOP_API_SUCCESS - Success
941 /// @return GOP_API_FAIL - Failure
942 //-------------------------------------------------------------------------------------------------
943 DLL_PUBLIC E_GOP_API_Result MApi_GOP_Init(GOP_InitInfo *pGopInit);
944 //-----------------
945 // GOP_ToBeRemove
946 //-----------------
947 //-------------------------------------------------------------------------------------------------
948 /// MApi_GOP_GetInfo
949 /// @ingroup GOP_ToBeRemove
950 /// @return GOP_API_SUCCESS - Success
951 //-------------------------------------------------------------------------------------------------
952 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GetInfo(GOP_ApiInfo* pGopApiInfo);
953 //-------------------------------------------------------------------------------------------------
954 /// MApi_GOP_GetStatus
955 /// @ingroup GOP_ToBeRemove
956 /// @return GOP_API_SUCCESS - Success
957 //-------------------------------------------------------------------------------------------------
958 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GetStatus(GOP_ApiStatus *pGopApiSts);
959 //-------------------------------------------------------------------------------------------------
960 /// MApi_GOP_SetDbgLevel
961 /// @ingroup GOP_ToBeRemove
962 /// @return GOP_API_SUCCESS - Success
963 //-------------------------------------------------------------------------------------------------
964 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetDbgLevel(EN_GOP_DEBUG_LEVEL level);
965 //-------------------------------------------------------------------------------------------------
966 /// MApi_GOP_GetLibVer
967 /// @ingroup GOP_ToBeRemove
968 /// @return GOP_API_SUCCESS - Success
969 //-------------------------------------------------------------------------------------------------
970 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GetLibVer(const MSIF_Version **ppVersion);
971 
972 //-------------------------------------------------------------------------------------------------
973 /// Initial individual GOP driver
974 /// @ingroup INIT
975 /// @param pGopInit \b IN:gop driver init info
976 /// @param u8GOP \b IN: only init by which gop
977 /// @return GOP_API_SUCCESS - Success
978 /// @return GOP_API_FAIL - Failure
979 //-------------------------------------------------------------------------------------------------
980 DLL_PUBLIC E_GOP_API_Result MApi_GOP_InitByGOP(GOP_InitInfo *pGopInit, MS_U8 u8GOP);
981 //-------------------------------------------------------------------------------------------------
982 /// MApi_GOP_GWIN_SwitchGOP
983 /// @ingroup GOP_ToBeRemove
984 /// @return GOP_API_SUCCESS - Success
985 //-------------------------------------------------------------------------------------------------
986 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SwitchGOP(MS_U8 u8GOP);
987 //-----------------
988 // STRETCH_WINDOW
989 //-----------------
990 //-----------------
991 // SET_STRETCH_WINDOW
992 //-----------------
993 //-------------------------------------------------------------------------------------------------
994 /// Restore initial stretch window setting of GOP. It will set gop to OP path and stretch window width/height
995 /// @ingroup SET_STRETCH_WINDOW
996 /// to panel width/height
997 /// @param u8GOPNum \b IN : Number of GOP
998 /// @return GOP_API_SUCCESS - Success
999 //-------------------------------------------------------------------------------------------------
1000 DLL_PUBLIC E_GOP_API_Result MApi_GOP_Initialize_StretchWindow(MS_U8 u8GOPNum);
1001 //-------------------------------------------------------------------------------------------------
1002 /// MApi_GOP_SetGOPClk
1003 /// @ingroup GOP_ToBeRemove
1004 /// @return GOP_API_SUCCESS - Success
1005 //-------------------------------------------------------------------------------------------------
1006 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetGOPClk(MS_U8 gopNum, EN_GOP_DST_TYPE eDstType);
1007 //-------------------------------------------------------------------------------------------------
1008 /// MApi_GOP_GWIN_GetCurrentGOP
1009 /// @ingroup GOP_ToBeRemove
1010 /// @return GOP_API_SUCCESS - Success
1011 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetCurrentGOP(void);
1012 
1013 //-----------------
1014 // GOP_CAPS
1015 //-----------------
1016 //-------------------------------------------------------------------------------------------------
1017 /// Get maximum support gop number
1018 /// @ingroup GOP_CAPS
1019 /// @param  void                \b IN: none
1020 /// @return gop number
1021 //-------------------------------------------------------------------------------------------------
1022 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetMaxGOPNum(void);
1023 //-------------------------------------------------------------------------------------------------
1024 /// Get maximum gwin number by individual gop
1025 /// @ingroup GOP_CAPS
1026 /// @param u8GopNum \b IN: Number of GOP
1027 /// @return maximum gwin number by individual gop
1028 //-------------------------------------------------------------------------------------------------
1029 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetGwinNum(MS_U8 u8GopNum);
1030 
1031 //-------------------------------------------------------------------------------------------------
1032 /// Get maximum support gwin number by all gop
1033 /// @ingroup GOP_CAPS
1034 /// @param  void                \b IN: none
1035 /// @return gwin number
1036 //-------------------------------------------------------------------------------------------------
1037 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetTotalGwinNum(void);
1038 //-------------------------------------------------------------------------------------------------
1039 /// MApi_GOP_PowerOn
1040 /// @ingroup GOP_ToBeRemove
1041 /// @return GOP_API_SUCCESS - Success
1042 //-------------------------------------------------------------------------------------------------
1043 DLL_PUBLIC E_GOP_API_Result MApi_GOP_PowerOn(void); //temparially naming, maybe change
1044 //-------------------------------------------------------------------------------------------------
1045 /// MApi_GOP_PowerOff
1046 /// @ingroup GOP_ToBeRemove
1047 /// @return GOP_API_SUCCESS - Success
1048 //-------------------------------------------------------------------------------------------------
1049 DLL_PUBLIC E_GOP_API_Result MApi_GOP_PowerOff(void); //temparially naming, maybe change
1050 //-----------------
1051 // RESET
1052 //-----------------
1053 //-------------------------------------------------------------------------------------------------
1054 /// GOP reset GOP resource
1055 /// @ingroup RESET
1056 /// @param  u32Gop                \b IN: GOP
1057 //-------------------------------------------------------------------------------------------------
1058 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result Mapi_GOP_GWIN_ResetGOP(MS_U32 u32Gop);
1059 
1060 
1061 //-------------------------------------------------------------------------------------------------
1062 /// GOP reset lock resource
1063 /// @ingroup RESET
1064 /// @param  void                \b IN: none
1065 //-------------------------------------------------------------------------------------------------
1066 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_ResetPool(void);
1067 
1068 //-----------------
1069 // GOP_POWER_STATE
1070 //-----------------
1071 //-------------------------------------------------------------------------------------------------
1072 /// set GOP power state
1073 /// @ingroup GOP_POWER_STATE
1074 /// @param enPowerState\b IN power status
1075 /// @return GOP_API_SUCCESS - Success
1076 //-------------------------------------------------------------------------------------------------
1077 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetPowerState(EN_POWER_MODE enPowerState);
1078 //-------------------------------------------------------------------------------------------------
1079 /// Set GOP bandwidth saving mode.
1080 /// @ingroup BW
1081 /// @return GOP_API_SUCCESS - Success
1082 /// @return GOP_API_FAIL - Failure
1083 //-------------------------------------------------------------------------------------------------
1084 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetGOPBWStrength(EN_GOP_BW_STRENGTH eGOPBWStr, MS_U8 u8GOP);
1085 //-------------------------------------------------------------------------------------------------
1086 /// Get GOP Power OFF for saving power.
1087 /// @ingroup BW
1088 /// @return EN_GOP_BW_STRENGTH - mode of GOP bw saving .
1089 //-------------------------------------------------------------------------------------------------
1090 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GetGOPBWStrength(MS_U8 u8GOP, EN_GOP_BW_STRENGTH* curBW);
1091 
1092 //-----------------
1093 // GOP_OPTION
1094 //-----------------
1095 //-------------------------------------------------------------------------------------------------
1096 /// Configure panel hstart timing for GOP; For configuring correct OSD position.
1097 /// @ingroup GOP_OPTION
1098 /// @param u8GOP \b IN:  GOP number
1099 /// @param u16PanelHStr \b IN horizontal start
1100 /// @return GOP_API_SUCCESS - Success
1101 /// @return GOP_API_FAIL - Failure
1102 //-------------------------------------------------------------------------------------------------
1103 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetGOPHStart(MS_U8 u8GOP,MS_U16 u16PanelHStr);
1104 //-------------------------------------------------------------------------------------------------
1105 /// Configure GOP brightness
1106 /// @ingroup COLOR_TRANSFOR
1107 /// @param u8GOP \b IN:  GOP number
1108 /// @param u16BriVal \b IN brightness value
1109 /// @param bMSB \b IN MSB
1110 /// @return GOP_API_SUCCESS - Success
1111 /// @return GOP_API_FAIL - Failure
1112 //-------------------------------------------------------------------------------------------------
1113 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetGOPBrightness(MS_U8 u8GOP,MS_U16 u16BriVal,MS_BOOL bMSB);
1114 //-------------------------------------------------------------------------------------------------
1115 /// Get GOP brightness value
1116 /// @ingroup COLOR_TRANSFOR
1117 /// @param u8GOP \b IN:  GOP number
1118 /// @param u16BriVal \b OUT brightness value
1119 /// @param bMSB \b OUT MSB
1120 /// @return GOP_API_SUCCESS - Success
1121 /// @return GOP_API_FAIL - Failure
1122 //-------------------------------------------------------------------------------------------------
1123 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GetGOPBrightness(MS_U8 u8GOP,MS_U16* u16BriVal,MS_BOOL* bMSB);
1124 //-----------------
1125 // BW
1126 //-----------------
1127 //-------------------------------------------------------------------------------------------------
1128 /// Enable LB Couple Feature to enlarge GOP FIFO for BW issue
1129 /// @ingroup BW
1130 /// @param u8GOP \b IN:  GOP number
1131 /// @param bEnable \b IN Enable or Disable
1132 /// @return GOP_API_SUCCESS - Success
1133 /// @return GOP_API_FAIL - Failure
1134 //-------------------------------------------------------------------------------------------------
1135 DLL_PUBLIC E_GOP_API_Result MApi_GOP_EnableLBCouple(MS_U8 u8GOP, MS_BOOL bEnable);
1136 //-----------------
1137 // GOP_VE
1138 //-----------------
1139 //-------------------------------------------------------------------------------------------------
1140 /// Configure panel hstart timing for GOP; For configuring correct OSD position.
1141 /// @ingroup GOP_VE
1142 /// @param u16PanelHStr \b IN horizontal start
1143 /// @return GOP_API_SUCCESS - Success
1144 /// @return GOP_API_FAIL - Failure
1145 //-------------------------------------------------------------------------------------------------
1146 DLL_PUBLIC E_GOP_API_Result MApi_GOP_VE_SetOutputTiming(GOP_VE_TIMINGTYPE mode);
1147 
1148 //-------------------------------------------------------------------------------------------------
1149 /// API for Enable VEOSD
1150 /// @ingroup GOP_VE
1151 /// @param u8win \b IN: GOP ID
1152 /// @return GOP_API_SUCCESS - Success
1153 /// @return GOP_API_FAIL - Failure
1154 //-------------------------------------------------------------------------------------------------
1155 DLL_PUBLIC E_GOP_API_Result MApi_GOP_Enable_VEOSD(MS_U8 u8GOP, MS_BOOL bEn);
1156 //-----------------
1157 // GOP_MIXER
1158 //-----------------
1159 //-------------------------------------------------------------------------------------------------
1160 /// Configure panel hstart timing for GOP; For configuring correct OSD position.
1161 /// @ingroup GOP_MIXER
1162 /// @param u16PanelHStr \b IN horizontal start
1163 /// @return GOP_API_SUCCESS - Success
1164 /// @return GOP_API_FAIL - Failure
1165 //-------------------------------------------------------------------------------------------------
1166 DLL_PUBLIC E_GOP_API_Result MApi_GOP_MIXER_SetOutputTiming(GOP_MIXER_TIMINGTYPE mode, GOP_MixerTiming *pMT);
1167 
1168 
1169 //-------------------------------------------------------------------------------------------------
1170 /// Configure mixer timing for GOP destination MIXER2OP; For configuring correct OSD position.
1171 /// @ingroup GOP_MIXER
1172 /// @param pMT \b IN:  mixer timing
1173 /// @return GOP_API_SUCCESS - Success
1174 /// @return GOP_API_FAIL - Failure
1175 //-------------------------------------------------------------------------------------------------
1176 DLL_PUBLIC E_GOP_API_Result MApi_GOP_MIXER_SetMIXER2OPOutputTiming(GOP_Mixer2OPTiming *pMT);
1177 
1178 //-------------------------------------------------------------------------------------------------
1179 /// Enable Mixer for Vfilter
1180 /// @ingroup GOP_MIXER
1181 /// @param bEnable \b IN:
1182 ///   - # TRUE Enable Vfilter
1183 ///   - # FALSE Disable Vfilter
1184 /// @return GOP_API_SUCCESS - Success
1185 /// @return GOP_API_FAIL - Failure
1186 //-------------------------------------------------------------------------------------------------
1187 // DLL_PUBLIC E_GOP_API_Result MApi_GOP_MIXER_EnableVfilter(MS_BOOL bEnable);
1188 //-------------------------------------------------------------------------------------------------
1189 /// Enable Mixer for old mode blending
1190 /// @ingroup GOP_MIXER
1191 /// @param bEnable \b IN:
1192 ///   - # TRUE Enable old mode
1193 ///   - # FALSE Disable old mode
1194 /// @return GOP_API_SUCCESS - Success
1195 /// @return GOP_API_FAIL - Failure
1196 //-------------------------------------------------------------------------------------------------
1197 DLL_PUBLIC E_GOP_API_Result MApi_GOP_MIXER_EnableOldBlendMode(MS_U8 u8GOP, MS_BOOL bEnable);
1198 //-------------------------------------------------------------------------------------------------
1199 /// MApi_GOP_RestoreFromVsyncLimitation
1200 /// @ingroup GOP_ToBeRemove
1201 /// @return GOP_API_SUCCESS - Success
1202 //-------------------------------------------------------------------------------------------------
1203 DLL_PUBLIC E_GOP_API_Result MApi_GOP_RestoreFromVsyncLimitation(void);
1204 
1205 //-----------------
1206 // MIU
1207 //-----------------
1208 //-------------------------------------------------------------------------------------------------
1209 /// API for set gop miu selection
1210 /// @ingroup MIU
1211 /// @param bEnable \b IN:
1212 ///   - # TRUE Enable Tile Mode for GWIN
1213 ///   - # FALSE Disable Tile Mode for GWIN
1214 /// @return GOP_API_SUCCESS - Success
1215 /// @return GOP_API_FAIL - Failure
1216 //-------------------------------------------------------------------------------------------------
1217 DLL_PUBLIC E_GOP_API_Result MApi_GOP_MIUSel(MS_U8 u8GOP, EN_GOP_SEL_TYPE MiuSel);
1218 //-------------------------------------------------------------------------------------------------
1219 /// API for set U/V SWAP
1220 /// @ingroup COLOR_TRANSFOR
1221 /// @param u8GOP \b IN: GOP number
1222 /// @param bEnable \b IN:
1223 ///   - # TRUE Enable U/V SWAP for GOP
1224 ///   - # FALSE Disable U/V SWAP for GOP
1225 /// @return GOP_API_SUCCESS - Success
1226 /// @return GOP_API_FAIL - Failure
1227 //-------------------------------------------------------------------------------------------------
1228 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetUVSwap(MS_U8 u8GOP, MS_BOOL bEn);
1229 //-------------------------------------------------------------------------------------------------
1230 /// API for set Y/C SWAP
1231 /// @ingroup COLOR_TRANSFOR
1232 /// @param u8GOP \b IN: GOP number
1233 /// @param bEnable \b IN:
1234 ///   - # TRUE Enable Y/C SWAP for GOP
1235 ///   - # FALSE Disable Y/C SWAP for GOP
1236 /// @return GOP_API_SUCCESS - Success
1237 /// @return GOP_API_FAIL - Failure
1238 //-------------------------------------------------------------------------------------------------
1239 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetYCSwap(MS_U8 u8GOP, MS_BOOL bEn);
1240 //-------------------------------------------------------------------------------------------------
1241 /// API for query gop miu selection
1242 /// @ingroup MIU
1243 /// @param bEnable \b IN:
1244 ///   - # TRUE Enable Tile Mode for GWIN
1245 ///   - # FALSE Disable Tile Mode for GWIN
1246 /// @return GOP_API_SUCCESS - Success
1247 /// @return GOP_API_FAIL - Failure
1248 //-------------------------------------------------------------------------------------------------
1249 DLL_PUBLIC MS_U8 MApi_GOP_GetMIUSel(MS_U8 u8GOP);
1250 //-------------------------------------------------------------------------------------------------
1251 /// API for set contrast
1252 /// @ingroup COLOR_TRANSFOR
1253 /// @param u8GOP            \b IN: GOP number
1254 /// @param u16YContrast     \b IN: Y contrast
1255 /// @param u16UContrast     \b IN: U contrast
1256 /// @param u16VContrast     \b IN: V contrast
1257 /// @return GOP_API_SUCCESS - Success
1258 /// @return GOP_API_FAIL - Failure
1259 //-------------------------------------------------------------------------------------------------
1260 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetGOPContrast(MS_U8 u8GOP, MS_U16 u16YContrast, MS_U16 u16UContrast, MS_U16 u16VContrast);
1261 //-------------------------------------------------------------------------------------------------
1262 /// API for get contrast
1263 /// @ingroup COLOR_TRANSFOR
1264 /// @param u8GOP \b IN: GOP number
1265 /// @param u16YContrast     \b IN: Y contrast
1266 /// @param u16UContrast     \b IN: U contrast
1267 /// @param u16VContrast     \b IN: V contrast
1268 /// @return GOP_API_SUCCESS - Success
1269 /// @return GOP_API_FAIL - Failure
1270 //-------------------------------------------------------------------------------------------------
1271 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GetGOPContrast(MS_U8 u8GOP, MS_U16* u16YContrast, MS_U16* u16UContrast, MS_U16* u16VContrast);
1272 //-------------------------------------------------------------------------------------------------
1273 /// API for VE captue
1274 /// @ingroup GOP_VE
1275 /// @param pstVECapState \b IN: paramater of capture
1276 /// @return GOP_API_SUCCESS - Success
1277 /// @return GOP_API_FAIL - Failure
1278 //-------------------------------------------------------------------------------------------------
1279 DLL_PUBLIC E_GOP_API_Result MApi_GOP_EnaVECapture(PMS_GOP_VECAPTURESTATE pstVECapState);
1280 //-------------------------------------------------------------------------------------------------
1281 /// API for get VE captue status
1282 /// @ingroup GOP_VE
1283 /// @param pstVECapState \b IN: paramater of capture
1284 /// @return GOP_API_SUCCESS - Success
1285 /// @return GOP_API_FAIL - Failure
1286 //-------------------------------------------------------------------------------------------------
1287 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GetVECaptureState(PMS_GOP_VECAPTURESTATE pstVECapState);
1288 //-------------------------------------------------------------------------------------------------
1289 /// API for wait one frame done
1290 /// @ingroup GOP_VE
1291 /// @param pstVECapState \b IN: paramater of capture
1292 /// @return GOP_API_SUCCESS - Success
1293 /// @return GOP_API_FAIL - Failure
1294 //-------------------------------------------------------------------------------------------------
1295 DLL_PUBLIC E_GOP_API_Result MApi_GOP_VECaptureWaitOnFrame(PMS_GOP_VECAPTURESTATE pstVECapState);
1296 
1297 /*******************************************************************************/
1298 //Set configuration for special cases
1299 ///        - This is for special case usage. Do NOT overuse this function
1300 /// @param type \b IN:  Config type
1301 ///        - 0: E_GOP_IGNOREINIT,
1302 ///           - 1: E_GOP_CONSALPHA_BITS
1303 /// @param plist \b IN:  Config list for the specific type
1304 //         - This list could be an enum or a structure
1305 //@return GOP_API_SUCCESS - Success
1306 /*******************************************************************************/
1307 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetConfig(EN_GOP_CONFIG_TYPE type, void *plist);
1308 
1309 /********************************************************************************/
1310 /// Set config by GOP; For dynamic usage.
1311 /// @param u8GOP \b IN:  GOP number
1312 /// @param enType \b IN:  GOP info type
1313 /// @param pstInfo \b IN misc info
1314 /// @return GOP_API_SUCCESS - Success
1315 /// @return GOP_API_FAIL - Failure
1316 /********************************************************************************/
1317 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_SetConfigEx(MS_U8 u8Gop, EN_GOP_CONFIG_TYPE enType, void *plist);
1318 
1319 /********************************************************************************/
1320 /// Get config by GOP.
1321 /// @param u8GOP \b IN:  GOP number
1322 /// @param enType \b IN:  GOP info type
1323 /// @param pstInfo \b IN misc info
1324 /// @return GOP_API_SUCCESS - Success
1325 /// @return GOP_API_FAIL - Failure
1326 /********************************************************************************/
1327 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GetConfigEx(MS_U8 u8Gop, EN_GOP_CONFIG_TYPE enType, void *plist);
1328 //-----------------
1329 // 3D
1330 //-----------------
1331 //-------------------------------------------------------------------------------------------------
1332 /// API for set GWIN 3D Mode
1333 /// @ingroup 3D
1334 /// @param u8GwinId \b IN: GWin ID
1335 /// @param u16MainFBId \b IN: Main-Frame Buffer ID
1336 /// @param u16SubFBId \b IN: Sub-Frame Buffer ID
1337 /// @param EN_3DOSD_Mode \b IN: 3D Osd mode select.
1338 /// @return GOP_API_SUCCESS - Success
1339 DLL_PUBLIC E_GOP_API_Result MApi_GOP_Set3DOSDMode(MS_U8 u8Gwin, MS_U16 u16MainFBId, MS_U16 u16SubFBId,EN_GOP_3D_MODETYPE en3DMode);
1340 
1341 //-------------------------------------------------------------------------------------------------
1342 /// API for change L/R frame for GOP 3D function
1343 /// @ingroup 3D
1344 /// @param u8GOP \b IN: GOP ID
1345 /// @return GOP_API_SUCCESS - Success
1346 //-------------------------------------------------------------------------------------------------
1347 DLL_PUBLIC E_GOP_API_Result MApi_GOP_Set3D_LR_FrameExchange(MS_U8 u8GOP);
1348 //-------------------------------------------------------------------------------------------------
1349 /// MApi_GOP_Set_GPIO3DPin
1350 /// @ingroup GOP_ToBeRemove
1351 /// @return GOP_API_SUCCESS - Success
1352 //-------------------------------------------------------------------------------------------------
1353 DLL_PUBLIC E_GOP_API_Result MApi_GOP_Set_GPIO3DPin(MS_U32 u32GPIO3DPin);
1354 //-------------------------------------------------------------------------------------------------
1355 /// API for Query GOP Capability
1356 /// @ingroup GOP_CAPS
1357 /// @param eCapType \b IN: Capability type
1358 /// @param pRet     \b OUT: return value
1359 /// @param ret_size \b IN: input structure size
1360 /// @return GOP_API_SUCCESS - Success
1361 //-------------------------------------------------------------------------------------------------
1362 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GetChipCaps(EN_GOP_CAPS eCapType, void* pRet, MS_U32 ret_size);
1363 //-----------------
1364 // GOP_TEST_PATTERN
1365 //-----------------
1366 //-------------------------------------------------------------------------------------------------
1367 /// Set test pattern
1368 /// @ingroup GOP_TEST_PATTERN
1369 /// @param eTstPatternType      \b IN:  test pattern type
1370 /// @param u32ARGB              \b IN   color
1371 /// @return GOP_API_SUCCESS - Success
1372 //-------------------------------------------------------------------------------------------------
1373 DLL_PUBLIC E_GOP_API_Result MApi_GOP_TestPattern(EN_GOP_TST_PATTERN eTstPatternType, MS_U32 u32ARGB);
1374 //-------------------------------------------------------------------------------------------------
1375 /// Set test pattern alpha
1376 /// @ingroup GOP_TEST_PATTERN
1377 /// @param bTSTAlpha            \b IN:  test pattern alpha
1378 /// @return GOP_API_SUCCESS - Success
1379 //-------------------------------------------------------------------------------------------------
1380 DLL_PUBLIC E_GOP_API_Result MApi_GOP_TestPatternAlpha_Enable(MS_BOOL bTSTAlpha);
1381 //-------------------------------------------------------------------------------------------------
1382 /// MApi_GOP_IsRegUpdated
1383 /// @ingroup GOP_ToBeRemove
1384 /// @return GOP_API_SUCCESS - Success
1385 //-------------------------------------------------------------------------------------------------
1386 DLL_PUBLIC E_GOP_API_Result MApi_GOP_IsRegUpdated(MS_U8 u8GopType);
1387 
1388 /*******************************************************************************/
1389 //Get Layer From GOP
1390 //@param u32GOP \b IN: gop id
1391 //@return MS_U32 - the layer id which the gop is on, LAYER_ID_INVALID for invalid
1392 /*******************************************************************************/
1393 DLL_PUBLIC MS_U32 MApi_GOP_GWIN_GetLayerFromGOP(MS_U32 u32GOP);
1394 
1395 /*******************************************************************************/
1396 //Get GOP From layer
1397 //@param u32Layer \b IN: layer id
1398 //@return MS_U32 - the gop id which the layer have,  INVALID_GOP_NUM for invalid
1399 /*******************************************************************************/
1400 // DLL_PUBLIC MS_U32 MApi_GOP_GWIN_GetGOPFromLayer(MS_U32 u32Layer);
1401 
1402 //-----------------
1403 // ENABLE
1404 //-----------------
1405 //-------------------------------------------------------------------------------------------------
1406 /// Enable GWIN for display
1407 /// @ingroup ENABLE
1408 /// @param winId \b IN: GWIN id
1409 /// @param bEnable \b IN:
1410 ///   - # TRUE Show GWIN
1411 ///   - # FALSE Hide GWIN
1412 /// @return GOP_API_SUCCESS - Success
1413 /// @return GOP_API_FAIL - Failure
1414 //-------------------------------------------------------------------------------------------------
1415 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Enable(MS_U8 winId, MS_BOOL bEnable);
1416 //-------------------------------------------------------------------------------------------------
1417 /// MApi_GOP_GWIN_EnableTransClr
1418 /// @ingroup GOP_ToBeRemove
1419 /// @return GOP_API_SUCCESS - Success
1420 //-------------------------------------------------------------------------------------------------
1421 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_EnableTransClr(EN_GOP_TRANSCLR_FMT fmt, MS_BOOL bEnable);
1422 //-----------------
1423 // TRANSPARENT_CLR_CEY
1424 //-----------------
1425 //-------------------------------------------------------------------------------------------------
1426 /// Enable gop transparent color
1427 /// @ingroup TRANSPARENT_CLR_CEY
1428 /// @param fmt \b IN: RGB mode or u8Index mode color format
1429 /// @param bEnable \b IN:
1430 ///   - # TRUE Enable gop transparent color
1431 ///   - # FALSE Disable gop transparent color
1432 /// @return GOP_API_SUCCESS - Success
1433 //-------------------------------------------------------------------------------------------------
1434 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_EnableTransClr_EX(MS_U8 u8GOP,EN_GOP_TRANSCLR_FMT fmt, MS_BOOL bEnable);
1435 //-------------------------------------------------------------------------------------------------
1436 /// MApi_GOP_GWIN_EnableProgressive
1437 /// @ingroup GOP_ToBeRemove
1438 /// @return GOP_API_SUCCESS - Success
1439 //-------------------------------------------------------------------------------------------------
1440 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_EnableProgressive(MS_BOOL bEnable);
1441 //-------------------------------------------------------------------------------------------------
1442 /// Enable gop progressive mode
1443 /// @ingroup GOP_OPTION
1444 /// @param u8GOP \b IN:  GOP number
1445 /// @param bEnable \b IN:
1446 ///   - # TRUE Enable gop progressive mode
1447 ///   - # FALSE Disable gop progressive mode
1448 /// @return GOP_API_SUCCESS - Success
1449 //-------------------------------------------------------------------------------------------------
1450 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_EnableProgressive_EX(MS_U8 u8GOP,MS_BOOL bEnable);
1451 //-----------------
1452 // GWIN_DELETE
1453 //-----------------
1454 //-------------------------------------------------------------------------------------------------
1455 /// Delete the GWIN, free corresponding frame buffer
1456 /// @ingroup GWIN_DELETE
1457 /// @param winId \b IN GWIN id
1458 /// @return GOP_API_SUCCESS - Success
1459 /// @return GOP_API_FAIL - Failure
1460 //-------------------------------------------------------------------------------------------------
1461 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_DeleteWin(MS_U8 winId);
1462 //-------------------------------------------------------------------------------------------------
1463 /// MApi_GOP_GWIN_ReleaseWin
1464 /// @ingroup GOP_ToBeRemove
1465 /// @return GOP_API_SUCCESS - Success
1466 //-------------------------------------------------------------------------------------------------
1467 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_ReleaseWin(MS_U8 gId);
1468 //-------------------------------------------------------------------------------------------------
1469 /// MApi_GOP_GWIN_DestroyWin
1470 /// @ingroup GOP_ToBeRemove
1471 /// @return GOP_API_SUCCESS - Success
1472 //-------------------------------------------------------------------------------------------------
1473 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_DestroyWin(MS_U8 gId);
1474 //-------------------------------------------------------------------------------------------------
1475 /// MApi_GOP_GWIN_DeleteWinHVSize
1476 /// @ingroup GOP_ToBeRemove
1477 /// @return GOP_API_SUCCESS - Success
1478 //-------------------------------------------------------------------------------------------------
1479 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_DeleteWinHVSize(MS_U8 u8GOP, MS_U16 u16HSize, MS_U16 u16VSize);
1480 
1481 /*******************************************************************************/
1482 //Set which OSD Layer select which GOP
1483 //@param pGopLayer \b IN:information about GOP and corresponding Layer
1484 //   #u32LayerCounts: the total GOP/Layer counts to set
1485 //   #stGopLayer[i].u32GopIndex :the GOP which need to change Layer
1486 //   #stGopLayer[i].u32LayerIndex :the GOP corresponding Layer
1487 //@return GOP_API_SUCCESS - Success
1488 /*******************************************************************************/
1489 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetLayer(GOP_LayerConfig *pGopLayer, MS_U32 u32SizeOfLayerInfo);
1490 /*******************************************************************************/
1491 //Get which OSD Layer select which GOP
1492 //@param pGopLayer \b OUT:information about GOP and corresponding Layer
1493 //   #u32LayerCounts: the total GOP/Layer inited
1494 //   #stGopLayer[i].u32GopIndex :the GOP which need to change Layer
1495 //   #stGopLayer[i].u32LayerIndex :the GOP corresponding Layer
1496 //@return GOP_API_SUCCESS - Success
1497 /*******************************************************************************/
1498 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetLayer(GOP_LayerConfig *pGopLayer, MS_U32 u32SizeOfLayerInfo);
1499 //-------------------------------------------------------------------------------------------------
1500 /// MApi_GOP_GWIN_OutputColor
1501 /// @ingroup GOP_ToBeRemove
1502 /// @return GOP_API_SUCCESS - Success
1503 //-------------------------------------------------------------------------------------------------
1504 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_OutputColor(EN_GOP_OUTPUT_COLOR type);
1505 //-----------------
1506 // COLOR_TRANSFOR
1507 //-----------------
1508 //-------------------------------------------------------------------------------------------------
1509 /// Set gop output color type
1510 /// @ingroup COLOR_TRANSFOR
1511 /// @param type \b IN: gop output color type
1512 ///   - # GOPOUT_RGB => RGB mode
1513 ///   - # GOPOUT_YUV => YUV mode
1514 /// @return GOP_API_SUCCESS - Success
1515 //-------------------------------------------------------------------------------------------------
1516 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_OutputColor_EX(MS_U8 u8GOP,EN_GOP_OUTPUT_COLOR type);
1517 //-------------------------------------------------------------------------------------------------
1518 /// MApi_GOP_GWIN_SwapOverlapWin
1519 /// @ingroup GOP_ToBeRemove
1520 /// @return GOP_API_SUCCESS - Success
1521 //-------------------------------------------------------------------------------------------------
1522 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SwapOverlapWin(MS_U8 u8GOP, MS_U8 u8win);
1523 //-----------------
1524 // GWIN_OPTION
1525 //-----------------
1526 //-----------------
1527 // GWIN_ORDER
1528 //-----------------
1529 //-------------------------------------------------------------------------------------------------
1530 /// Set GWIN relative Priority
1531 /// Will Ensure Gwin Priority in the same sequence in hw as pGwinPri defined
1532 /// @ingroup GWIN_ORDER
1533 /// @param u8GOP \b IN:  GOP number
1534 /// @param pGwinPri \b IN: Relative Gwin ID Priority Defines
1535 /// @return GOP_API_SUCCESS - Success
1536 /// @return GOP_API_FAIL - Failure
1537 //-------------------------------------------------------------------------------------------------
1538 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetRelativeWinPrio(MS_U8 u8GOP, GOP_GwinPri *pGwinPri);
1539 //-------------------------------------------------------------------------------------------------
1540 /// MApi_GOP_GWIN_Switch2Gwin
1541 /// @ingroup GOP_ToBeRemove
1542 /// @return GOP_API_SUCCESS - Success
1543 //-------------------------------------------------------------------------------------------------
1544 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Switch2Gwin(MS_U8 winId);
1545 //-------------------------------------------------------------------------------------------------
1546 /// MApi_GOP_GWIN_SetAlphaInverse
1547 /// @ingroup GOP_ToBeRemove
1548 /// @return GOP_API_SUCCESS - Success
1549 //-------------------------------------------------------------------------------------------------
1550 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetAlphaInverse(MS_BOOL bEnable);
1551 //-------------------------------------------------------------------------------------------------
1552 /// Enable/Disable gop alpha inverse
1553 /// @param u8GOP \b IN:  GOP number
1554 /// @ingroup GOP_OPTION
1555 /// @param bEnable \b IN: TRUE or FALSE
1556 /// @return GOP_API_SUCCESS - Success
1557 //-------------------------------------------------------------------------------------------------
1558 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetAlphaInverse_EX(MS_U8 u8GOP,MS_BOOL bEnable);
1559 //-------------------------------------------------------------------------------------------------
1560 /// MApi_GOP_GWIN_GetAlphaInverse
1561 /// @ingroup GOP_ToBeRemove
1562 /// @return GOP_API_SUCCESS - Success
1563 //-------------------------------------------------------------------------------------------------
1564 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetAlphaInverse(MS_BOOL *bEnable);
1565 //-------------------------------------------------------------------------------------------------
1566 /// Get gop alpha inverse setting
1567 /// @param u8GOP \b IN:  GOP number
1568 /// @ingroup GOP_OPTION
1569 /// @param bEnable \b OUT: TRUE or FALSE
1570 /// @return GOP_API_SUCCESS - Success
1571 //-------------------------------------------------------------------------------------------------
1572 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_GetAlphaInverse_EX(MS_U8 u8GOP,MS_BOOL *bEnable);
1573 //-------------------------------------------------------------------------------------------------
1574 /// MApi_GOP_GWIN_SetPalette
1575 /// @ingroup GOP_ToBeRemove
1576 /// @return GOP_API_SUCCESS - Success
1577 //-------------------------------------------------------------------------------------------------
1578 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetPalette(void);
1579 
1580 /******************************************************************************/
1581 /// Enable/Disable multi alpha for one gop
1582 /// @param u32GopIdx \b IN: gop ID
1583 /// @param bEnable \b IN: TRUE/FALSE
1584 /// @return GOP_API_SUCCESS - Success
1585 /******************************************************************************/
1586 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_EnableMultiAlpha(MS_U32 u32GopIdx, MS_BOOL bEnable);
1587 
1588 /******************************************************************************/
1589 /// get multi alpha status for one gop
1590 /// @param u32GopIdx \b IN: gop ID
1591 /// @return multi alpha status
1592 /******************************************************************************/
1593 // DLL_PUBLIC SYMBOL_WEAK MS_BOOL MApi_GOP_GWIN_IsMultiAlphaEnable(MS_U32 u32GopIdx);
1594 //-------------------------------------------------------------------------------------------------
1595 /// MApi_GOP_GWIN_SetAlphaValue
1596 /// @ingroup GOP_ToBeRemove
1597 /// @return GOP_API_SUCCESS - Success
1598 //-------------------------------------------------------------------------------------------------
1599 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetAlphaValue(MS_U16 * Gwin01AlphaValue, MS_U16 * Gwin23AlphaValue);
1600 DLL_PUBLIC void MApi_GOP_GWIN_SetHScroll(MS_U8 nWinID, MS_U8 nRate, MS_BOOL bEnable);
1601 DLL_PUBLIC void MApi_GOP_GWIN_SetVScroll(MS_U8 nWinID, MS_U8 nRate, MS_BOOL bEnable);
1602 //-----------------
1603 // SCROLL
1604 //-----------------
1605 //-------------------------------------------------------------------------------------------------
1606 /// API for Set Scroll rate for Gwin
1607 /// @ingroup SCROLL
1608 /// @param winId \b IN: GWIN id
1609 /// @param bEnable \b IN:
1610 ///   - # TRUE Enable Tile Mode for GWIN
1611 ///   - # FALSE Disable Tile Mode for GWIN
1612 /// @return GOP_API_SUCCESS - Success
1613 /// @return GOP_API_FAIL - Failure
1614 //-------------------------------------------------------------------------------------------------
1615 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetScrollRate(MS_U8 u8rate);
1616 //-------------------------------------------------------------------------------------------------
1617 /// Set back ground window
1618 /// @ingroup SCROLL
1619 /// @param u8WinId              \b IN:  GWIN number
1620 /// @param type                 \b IN:  scroll type
1621 /// @param u16Offset            \b IN:  scroll offset
1622 /// @param bEnable              \b IN:  Enable/Disable
1623 /// @return GOP_API_SUCCESS - Success
1624 /// @return GOP_API_FAIL - Failure
1625 //-------------------------------------------------------------------------------------------------
1626 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetScrollType(MS_U8 u8WinId, GOP_SCROLL_TYPE type,  MS_U16 u16Offset, MS_BOOL bEnable );
1627 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetSWScrollBuffer(MS_U16 bufNum, MS_U32* pBuffer);
1628 //-------------------------------------------------------------------------------------------------
1629 /// MApi_GOP_GWIN_SetFMT0TransClr
1630 /// @ingroup GOP_ToBeRemove
1631 /// @return GOP_API_SUCCESS - Success
1632 //-------------------------------------------------------------------------------------------------
1633 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetFMT0TransClr(MS_U16 clr);
1634 //-------------------------------------------------------------------------------------------------
1635 /// MApi_GOP_GWIN_SetFMT0TransClr_EX
1636 /// @ingroup GOP_ToBeRemove
1637 /// @return GOP_API_SUCCESS - Success
1638 //-------------------------------------------------------------------------------------------------
1639 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetFMT0TransClr_EX(MS_U8 u8GOP,MS_U16 clr);
1640 //-------------------------------------------------------------------------------------------------
1641 /// MApi_GOP_GWIN_SetTransClr_8888
1642 /// @ingroup GOP_ToBeRemove
1643 /// @return GOP_API_SUCCESS - Success
1644 //-------------------------------------------------------------------------------------------------
1645 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetTransClr_8888(MS_U32 clr, MS_U32 mask);
1646 //-------------------------------------------------------------------------------------------------
1647 /// MApi_GOP_GWIN_SetTransClr_8888_EX
1648 /// @ingroup GOP_ToBeRemove
1649 /// @return GOP_API_SUCCESS - Success
1650 //-------------------------------------------------------------------------------------------------
1651 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetTransClr_8888_EX(MS_U8 u8GOP,MS_U32 clr, MS_U32 mask);
1652 //-------------------------------------------------------------------------------------------------
1653 /// MApi_GOP_GWIN_EnableT3DMode
1654 /// @ingroup GOP_ToBeRemove
1655 /// @return GOP_API_SUCCESS - Success
1656 //-------------------------------------------------------------------------------------------------
1657 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_EnableT3DMode(MS_BOOL bEnable);
1658 
1659 /********************************************************************************/
1660 /// Set GWIN alpha blending
1661 /// @param u8win \b IN GWIN id
1662 /// @param bEnable \b IN
1663 ///   - # TRUE enable pixel alpha
1664 ///   - # FALSE disable pixel alpha
1665 /// @param u8coef \b IN alpha blending coefficient (0-7)
1666 /// @return GOP_API_SUCCESS - Success
1667 /// if setting constant alpha blending,please firstly set User_ConsAlpha_bits by calling MApi_GOP_SetConfig(...)
1668 /// example:
1669 /// MS_U32 aConf32[] = {DRV_VALID_8BITS};
1670 /// MApi_GOP_SetConfig(E_GOP_CONSALPHA_BITS,aConf32);
1671 /// MApi_GOP_GWIN_SetBlending(0, FALSE, 0xFF);
1672 /********************************************************************************/
1673 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetBlending(MS_U8 u8win, MS_BOOL bEnable, MS_U8 u8coef);
1674 //-------------------------------------------------------------------------------------------------
1675 /// MApi_GOP_GWIN_SetDuplication
1676 /// @ingroup GOP_ToBeRemove
1677 /// @return GOP_API_SUCCESS - Success
1678 //-------------------------------------------------------------------------------------------------
1679 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetDuplication(MS_U8 hext, MS_U8 vext);
1680 //-----------------
1681 // SET_GWIN_WINDOW
1682 //-----------------
1683 //-------------------------------------------------------------------------------------------------
1684 /// Set the GWIN's position
1685 /// @ingroup SET_GWIN_WINDOW
1686 /// @param winId  \b IN: GWIN id
1687 /// @param dispX \b IN: x coordinate
1688 /// @param dispY \b IN: y coordinate
1689 /// @return GOP_API_SUCCESS - Success
1690 /// @return GOP_API_FAIL - Failure
1691 //-------------------------------------------------------------------------------------------------
1692 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetWinPosition(MS_U8 winId, MS_U16 dispX, MS_U16 dispY);
1693 //-------------------------------------------------------------------------------------------------
1694 /// MApi_GOP_GWIN_SetWinPositionOffset
1695 /// @ingroup GOP_ToBeRemove
1696 /// @return GOP_API_SUCCESS - Success
1697 //-------------------------------------------------------------------------------------------------
1698 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetWinPositionOffset(MS_U8 winId, MS_U16 x, MS_U16 y);
1699 //-------------------------------------------------------------------------------------------------
1700 /// MApi_GOP_GWIN_SetWinProperty
1701 /// @ingroup GOP_ToBeRemove
1702 /// @return GOP_API_SUCCESS - Success
1703 //-------------------------------------------------------------------------------------------------
1704 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetWinProperty(GOP_GwinDispProperty WinProperty);
1705 
1706 //-----------------
1707 // GOP_CONFIG
1708 //-----------------
1709 //-----------------
1710 // DST
1711 //-----------------
1712 //-------------------------------------------------------------------------------------------------
1713 /// Configure the destination of a specific GOP
1714 /// @ingroup DST
1715 /// @param u8GOP \b IN : Number of GOP
1716 /// @param dsttype \b IN : GOP destination
1717 /// @return GOP_API_SUCCESS - Success
1718 /// @return GOP_API_ENUM_NOT_SUPPORTED - GOP destination not support
1719 //-------------------------------------------------------------------------------------------------
1720 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetGOPDst(MS_U8 u8GOP, EN_GOP_DST_TYPE dsttype);
1721 //-----------------
1722 // BLINK
1723 //-----------------
1724 //-------------------------------------------------------------------------------------------------
1725 /// Set GWIN Blink
1726 /// @ingroup BLINK
1727 /// @param bEnable \b IN
1728 ///   - # TRUE enable
1729 ///   - # FALSE disable
1730 /// @param u8rate \b IN Blink frame rate
1731 /// @return GOP_API_SUCCESS - Success
1732 //-------------------------------------------------------------------------------------------------
1733 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetBlink(MS_BOOL bEnable, MS_U8 u8rate);
1734 //-------------------------------------------------------------------------------------------------
1735 /// MApi_GOP_GWIN_SetFieldInver
1736 /// @ingroup GOP_ToBeRemove
1737 /// @return GOP_API_SUCCESS - Success
1738 //-------------------------------------------------------------------------------------------------
1739 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetFieldInver(MS_BOOL enable);
1740 //-------------------------------------------------------------------------------------------------
1741 /// Enable/disable GOP field inverse
1742 /// @param u8GOP \b IN:  GOP number
1743 /// @ingroup GOP_OPTION
1744 /// @param enable  \b IN TRUE/FALSE
1745 /// @return GOP_API_SUCCESS - Success
1746 //-------------------------------------------------------------------------------------------------
1747 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetFieldInver_EX(MS_U8 u8GOP,MS_BOOL enable);
1748 //-------------------------------------------------------------------------------------------------
1749 /// Set stretch window property
1750 /// @ingroup SET_STRETCH_WINDOW
1751 /// @param u8GOP_num \b IN 0: GOP0  1:GOP1
1752 /// @param eDstType \b IN \copydoc EN_GOP_DST_TYPE
1753 /// @param x \b IN stretch window horizontal start position
1754 /// @param y \b IN stretch window vertical start position
1755 /// @param width \b IN stretch window width
1756 /// @param height \b IN stretch window height
1757 /// @return GOP_API_SUCCESS - Success
1758 /// @return GOP_API_FAIL - Failure
1759 //-------------------------------------------------------------------------------------------------
1760 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_STRETCHWIN(MS_U8 u8GOP_num, EN_GOP_DST_TYPE eDstType,MS_U16 x, MS_U16 y, MS_U16 width, MS_U16 height);
1761 //-------------------------------------------------------------------------------------------------
1762 /// Set stretch window position
1763 /// @ingroup SET_STRETCH_WINDOW
1764 /// @param u8GOPNum \b IN 0: GOP0  1:GOP1
1765 /// @param u16DispX \b IN stretch window horizontal start position
1766 /// @param u16DispY \b IN stretch window vertical start position
1767 /// @return GOP_API_SUCCESS - Success
1768 /// @return GOP_API_INVALID_PARAMETERS - Failure
1769 //-------------------------------------------------------------------------------------------------
1770 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetStretchWinPosition(MS_U8 u8GOPNum, MS_U16 u16DispX, MS_U16 u16DispY);
1771 //-------------------------------------------------------------------------------------------------
1772 /// MApi_GOP_GWIN_SetHDisplaySize
1773 /// @ingroup GOP_ToBeRemove
1774 /// @return GOP_API_SUCCESS - Success
1775 //-------------------------------------------------------------------------------------------------
1776 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetHDisplaySize(MS_U8 gId, MS_U16 Width,MS_U16 X_Start);
1777 //-------------------------------------------------------------------------------------------------
1778 /// Set GWIN information to GOP registers
1779 /// @ingroup SET_GWIN_WINDOW
1780 /// @param u8win \b IN: GWINID
1781 /// @param pinfo \b IN: GWIN Information
1782 /// @return GOP_API_SUCCESS - Success
1783 /// @return GOP_API_FAIL - Failure
1784 //-------------------------------------------------------------------------------------------------
1785 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetWinInfo(MS_U8 u8win, GOP_GwinInfo* pinfo);
1786 //-------------------------------------------------------------------------------------------------
1787 /// MApi_GOP_GWIN_SetTransClr
1788 /// @ingroup GOP_ToBeRemove
1789 /// @return GOP_API_SUCCESS - Success
1790 //-------------------------------------------------------------------------------------------------
1791 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetTransClr(EN_GOP_TRANSCLR_FMT fmt, MS_U16 clr);
1792 //-------------------------------------------------------------------------------------------------
1793 /// Set transparent color for the GWIN
1794 /// @ingroup TRANSPARENT_CLR_CEY
1795 /// @param fmt \b IN:
1796 ///  # GOPTRANSCLR_FMT0: RGB mode
1797 ///  # GOPTRANSCLR_FMT1: index mode
1798 /// @param clr \b IN Transparent color for in specific color format. Note that this is only for
1799 /// GOPTRANSCLR_FMT0(RGB mode) use. If you use GOPTRANSCLR_FMT1 (index mode), do not care this
1800 /// @return GOP_API_SUCCESS - Success
1801 //-------------------------------------------------------------------------------------------------
1802 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetTransClr_EX(MS_U8 u8GOP,EN_GOP_TRANSCLR_FMT fmt, MS_U16 clr);
1803 //-------------------------------------------------------------------------------------------------
1804 /// MApi_GOP_GWIN_SetWinDispPosition
1805 /// @ingroup GOP_ToBeRemove
1806 /// @return GOP_API_SUCCESS - Success
1807 //-------------------------------------------------------------------------------------------------
1808 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetWinDispPosition(MS_U8 gId, MS_U16 dispX, MS_U16 dispY);
1809 //-------------------------------------------------------------------------------------------------
1810 /// MApi_GOP_GWIN_SetHMirror
1811 /// @ingroup GOP_ToBeRemove
1812 /// @return GOP_API_SUCCESS - Success
1813 //-------------------------------------------------------------------------------------------------
1814 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetHMirror(MS_BOOL bEnable);
1815 //-----------------
1816 // MIRROR
1817 //-----------------
1818 //-------------------------------------------------------------------------------------------------
1819 /// Set GOP H-Mirror
1820 /// @ingroup MIRROR
1821 /// @param u8GOP \b IN : Number of GOP
1822 /// @param bEnable \b IN
1823 ///   - # TRUE enable
1824 ///   - # FALSE disable
1825 /// @return GOP_API_SUCCESS - Success
1826 //-------------------------------------------------------------------------------------------------
1827 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetHMirror_EX(MS_U8 u8GOP,MS_BOOL bEnable);
1828 //-------------------------------------------------------------------------------------------------
1829 /// MApi_GOP_GWIN_SetVMirror
1830 /// @ingroup GOP_ToBeRemove
1831 /// @return GOP_API_SUCCESS - Success
1832 //-------------------------------------------------------------------------------------------------
1833 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetVMirror(MS_BOOL bEnable);
1834 //-------------------------------------------------------------------------------------------------
1835 /// Set GOP V-Mirror
1836 /// @ingroup MIRROR
1837 /// @param u8GOP \b IN : Number of GOP
1838 /// @param bEnable \b IN
1839 ///   - # TRUE enable
1840 ///   - # FALSE disable
1841 /// @return GOP_API_SUCCESS - Success
1842 //-------------------------------------------------------------------------------------------------
1843 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetVMirror_EX(MS_U8 u8GOP,MS_BOOL bEnable);
1844 //-------------------------------------------------------------------------------------------------
1845 /// MApi_GOP_GWIN_IsMirrorOn
1846 /// @ingroup GOP_ToBeRemove
1847 /// @return GOP_API_SUCCESS - Success
1848 //-------------------------------------------------------------------------------------------------
1849 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_IsMirrorOn(MS_BOOL *bHMirror, MS_BOOL *bVMirror);
1850 //-------------------------------------------------------------------------------------------------
1851 /// Get GOP Mirror status
1852 /// @ingroup MIRROR
1853 /// @param u8GOP \b IN : Number of GOP
1854 /// @param bHMirror          \b IN : H mirror status
1855 /// @param bVMirror          \b IN : V mirror status
1856 /// @return GOP_API_SUCCESS - Success
1857 //-------------------------------------------------------------------------------------------------
1858 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_IsMirrorOn_EX(MS_U8 u8GOP,MS_BOOL *bHMirror, MS_BOOL *bVMirror);
1859 //-------------------------------------------------------------------------------------------------
1860 /// MApi_GOP_GWIN_Set_HSCALE
1861 /// @ingroup GOP_ToBeRemove
1862 /// @return GOP_API_SUCCESS - Success
1863 //-------------------------------------------------------------------------------------------------
1864 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_HSCALE(MS_BOOL bEnable, MS_U16 src, MS_U16 dst) ;
1865 //-----------------
1866 // SCALE
1867 //-----------------
1868 //-------------------------------------------------------------------------------------------------
1869 /// Set stretch window H-Stretch ratio.
1870 /// Example: gwin size:960*540  target gwin size: 1920*1080
1871 ///     step1: MApi_GOP_GWIN_Set_HSCALE(TRUE, 960, 1920);
1872 ///     step2: MApi_GOP_GWIN_Set_VSCALE(TRUE, 540, 1080);
1873 ///     step3: MApi_GOP_GWIN_Set_STRETCHWIN(u8GOPNum, E_GOP_DST_OP0, 0, 0, 960, 540);
1874 /// @ingroup SCALE
1875 /// @param u8GOP \b IN:  GOP number
1876 /// @param bEnable \b IN:
1877 ///   - # TRUE enable
1878 ///   - # FALSE disable
1879 /// @param src \b IN: original size
1880 /// @param dst \b IN: target size
1881 /// @return GOP_API_SUCCESS - Success
1882 //-------------------------------------------------------------------------------------------------
1883 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_HSCALE_EX(MS_U8 u8GOP,MS_BOOL bEnable, MS_U16 src, MS_U16 dst);
1884 //-------------------------------------------------------------------------------------------------
1885 /// MApi_GOP_GWIN_Set_VSCALE
1886 /// @ingroup GOP_ToBeRemove
1887 /// @return GOP_API_SUCCESS - Success
1888 //-------------------------------------------------------------------------------------------------
1889 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_VSCALE(MS_BOOL bEnable, MS_U16 src, MS_U16 dst) ;
1890 
1891 //-------------------------------------------------------------------------------------------------
1892 /// Set stretch window V-Stretch ratio.
1893 /// Example: gwin size:960*540  target gwin size: 1920*1080
1894 ///     step1: MApi_GOP_GWIN_Set_HSCALE(TRUE, 960, 1920);
1895 ///     step2: MApi_GOP_GWIN_Set_VSCALE(TRUE, 540, 1080);
1896 ///     step3: MApi_GOP_GWIN_Set_STRETCHWIN(u8GOPNum, E_GOP_DST_OP0, 0, 0, 960, 540);
1897 /// @ingroup SCALE
1898 /// @param u8GOP \b IN:  GOP number
1899 /// @param bEnable \b IN:
1900 ///   - # TRUE enable
1901 ///   - # FALSE disable
1902 /// @param src \b IN: original size
1903 /// @param dst \b IN: target size
1904 /// @return GOP_API_SUCCESS - Success
1905 //-------------------------------------------------------------------------------------------------
1906 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_VSCALE_EX(MS_U8 u8GOP,MS_BOOL bEnable, MS_U16 src, MS_U16 dst);
1907 //-------------------------------------------------------------------------------------------------
1908 /// MApi_GOP_GWIN_Set_HStretchMode
1909 /// @ingroup GOP_ToBeRemove
1910 /// @return GOP_API_SUCCESS - Success
1911 //-------------------------------------------------------------------------------------------------
1912 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_HStretchMode(EN_GOP_STRETCH_HMODE HStrchMode);
1913 //-------------------------------------------------------------------------------------------------
1914 /// Set GOP H stretch mode
1915 /// @ingroup SCALE
1916 /// @param u8GOP \b IN:  GOP number
1917 /// @param HStrchMode \b IN:
1918 ///   - # E_GOP_HSTRCH_6TAPE
1919 ///   - # E_GOP_HSTRCH_DUPLICATE
1920 /// @return GOP_API_SUCCESS - Success
1921 //-------------------------------------------------------------------------------------------------
1922 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_Set_HStretchMode_EX(MS_U8 u8GOP,EN_GOP_STRETCH_HMODE HStrchMode);
1923 //-------------------------------------------------------------------------------------------------
1924 /// MApi_GOP_GWIN_Set_VStretchMode
1925 /// @ingroup GOP_ToBeRemove
1926 /// @return GOP_API_SUCCESS - Success
1927 //-------------------------------------------------------------------------------------------------
1928 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_VStretchMode(EN_GOP_STRETCH_VMODE VStrchMode);
1929 //-------------------------------------------------------------------------------------------------
1930 /// Set GOP V stretch mode
1931 /// @ingroup SCALE
1932 /// @param u8GOP \b IN:  GOP number
1933 /// @param VStrchMode \b IN:
1934 ///   - # E_GOP_VSTRCH_LINEAR
1935 ///   - # E_GOP_VSTRCH_DUPLICATE
1936 ///   - # E_GOP_VSTRCH_NEAREST
1937 /// @return GOP_API_SUCCESS - Success
1938 //-------------------------------------------------------------------------------------------------
1939 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_Set_VStretchMode_EX(MS_U8 u8GOP,EN_GOP_STRETCH_VMODE VStrchMode);
1940 //-------------------------------------------------------------------------------------------------
1941 /// MApi_GOP_GWIN_Set_TranspColorStretchMode
1942 /// @ingroup GOP_ToBeRemove
1943 /// @return GOP_API_SUCCESS - Success
1944 //-------------------------------------------------------------------------------------------------
1945 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_TranspColorStretchMode(EN_GOP_STRCH_TRANSPCOLORMODE  TColorStrchMode);
1946 //-------------------------------------------------------------------------------------------------
1947 /// Set GOP Transparent color Stretch Mode
1948 /// @ingroup SCALE
1949 /// @param u8GOP \b IN:  GOP number
1950 /// @param VStrchMode \b IN:
1951 ///   - # E_GOP_TRANSPCOLOR_STRCH_DUPLICATE
1952 ///   - # E_GOP_TRANSPCOLOR_STRCH_ASNORMAL
1953 /// @return GOP_API_SUCCESS - Success
1954 //-------------------------------------------------------------------------------------------------
1955 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_Set_TranspColorStretchMode_EX(MS_U8 u8GOP,EN_GOP_STRCH_TRANSPCOLORMODE  TColorStrchMode);
1956 //-----------------
1957 // GOP_UPDATE
1958 //-----------------
1959 //-----------------
1960 // FORCE_WRITE
1961 //-----------------
1962 //-------------------------------------------------------------------------------------------------
1963 /// Set GOP force write mode for update register. When enable force write mode, all update gop registers action will directly
1964 /// take effect (do not wait next v-sync to update gop register!).
1965 /// @ingroup FORCE_WRITE
1966 /// @param bEnable \b IN: TRUE/FALSE
1967 /// @return GOP_API_SUCCESS - Success
1968 //-------------------------------------------------------------------------------------------------
1969 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetForceWrite(MS_BOOL bEnable);
1970 
1971 //-------------------------------------------------------------------------------------------------
1972 /// Set GOP bank force write mode for update register. When enable bank force write mode, update gop num registers action will directly
1973 /// take effect (do not wait next v-sync to update gop register!).
1974 /// @ingroup FORCE_WRITE
1975 /// @param bEnable \b IN: TRUE/FALSE
1976 /// @return GOP_API_SUCCESS - Success
1977 //-------------------------------------------------------------------------------------------------
1978 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetBnkForceWrite(MS_U8 u8GOP, MS_BOOL bEnable);
1979 //-------------------------------------------------------------------------------------------------
1980 /// MApi_GOP_GWIN_GetAlphaValue
1981 /// @ingroup GOP_ToBeRemove
1982 /// @return GOP_API_SUCCESS - Success
1983 //-------------------------------------------------------------------------------------------------
1984 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetAlphaValue(MS_U16 * Gwin01AlphaValue, MS_U16 * Gwin23AlphaValue);
1985 //-------------------------------------------------------------------------------------------------
1986 /// Get GWin position info
1987 /// @ingroup SET_GWIN_WINDOW
1988 /// @param winId  \b IN: gwin id
1989 /// @param dispX \b OUT: position-X
1990 /// @param dispY \b OUT: position-Y
1991 /// @return GOP_API_SUCCESS - Success
1992 /// @return GOP_API_FAIL - Failure
1993 //-------------------------------------------------------------------------------------------------
1994 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetWinPosition(MS_U8 winId, MS_U16 * dispX, MS_U16 *dispY);
1995 //-------------------------------------------------------------------------------------------------
1996 /// MApi_GOP_GWIN_GetWinProperty
1997 /// @ingroup GOP_ToBeRemove
1998 /// @return GOP_API_SUCCESS - Success
1999 //-------------------------------------------------------------------------------------------------
2000 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetWinProperty(GOP_GwinDispProperty *WinProperty);
2001 //-------------------------------------------------------------------------------------------------
2002 /// MApi_GOP_GWIN_GetWinAttr
2003 /// @ingroup GOP_ToBeRemove
2004 /// @return GOP_API_SUCCESS - Success
2005 //-------------------------------------------------------------------------------------------------
2006 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetWinAttr(MS_U8 gId, MS_U16 *x0, MS_U16 *y0, MS_U16 *width, MS_U16 *height,  MS_U16 *fbPitch, MS_U16 *fbFmt, MS_PHY *addr, MS_U32 *size);
2007 //-------------------------------------------------------------------------------------------------
2008 /// Open API function:
2009 ///     Read GWIN information from GOP registers
2010 /// @ingroup SET_GWIN_WINDOW
2011 /// @param u8win \b IN  GWINID
2012 /// @param pinfo \b OUT buffer to store GWIN information
2013 /// @return GOP_API_SUCCESS - Success
2014 /// @return GOP_API_FAIL - Failure
2015 //-------------------------------------------------------------------------------------------------
2016 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetWinInfo(MS_U8 u8win, GOP_GwinInfo* pinfo);
2017 //-------------------------------------------------------------------------------------------------
2018 /// MApi_GOP_GWIN_UpdateRegOnceEx
2019 /// @ingroup GOP_ToBeRemove
2020 /// @return GOP_API_SUCCESS - Success
2021 //-------------------------------------------------------------------------------------------------
2022 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_UpdateRegOnceEx(MS_BOOL bWriteRegOnce, MS_BOOL bSync);
2023 //-------------------------------------------------------------------------------------------------
2024 /// MApi_GOP_GWIN_UpdateRegOnceEx2
2025 /// @ingroup GOP_ToBeRemove
2026 /// @return GOP_API_SUCCESS - Success
2027 //-------------------------------------------------------------------------------------------------
2028 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_UpdateRegOnceEx2(MS_U8 u8GOP,MS_BOOL bWriteRegOnce, MS_BOOL bSync);
2029 
2030 //******************************************************************************
2031 /// Extend MApi_GOP_GWIN_UpdateRegOnceEx, update special gop.
2032 /// Set gop update register method by only once.
2033 /// Example: if you want to update GOP function A, B, C in the same V sync, please write down your code like below
2034 /// MApi_GOP_GWIN_UpdateRegOnceByMask(u16GopMask,TRUE, TRUE);
2035 /// GOP_FUN_A;
2036 /// GOP_FUN_B;
2037 /// GOP_FUN_C;
2038 /// MApi_GOP_GWIN_UpdateRegOnceByMask(u16GopMask,FALSE, TRUE);
2039 /// @param u16GopMask    \b IN:bit0-gop0, bit1-gop1...
2040 /// @param bWriteRegOnce    \b IN: TRUE/FALSE
2041 /// @param bSync            \b IN: TRUE/FALSE
2042 /// @return GOP_API_SUCCESS - Success
2043 //******************************************************************************
2044 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_UpdateRegOnceByMask(MS_U16 u16GopMask,MS_BOOL bWriteRegOnce, MS_BOOL bSync);
2045 //-------------------------------------------------------------------------------------------------
2046 /// MApi_GOP_TriggerRegWriteIn
2047 /// @ingroup GOP_ToBeRemove
2048 /// @return GOP_API_SUCCESS - Success
2049 //-------------------------------------------------------------------------------------------------
2050 DLL_PUBLIC E_GOP_API_Result MApi_GOP_TriggerRegWriteIn(MS_U8 u8win, MS_BOOL bForceWriteIn);
2051 //-----------------
2052 // UPDATE
2053 //-----------------
2054 //-------------------------------------------------------------------------------------------------
2055 /// API for Trigger reg writes in
2056 /// @ingroup UPDATE
2057 /// @param u8win \b IN: GWin ID
2058 /// @param bForceWriteIn \b IN:
2059 ///   - # TRUE , Register will take effect immediately
2060 ///   - # FALSE, Register will take effect after the next vsync
2061 /// @param bSync \b IN:
2062 ///   - # FALSE , Register will fire without waiting vsync (driver will not polling the vsync)
2063 ///   - # TRUE, Register will fire and waiting vsync
2064 /// @return GOP_API_SUCCESS - Success
2065 /// @return GOP_API_FAIL - Failure
2066 //-------------------------------------------------------------------------------------------------
2067 DLL_PUBLIC E_GOP_API_Result MApi_GOP_TriggerRegWriteIn_Ex(MS_U8 u8win, MS_BOOL bForceWriteIn, MS_BOOL bSync);
2068 //-----------------
2069 // FADING
2070 //-----------------
2071 //-------------------------------------------------------------------------------------------------
2072 /// Set gwin fade in/out
2073 /// @ingroup FADING
2074 /// @param gId  \b IN: gwin id
2075 /// @param Width \b IN: gwin display width
2076 /// @param X_Start \b IN: gwin display H display starting position
2077 /// @return GOP_API_SUCCESS - Success
2078 /// @return GOP_API_FAIL - Failure
2079 //-------------------------------------------------------------------------------------------------
2080 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetFadeInOut(MS_U8 gId, EN_GOP_FADE_TYPE eGwinFadeType, MS_BOOL bEnable, MS_U8 u8FadeRate);
2081 //-----------------
2082 // SHARE
2083 //-----------------
2084 //-------------------------------------------------------------------------------------------------
2085 /// Set GWin Attribute to Shared. If shared GWin, More than one process could
2086 /// access this GWin.
2087 /// @ingroup SHARE
2088 /// @param winId \b IN: GWIN ID for shared
2089 /// @param bIsShared \b IN: shared or not
2090 /// @return GOP_API_SUCCESS - Success
2091 //-------------------------------------------------------------------------------------------------
2092 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetGWinShared(MS_U8 winId, MS_BOOL bIsShared);
2093 //-------------------------------------------------------------------------------------------------
2094 /// Set Reference cnt of shared GWin.
2095 /// @ingroup SHARE
2096 /// @param winId \b IN: GWIN ID for shared
2097 /// @param u16SharedCnt \b IN: shared reference cnt.
2098 /// @return GOP_API_SUCCESS - Success
2099 //-------------------------------------------------------------------------------------------------
2100 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetGWinSharedCnt(MS_U8 winId, MS_U16 u16SharedCnt);
2101 //-----------------
2102 // TILE_MODE
2103 //-----------------
2104 //-------------------------------------------------------------------------------------------------
2105 /// API for DIP Tile mode for GWIN
2106 /// @ingroup TILE_MODE
2107 /// @param winId \b IN: GWIN id
2108 /// @param bEnable \b IN:
2109 ///   - # TRUE Enable Tile Mode for GWIN
2110 ///   - # FALSE Disable Tile Mode for GWIN
2111 /// @param tiletype \b IN: tile type
2112 /// @return GOP_API_SUCCESS - Success
2113 /// @return GOP_API_FAIL - Failure
2114 //-------------------------------------------------------------------------------------------------
2115 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_EnableTileMode(MS_U8 winId, MS_BOOL bEnable, EN_GOP_TILE_DATA_TYPE tiletype );
2116 //-----------------
2117 // PINPON
2118 //-----------------
2119 //-------------------------------------------------------------------------------------------------
2120 /// API for set gop pinpong
2121 /// @ingroup PINPON
2122 /// @param winId \b IN: GWIN id
2123 /// @param bEnable \b IN:
2124 ///   - # TRUE Enable Tile Mode for GWIN
2125 ///   - # FALSE Disable Tile Mode for GWIN
2126 /// @return GOP_API_SUCCESS - Success
2127 /// @return GOP_API_FAIL - Failure
2128 //-------------------------------------------------------------------------------------------------
2129 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetPINPON(MS_U8 winId, MS_BOOL bEn,GOP_PINPON_MODE PINPON_Mode);
2130 //-------------------------------------------------------------------------------------------------
2131 /// MApi_GOP_SetGOPYUV
2132 /// @ingroup GOP_ToBeRemove
2133 /// @return GOP_API_SUCCESS - Success
2134 //-------------------------------------------------------------------------------------------------
2135 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetGOPYUV(MS_U8 u8GOP);
2136 //-------------------------------------------------------------------------------------------------
2137 //Set which MUX select which GOP of mixer, when different gop do the alpha blending
2138 /// @ingroup GOP_MIXER
2139 /// @param u8GOP \b IN:  GOP number
2140 /// @param u8Mux \b IN:  Mux number
2141 /// @param bEn \b IN:
2142 ///   - # TRUE Enable u8GOP to mixer u8Mux
2143 ///   - # FALSE Disable u8GOP to mixer u8Mux
2144 //@return GOP_API_SUCCESS - Success
2145 //-------------------------------------------------------------------------------------------------
2146 DLL_PUBLIC E_GOP_API_Result MApi_GOP_MIXER_SetMux(MS_U8 u8GOP,MS_U8 u8Mux, MS_BOOL bEn);
2147 //-----------------
2148 // EXTRA
2149 //-----------------
2150 //-------------------------------------------------------------------------------------------------
2151 /// API for set GWIN New Alpha Mode
2152 /// @ingroup EXTRA
2153 /// @param gWinId \b IN: GWin ID
2154 /// @param bEnable \b IN:
2155 ///   - # TRUE enable new alpha mode
2156 ///   - # FALSE disable new alpha mode
2157 /// @return GOP_API_SUCCESS - Success
2158 /// @return GOP_API_FAIL - Failure
2159 //-------------------------------------------------------------------------------------------------
2160 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetNewAlphaMode(MS_U8 gWinId, MS_BOOL bEnable);
2161 
2162 //-------------------------------------------------------------------------------------------------
2163 /// API for set GWIN Pre Alpha Mode
2164 /// @ingroup EXTRA
2165 /// @param gWinId \b IN: GWin ID
2166 /// @param bEnable \b IN:
2167 ///   - # TRUE enable new alpha mode
2168 ///   - # FALSE disable new alpha mode
2169 /// @return GOP_API_SUCCESS - Success
2170 /// @return GOP_API_FAIL - Failure
2171 //-------------------------------------------------------------------------------------------------
2172 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetPreAlphaMode(MS_U8 u8GOP, MS_BOOL bEnble);
2173 //-----------------
2174 // GWIN
2175 //-----------------
2176 //-----------------
2177 // GWIN_CREATE
2178 //-----------------
2179 //-------------------------------------------------------------------------------------------------
2180 /// Create GWIN
2181 /// @ingroup GWIN_CREATE
2182 /// @param width \b IN: GWIN width
2183 /// @param height \b IN: GWIN height
2184 /// @param fbFmt \b IN: frame buffer pixel format
2185 ///   - #0xFFFF default FB format
2186 /// @return The id for the created GWIN, if return 0xff, it represents create gwin fail
2187 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateWin(MS_U16 width, MS_U16 height, MS_U16 fbFmt);
2188 //-------------------------------------------------------------------------------------------------
2189 /// MApi_GOP_GWIN_CreateWin2
2190 /// @ingroup GOP_ToBeRemove
2191 /// @return GOP_API_SUCCESS - Success
2192 //-------------------------------------------------------------------------------------------------
2193 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateWin2(MS_U16 width, MS_U16 height, MS_U16 fbFmt, EN_GOP_FRAMEBUFFER_STRING FBString);
2194 //-------------------------------------------------------------------------------------------------
2195 /// MApi_GOP_GWIN_CreateWin_Assign_FB
2196 /// @ingroup GOP_ToBeRemove
2197 /// @return GOP_API_SUCCESS - Success
2198 //-------------------------------------------------------------------------------------------------
2199 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateWin_Assign_FB(MS_U8 u8GOP, MS_U8 FBId, MS_U16 dispX, MS_U16 dispY);
2200 //-------------------------------------------------------------------------------------------------
2201 /// Create GWIN and assign frame buffer to this GWIN
2202 /// @ingroup GWIN_CREATE
2203 /// @param u8GOP \b IN: GOP number
2204 /// @param FBId \b IN: frame buffer ID
2205 /// @param dispX \b IN: frame buffer starting x position
2206 /// @param dispY \b IN: frame buffer starting y position
2207 /// @return The id for the created GWIN, if return 0xff, it represents create gwin fail
2208 //-------------------------------------------------------------------------------------------------
2209 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateWin_Assign_32FB(MS_U8 u8GOP, MS_U32 u32FBId, MS_U16 dispX, MS_U16 dispY);
2210 //-------------------------------------------------------------------------------------------------
2211 /// Create given GWIN id
2212 /// @ingroup GWIN_CREATE
2213 /// @param u8WinId \b IN: GWIN id
2214 /// @param width \b IN: GWIN width
2215 /// @param height \b IN: GWIN height
2216 /// @param fbFmt \b IN: GWIN color format
2217 /// @return The id for the created GWIN, if return 0xff, it represents create gwin fail
2218 //-------------------------------------------------------------------------------------------------
2219 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateStaticWin(MS_U8 u8WinId, MS_U16 width, MS_U16 height, MS_U16 fbFmt);
2220 //-------------------------------------------------------------------------------------------------
2221 /// MApi_GOP_GWIN_CreateStaticWin2
2222 /// @ingroup GOP_ToBeRemove
2223 /// @return GOP_API_SUCCESS - Success
2224 //-------------------------------------------------------------------------------------------------
2225 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateStaticWin2(MS_U8 u8WinId, MS_U16 width, MS_U16 height, MS_U16 fbFmt, EN_GOP_FRAMEBUFFER_STRING FBString);
2226 //-------------------------------------------------------------------------------------------------
2227 /// MApi_GOP_GWIN_CreateStaticWin_Assign_FB
2228 /// @ingroup GOP_ToBeRemove
2229 /// @return GOP_API_SUCCESS - Success
2230 //-------------------------------------------------------------------------------------------------
2231 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateStaticWin_Assign_FB(MS_U8 u8WinId, MS_U8 u8GOP, MS_U8 FBId, MS_U16 dispX, MS_U16 dispY);
2232 
2233 //-------------------------------------------------------------------------------------------------
2234 /// Create GWIN by given GWIN id and frame buffer id
2235 /// @ingroup GWIN_CREATE
2236 /// @param u8WinId \b IN: GWIN id
2237 /// @param u8GOP \b IN: GOP number
2238 /// @param FBId \b IN: frame buffer id
2239 /// @param dispX \b IN: gwin's frame buffer starting x
2240 /// @param dispY \b IN: gwin's frame buffer starting y
2241 /// @return The id for the created GWIN, if return 0xff, it represents create gwin fail
2242 //-------------------------------------------------------------------------------------------------
2243 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateStaticWin_Assign_32FB(MS_U8 u8WinId, MS_U8 u8GOP, MS_U32 u32FBId, MS_U16 dispX, MS_U16 dispY);
2244 
2245 //-----------------
2246 // GWIN_STATUS
2247 //-----------------
2248 //-------------------------------------------------------------------------------------------------
2249 /// Check if GWIN is created
2250 /// @ingroup GWIN_STATUS
2251 /// @param gId \b IN: GWINID
2252 /// @return TRUE or FALSE
2253 //-------------------------------------------------------------------------------------------------
2254 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_IsGwinExist(MS_U8 gId);
2255 
2256 //-------------------------------------------------------------------------------------------------
2257 /// Get the free GWIN id
2258 /// @ingroup GWIN_STATUS
2259 /// @return the GWIN id
2260 //-------------------------------------------------------------------------------------------------
2261 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetFreeWinID(void);
2262 //-------------------------------------------------------------------------------------------------
2263 /// MApi_GOP_GWIN_GetMAXWinID
2264 /// @ingroup GOP_ToBeRemove
2265 /// @return GOP_API_SUCCESS - Success
2266 //-------------------------------------------------------------------------------------------------
2267 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetMAXWinID(void);
2268 //-------------------------------------------------------------------------------------------------
2269 /// Get current active GWIN id
2270 /// @ingroup GWIN_STATUS
2271 /// @return current active GWIN id
2272 //-------------------------------------------------------------------------------------------------
2273 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetCurrentWinId(void);
2274 //-------------------------------------------------------------------------------------------------
2275 /// MApi_GOP_GWIN_GetMaxActiveGwin_v
2276 /// @ingroup GOP_ToBeRemove
2277 /// @return GOP_API_SUCCESS - Success
2278 //-------------------------------------------------------------------------------------------------
2279 DLL_PUBLIC MS_U16 MApi_GOP_GWIN_GetMaxActiveGwin_v(void);
2280 //-------------------------------------------------------------------------------------------------
2281 /// MApi_GOP_GWIN_Get_HSTART
2282 /// @ingroup GOP_ToBeRemove
2283 /// @return GOP_API_SUCCESS - Success
2284 //-------------------------------------------------------------------------------------------------
2285 DLL_PUBLIC MS_U16 MApi_GOP_GWIN_Get_HSTART(void);
2286 
2287 
2288 //-------------------------------------------------------------------------------------------------
2289 /// Get total active gwin number
2290 /// @ingroup GWIN_STATUS
2291 /// @return total active gwin number
2292 //-------------------------------------------------------------------------------------------------
2293 DLL_PUBLIC MS_U16 MApi_GOP_GWIN_GetActiveGWIN(void);
2294 //-------------------------------------------------------------------------------------------------
2295 /// MApi_GOP_GWIN_GetMaxVEnd
2296 /// @ingroup GOP_ToBeRemove
2297 /// @return GOP_API_SUCCESS - Success
2298 //-------------------------------------------------------------------------------------------------
2299 DLL_PUBLIC MS_U16 MApi_GOP_GWIN_GetMaxVEnd(MS_BOOL bActive);
2300 //-------------------------------------------------------------------------------------------------
2301 /// MApi_GOP_GWIN_IsAllGWINDisabled
2302 /// @ingroup GOP_ToBeRemove
2303 /// @return GOP_API_SUCCESS - Success
2304 //-------------------------------------------------------------------------------------------------
2305 DLL_PUBLIC MS_BOOL MApi_GOP_GWIN_IsAllGWINDisabled(void);
2306 
2307 //-------------------------------------------------------------------------------------------------
2308 /// Check if all some GWIN is currently enabled
2309 /// @ingroup ENABLE
2310 /// @param  winId \b IN: gwin id
2311 /// @return  - the according GWin is enabled or not
2312 //-------------------------------------------------------------------------------------------------
2313 DLL_PUBLIC MS_BOOL MApi_GOP_GWIN_IsGWINEnabled(MS_U8 winId);
2314 //-------------------------------------------------------------------------------------------------
2315 /// MApi_GOP_GWIN_IsEnabled
2316 /// @ingroup GOP_ToBeRemove
2317 /// @return GOP_API_SUCCESS - Success
2318 //-------------------------------------------------------------------------------------------------
2319 DLL_PUBLIC MS_BOOL MApi_GOP_GWIN_IsEnabled(void);
2320 //-------------------------------------------------------------------------------------------------
2321 /// MApi_GOP_GWIN_CheckOpmodeIsOn
2322 /// @ingroup GOP_ToBeRemove
2323 /// @return GOP_API_SUCCESS - Success
2324 //-------------------------------------------------------------------------------------------------
2325 DLL_PUBLIC MS_BOOL MApi_GOP_GWIN_CheckOpmodeIsOn(void);
2326 //-------------------------------------------------------------------------------------------------
2327 /// MApi_GOP_GWIN_CheckOpmodeIsOn_EX
2328 /// @ingroup GOP_ToBeRemove
2329 /// @return GOP_API_SUCCESS - Success
2330 //-------------------------------------------------------------------------------------------------
2331 // DLL_PUBLIC SYMBOL_WEAK MS_BOOL MApi_GOP_GWIN_CheckOpmodeIsOn_EX(MS_U8 u8GOP);
2332 //-------------------------------------------------------------------------------------------------
2333 /// MApi_GOP_GWIN_SetResolution
2334 /// @ingroup GOP_ToBeRemove
2335 /// @return GOP_API_SUCCESS - Success
2336 //-------------------------------------------------------------------------------------------------
2337 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetResolution(MS_U8 u8GwinId, MS_U8 u8FbId, GOP_GwinInfo* pGwinInfo, GOP_StretchInfo* pStretchInfo, EN_GOP_STRETCH_DIRECTION direction, MS_U16 u16DstWidth, MS_U16 u16DstHeight);
2338 //-------------------------------------------------------------------------------------------------
2339 /// API for set GWIN resolution in one function
2340 /// @ingroup SET_STRETCH_WINDOW
2341 /// @param u8GwinId \b IN: GWin ID
2342 /// @param u8FbId \b IN: Frame Buffer ID
2343 /// @param pGwinInfo \b IN: pointer to GOP_GwinInfo structure
2344 /// @param pStretchInfo \b IN: pointer to GOP_StretchInfo
2345 /// @param direction \b IN: to decide which direction to stretch
2346 /// @param u16DstWidth \b IN: set scaled width if H direction is specified
2347 /// @param u16DstHeight \b IN: set scaled height if V direction is specified
2348 /// @return GOP_API_SUCCESS - Success
2349 //-------------------------------------------------------------------------------------------------
2350 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetResolution_32FB(MS_U8 u8GwinId, MS_U32 u32FbId, GOP_GwinInfo* pGwinInfo, GOP_StretchInfo* pStretchInfo, EN_GOP_STRETCH_DIRECTION direction, MS_U16 u16DstWidth, MS_U16 u16DstHeight);
2351 //-------------------------------------------------------------------------------------------------
2352 /// GOP Exit
2353 /// @ingroup INIT
2354 /// @param  void                \b IN: none
2355 //-------------------------------------------------------------------------------------------------
2356 DLL_PUBLIC void MApi_GOP_Exit(void);
2357 
2358 
2359 //======================================================================================
2360 //  GOP FB management
2361 //======================================================================================
2362 //-------------------------------------------------------------------------------------------------
2363 /// MApi_GOP_FB_SEL
2364 /// @ingroup GOP_ToBeRemove
2365 /// @return GOP_API_SUCCESS - Success
2366 //-------------------------------------------------------------------------------------------------
2367 DLL_PUBLIC E_GOP_API_Result MApi_GOP_FB_SEL(MS_U8 u8FB);
2368 //-------------------------------------------------------------------------------------------------
2369 /// MApi_GOP_GWIN_SetDoubleHeap
2370 /// @ingroup GOP_ToBeRemove
2371 /// @return GOP_API_SUCCESS - Success
2372 //-------------------------------------------------------------------------------------------------
2373 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetDoubleHeap(MS_U32 u32DblHeapAdr, MS_U32 u32DblHeapLen);
2374 //-------------------------------------------------------------------------------------------------
2375 /// MApi_GOP_GWIN_MapFB2Win
2376 /// @ingroup GOP_ToBeRemove
2377 /// @return GOP_API_SUCCESS - Success
2378 //-------------------------------------------------------------------------------------------------
2379 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_MapFB2Win(MS_U8 fbId, MS_U8 gwinId);
2380 //-----------------
2381 // FLIP
2382 //-----------------
2383 //-------------------------------------------------------------------------------------------------
2384 /// Change a GWIN's frame buffer, this enables an off screen buffer to be shown
2385 /// @ingroup FLIP
2386 /// @param fbId \b IN frame buffer id
2387 /// @param gwinId \b IN \copydoc GWINID
2388 /// @return GOP_API_SUCCESS - Success
2389 /// @return GOP_API_FAIL - Failure
2390 //-------------------------------------------------------------------------------------------------
2391 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Map32FB2Win(MS_U32 u32fbId, MS_U8 u8gwinId);
2392 //-------------------------------------------------------------------------------------------------
2393 /// MApi_GOP_GWIN_Switch2FB
2394 /// @ingroup GOP_ToBeRemove
2395 /// @return GOP_API_SUCCESS - Success
2396 //-------------------------------------------------------------------------------------------------
2397 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Switch2FB(MS_U8 fbId);
2398 //-------------------------------------------------------------------------------------------------
2399 /// MApi_GOP_GWIN_Switch2_32FB
2400 /// @ingroup GOP_ToBeRemove
2401 /// @return GOP_API_SUCCESS - Success
2402 //-------------------------------------------------------------------------------------------------
2403 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Switch2_32FB(MS_U32 u32fbId);
2404 //-------------------------------------------------------------------------------------------------
2405 /// MApi_GOP_Switch_GWIN_2_FB
2406 /// @ingroup GOP_ToBeRemove
2407 /// @return GOP_API_SUCCESS - Success
2408 //-------------------------------------------------------------------------------------------------
2409 DLL_PUBLIC MS_BOOL MApi_GOP_Switch_GWIN_2_FB(MS_U8 gWinId, MS_U8 fbId, MS_U16 u16WaitTagID, MS_U16 *pU16QueueCnt);
2410 
2411 //-------------------------------------------------------------------------------------------------
2412 /// Set Flip GWIN frame buffer
2413 /// @ingroup FLIP
2414 /// @param gWinId \b IN: gwin id
2415 /// @param fbId \b IN: frame buffer id
2416 /// @param u16WaitTagID \b IN: WaitTagID
2417 /// @param pU16QueueCnt \b IN: Queue count
2418 /// @return TRUE or FALSE
2419 //-------------------------------------------------------------------------------------------------
2420 DLL_PUBLIC MS_BOOL MApi_GOP_Switch_GWIN_2_32FB(MS_U8 gWinId, MS_U32 u32fbId, MS_U32 u32WaitTagID, MS_U32 *pU32QueueCnt);
2421 //-------------------------------------------------------------------------------------------------
2422 /// Set Flip GWIN frame buffer by addr
2423 /// @ingroup FLIP
2424 /// @param gWinId \b IN: gwin id
2425 /// @param u32FlipAddr \b IN: addr
2426 /// @param u16WaitTagID \b IN: WaitTagID
2427 /// @param pU16QueueCnt \b IN: Queue count
2428 /// @return TRUE or FALSE
2429 //-------------------------------------------------------------------------------------------------
2430 DLL_PUBLIC MS_BOOL MApi_GOP_Switch_GWIN_2_FB_BY_ADDR(MS_U8 gWinId, MS_PHY phyFlipAddr, MS_U16 u16WaitTagID, MS_U16 *pU16QueueCnt);
2431 //-------------------------------------------------------------------------------------------------
2432 /// Set 3D Flip GWIN frame buffer by addr
2433 /// @ingroup FLIP
2434 /// @param gWinId \b IN: gwin id
2435 /// @param u32MainFlipAddr \b IN: frame buffer id
2436 /// @param u32SubFlipAddr \b IN: frame buffer id
2437 /// @param u16WaitTagID \b IN: WaitTagID
2438 /// @param pU16QueueCnt \b IN: Queue count
2439 /// @return TRUE or FALSE
2440 //-------------------------------------------------------------------------------------------------
2441 DLL_PUBLIC MS_BOOL MApi_GOP_Switch_3DGWIN_2_FB_BY_ADDR(MS_U8 gWinId, MS_PHY phyMainFlipAddr, MS_PHY phySubFlipAddr, MS_U16 u16WaitTagID, MS_U16 *pU16QueueCnt);
2442 //-------------------------------------------------------------------------------------------------
2443 /// Set Multi GOP Flip GWIN frame buffer by addr
2444 /// @ingroup FLIP
2445 /// @param gWinId \b IN: gwin id
2446 /// @param fbId \b IN: frame buffer id
2447 /// @param u16WaitTagID \b IN: WaitTagID
2448 /// @param pU16QueueCnt \b IN: Queue count
2449 /// @return TRUE or FALSE
2450 //-------------------------------------------------------------------------------------------------
2451 DLL_PUBLIC MS_BOOL MApi_GOP_Switch_Multi_GWIN_2_FB_BY_ADDR(GOP_MultiFlipInfo GopMultiFlipInfo);
2452 //-------------------------------------------------------------------------------------------------
2453 /// MApi_GOP_GWIN_DeleteFB
2454 /// @ingroup GOP_ToBeRemove
2455 /// @return GOP_API_SUCCESS - Success
2456 //-------------------------------------------------------------------------------------------------
2457 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_DeleteFB(MS_U8 fbId);
2458 
2459 //-----------------
2460 // FB_DELETE
2461 //-----------------
2462 //-------------------------------------------------------------------------------------------------
2463 /// Destroy a frame buffer
2464 /// @ingroup FB_DELETE
2465 /// @param fbId \b IN frame buffer id
2466 /// @return GOP_API_SUCCESS - Success
2467 //-------------------------------------------------------------------------------------------------
2468 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Delete32FB(MS_U32 u32fbId);
2469 //-------------------------------------------------------------------------------------------------
2470 /// MApi_GOP_GWIN_GetFBRegion
2471 /// @ingroup GOP_ToBeRemove
2472 /// @return GOP_API_SUCCESS - Success
2473 //-------------------------------------------------------------------------------------------------
2474 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetFBRegion(MS_U8 fbID, MS_U16 *pX,MS_U16 *pY, MS_U16 *pW, MS_U16 *pH);
2475 //-------------------------------------------------------------------------------------------------
2476 /// MApi_GOP_GWIN_Get32FBRegion
2477 /// @ingroup GOP_ToBeRemove
2478 /// @return GOP_API_SUCCESS - Success
2479 //-------------------------------------------------------------------------------------------------
2480 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Get32FBRegion(MS_U32 u32fbID, MS_U16 *pX, MS_U16 *pY, MS_U16 *pW, MS_U16 *pH);
2481 //-------------------------------------------------------------------------------------------------
2482 /// MApi_GOP_GWIN_GetFBPosition
2483 /// @ingroup GOP_ToBeRemove
2484 /// @return GOP_API_SUCCESS - Success
2485 //-------------------------------------------------------------------------------------------------
2486 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetFBPosition(MS_U8 fbID, MS_U16 *pX,MS_U16 *pY);
2487 //-------------------------------------------------------------------------------------------------
2488 /// MApi_GOP_GWIN_Get32FBPosition
2489 /// @ingroup GOP_ToBeRemove
2490 /// @return GOP_API_SUCCESS - Success
2491 //-------------------------------------------------------------------------------------------------
2492 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Get32FBPosition(MS_U32 u32fbID, MS_U16 *pX, MS_U16 *pY);
2493 //-------------------------------------------------------------------------------------------------
2494 /// MApi_GOP_GWIN_SetFBInfo
2495 /// @ingroup GOP_ToBeRemove
2496 /// @return GOP_API_SUCCESS - Success
2497 //-------------------------------------------------------------------------------------------------
2498 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetFBInfo(MS_U8 fbId, GOP_GwinFBAttr *fbAttr);
2499 //-----------------
2500 // SET
2501 //-----------------
2502 //-------------------------------------------------------------------------------------------------
2503 /// Set frame buffer info
2504 /// @ingroup SET
2505 /// @param fbId  \b IN: frame buffer id
2506 /// @param fbAttr \b IN: frame buffer attribute
2507 /// @return GOP_API_SUCCESS - Success
2508 /// @return GOP_API_FAIL - Failure
2509 //-------------------------------------------------------------------------------------------------
2510 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set32FBInfo(MS_U32 u32fbId, GOP_GwinFBAttr *fbAttr);
2511 
2512 //-------------------------------------------------------------------------------------------------
2513 /// Get frame buffer info
2514 /// @ingroup SET
2515 /// @param fbId  \b IN: frame buffer id
2516 /// @param fbAttr \b IN: frame buffer attribute
2517 /// @return GOP_API_SUCCESS - Success
2518 /// @return GOP_API_FAIL - Failure
2519 //-------------------------------------------------------------------------------------------------
2520 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetFBInfo(MS_U8 fbId, GOP_GwinFBAttr *fbAttr);
2521 //-------------------------------------------------------------------------------------------------
2522 /// MApi_GOP_GWIN_Get32FBInfo
2523 /// @ingroup GOP_ToBeRemove
2524 /// @return GOP_API_SUCCESS - Success
2525 //-------------------------------------------------------------------------------------------------
2526 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Get32FBInfo(MS_U32 u32fbId, GOP_GwinFBAttr *fbAttr);
2527 //-------------------------------------------------------------------------------------------------
2528 /// MApi_GOP_GWIN_GetFBAddr
2529 /// @ingroup GOP_ToBeRemove
2530 /// @return GOP_API_SUCCESS - Success
2531 //-------------------------------------------------------------------------------------------------
2532 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_GetFBAddr(MS_U8 fbID, MS_PHY *pAddr);
2533 //-------------------------------------------------------------------------------------------------
2534 /// MApi_GOP_GWIN_Get32FBAddr
2535 /// @ingroup GOP_ToBeRemove
2536 /// @return GOP_API_SUCCESS - Success
2537 //-------------------------------------------------------------------------------------------------
2538 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Get32FBAddr(MS_U32 u32fbID, MS_PHY *pAddr);
2539 //-------------------------------------------------------------------------------------------------
2540 /// API for Clear GOP GWIN FlipQueue
2541 /// @ingroup FLIP
2542 /// @param u8GwinId \b IN: GWin ID
2543 /// @return GOP_API_SUCCESS - Success
2544 //-------------------------------------------------------------------------------------------------
2545 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_ClearFlipQueue(MS_U8 gWinId);
2546 //-------------------------------------------------------------------------------------------------
2547 /// MApi_GOP_GWIN_GetMaxFBNum
2548 /// @ingroup GOP_ToBeRemove
2549 /// @return GOP_API_SUCCESS - Success
2550 //-------------------------------------------------------------------------------------------------
2551 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetMaxFBNum(void);
2552 //-------------------------------------------------------------------------------------------------
2553 /// Get maximum FB number by all gop
2554 /// @ingroup GOP_CAPS
2555 /// @param  void                \b IN: none
2556 /// @return maximum fb number by all gop
2557 //-------------------------------------------------------------------------------------------------
2558 DLL_PUBLIC MS_U32 MApi_GOP_GWIN_GetMax32FBNum(void);
2559 //-------------------------------------------------------------------------------------------------
2560 /// MApi_GOP_FB_Get
2561 /// @ingroup GOP_ToBeRemove
2562 /// @return GOP_API_SUCCESS - Success
2563 //-------------------------------------------------------------------------------------------------
2564 DLL_PUBLIC MS_U8 MApi_GOP_FB_Get(void);
2565 //-------------------------------------------------------------------------------------------------
2566 /// MApi_GOP_GWIN_GetMAXFBID
2567 /// @ingroup GOP_ToBeRemove
2568 /// @return GOP_API_SUCCESS - Success
2569 //-------------------------------------------------------------------------------------------------
2570 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetMAXFBID(void);
2571 //-------------------------------------------------------------------------------------------------
2572 /// MApi_GOP_GWIN_GetMAX32FBID
2573 /// @ingroup GOP_ToBeRemove
2574 /// @return GOP_API_SUCCESS - Success
2575 //-------------------------------------------------------------------------------------------------
2576 DLL_PUBLIC MS_U32 MApi_GOP_GWIN_GetMAX32FBID(void);
2577 //-------------------------------------------------------------------------------------------------
2578 /// MApi_GOP_GWIN_DestroyFB
2579 /// @ingroup GOP_ToBeRemove
2580 /// @return GOP_API_SUCCESS - Success
2581 //-------------------------------------------------------------------------------------------------
2582 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_DestroyFB(MS_U8 fbId);
2583 //-------------------------------------------------------------------------------------------------
2584 /// MApi_GOP_GWIN_Destroy32FB
2585 /// @ingroup GOP_ToBeRemove
2586 /// @return GOP_API_SUCCESS - Success
2587 //-------------------------------------------------------------------------------------------------
2588 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_Destroy32FB(MS_U32 u32fbId);
2589 //-------------------------------------------------------------------------------------------------
2590 /// MApi_GOP_GWIN_CreateFBFrom3rdSurf
2591 /// @ingroup GOP_ToBeRemove
2592 /// @return GOP_API_SUCCESS - Success
2593 //-------------------------------------------------------------------------------------------------
2594 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateFBFrom3rdSurf(MS_U16 width, MS_U16 height,  MS_U16 fbFmt, MS_PHY phyFbAddr, MS_U16 pitch, MS_U8* ret_FBId);
2595 //-------------------------------------------------------------------------------------------------
2596 /// Create frame buffer from given dram address
2597 /// @ingroup FB_CREATE
2598 /// @param width  \b IN: frame buffer width
2599 /// @param height \b IN: frame buffer height
2600 /// @param fbFmt \b IN: frame buffer color format
2601 /// @param u32FbAddr \b IN: frame buffer starting address
2602 /// @param pitch \b IN: frame buffer pitch
2603 /// @param ret_FBId \b OUT: frame buffer id
2604 /// @return GOP_API_SUCCESS - Success
2605 /// @return GOP_API_FAIL - Failure
2606 //-------------------------------------------------------------------------------------------------
2607 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_Create32FBFrom3rdSurf(MS_U16 width, MS_U16 height,  MS_U16 fbFmt, MS_PHY phyFbAddr, MS_U16 pitch, MS_U32* u32ret_FBId);
2608 //-------------------------------------------------------------------------------------------------
2609 /// MApi_GOP_GWIN_CreateFBbyStaticAddr
2610 /// @ingroup GOP_ToBeRemove
2611 /// @return GOP_API_SUCCESS - Success
2612 //-------------------------------------------------------------------------------------------------
2613 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateFBbyStaticAddr(MS_U8 fbId, MS_U16 dispX, MS_U16 dispY, MS_U16 width, MS_U16 height,  MS_U16 fbFmt, MS_PHY phyFbAddr );
2614 //-------------------------------------------------------------------------------------------------
2615 /// Create frame buffer from given frame buffer id and dram address. User should call MApi_GOP_GWIN_GetFree32FBID()
2616 /// first and then use this frame buffer id as this function input parameter
2617 /// @ingroup FB_CREATE
2618 /// @param fbId  \b IN: frame buffer id
2619 /// @param dispX \b IN: frame buffer starting x
2620 /// @param dispY \b IN: frame buffer starting y
2621 /// @param width \b IN: frame buffer width
2622 /// @param height \b IN: frame buffer height
2623 /// @param fbFmt \b IN: frame buffer color format
2624 /// @param u32FbAddr \b IN: frame buffer starting address
2625 /// @return GOP_API_SUCCESS - Success
2626 /// @return GOP_API_FAIL - Failure
2627 //-------------------------------------------------------------------------------------------------
2628 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_Create32FBbyStaticAddr(MS_U32 u32fbId, MS_U16 dispX, MS_U16 dispY, MS_U16 width, MS_U16 height,  MS_U16 fbFmt, MS_PHY phyFbAddr);
2629 //-------------------------------------------------------------------------------------------------
2630 /// MApi_GOP_GWIN_CreateFBbyStaticAddr2
2631 /// @ingroup GOP_ToBeRemove
2632 /// @return GOP_API_SUCCESS - Success
2633 //-------------------------------------------------------------------------------------------------
2634 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateFBbyStaticAddr2(MS_U8 fbId, MS_U16 dispX, MS_U16 dispY, MS_U16 width, MS_U16 height,  MS_U16 fbFmt, MS_PHY phyFbAddr, EN_GOP_FRAMEBUFFER_STRING FBString);
2635 //-------------------------------------------------------------------------------------------------
2636 /// MApi_GOP_GWIN_Create32FBbyStaticAddr2
2637 /// @ingroup GOP_ToBeRemove
2638 /// @return GOP_API_SUCCESS - Success
2639 //-------------------------------------------------------------------------------------------------
2640 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_Create32FBbyStaticAddr2(MS_U32 u32fbId, MS_U16 dispX, MS_U16 dispY, MS_U16 width, MS_U16 height,  MS_U16 fbFmt, MS_PHY phyFbAddr ,EN_GOP_FRAMEBUFFER_STRING FBString);
2641 //-------------------------------------------------------------------------------------------------
2642 /// MApi_GOP_GWIN_CreateFB2
2643 /// @ingroup GOP_ToBeRemove
2644 /// @return GOP_API_SUCCESS - Success
2645 //-------------------------------------------------------------------------------------------------
2646 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateFB2(MS_U8 FBId,MS_U16 x, MS_U16 y, MS_U16 width, MS_U16 height, MS_U16 fbFmt);
2647 //-------------------------------------------------------------------------------------------------
2648 /// MApi_GOP_GWIN_Create32FB2
2649 /// @ingroup GOP_ToBeRemove
2650 /// @return GOP_API_SUCCESS - Success
2651 //-------------------------------------------------------------------------------------------------
2652 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_Create32FB2(MS_U32 u32FBId, MS_U16 x, MS_U16 y, MS_U16 width, MS_U16 height, MS_U16 fbFmt);
2653 //-------------------------------------------------------------------------------------------------
2654 /// MApi_GOP_GWIN_CreateFB2_EXT
2655 /// @ingroup GOP_ToBeRemove
2656 /// @return GOP_API_SUCCESS - Success
2657 //-------------------------------------------------------------------------------------------------
2658 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateFB2_EXT(MS_U8 FBId, MS_U16 x, MS_U16 y, MS_U16 width, MS_U16 height, MS_U16 fbFmt, EN_GOP_FRAMEBUFFER_STRING FBString);
2659 //-------------------------------------------------------------------------------------------------
2660 /// MApi_GOP_GWIN_Create32FB2_EXT
2661 /// @ingroup GOP_ToBeRemove
2662 /// @return GOP_API_SUCCESS - Success
2663 //-------------------------------------------------------------------------------------------------
2664 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_Create32FB2_EXT(MS_U32 u32FBId, MS_U16 x, MS_U16 y, MS_U16 width, MS_U16 height, MS_U16 fbFmt, EN_GOP_FRAMEBUFFER_STRING FBString);
2665 //-------------------------------------------------------------------------------------------------
2666 /// MApi_GOP_GWIN_GetCurrentFBID
2667 /// @ingroup GOP_ToBeRemove
2668 /// @return GOP_API_SUCCESS - Success
2669 //-------------------------------------------------------------------------------------------------
2670 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetCurrentFBID(void);
2671 //-------------------------------------------------------------------------------------------------
2672 /// MApi_GOP_GWIN_GetCurrent32FBID
2673 /// @ingroup GOP_ToBeRemove
2674 /// @return GOP_API_SUCCESS - Success
2675 //-------------------------------------------------------------------------------------------------
2676 DLL_PUBLIC MS_U32 MApi_GOP_GWIN_GetCurrent32FBID(void);
2677 //-------------------------------------------------------------------------------------------------
2678 /// MApi_GOP_GWIN_GetFBfromGWIN
2679 /// @ingroup GOP_ToBeRemove
2680 /// @return GOP_API_SUCCESS - Success
2681 //-------------------------------------------------------------------------------------------------
2682 DLL_PUBLIC MS_U8  MApi_GOP_GWIN_GetFBfromGWIN(MS_U8 gwinId) ;
2683 //-------------------------------------------------------------------------------------------------
2684 /// Get frame bufferid from the gwin id
2685 /// @ingroup FB_STATUS
2686 /// @param gwinId  \b IN gwin id
2687 /// @return return frame buffer id. If return 0xFF, it represents this function fail
2688 //-------------------------------------------------------------------------------------------------
2689 DLL_PUBLIC MS_U32 MApi_GOP_GWIN_Get32FBfromGWIN(MS_U8 gwinId);
2690 //-------------------------------------------------------------------------------------------------
2691 /// MApi_GOP_GWIN_IsFBExist
2692 /// @ingroup GOP_ToBeRemove
2693 /// @return GOP_API_SUCCESS - Success
2694 //-------------------------------------------------------------------------------------------------
2695 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_IsFBExist(MS_U8 fbId);
2696 //-----------------
2697 // FB_STATUS
2698 //-----------------
2699 //-------------------------------------------------------------------------------------------------
2700 /// Check if a frame buffer is allocated
2701 /// @ingroup FB_STATUS
2702 /// @param fbId \b IN frame buffer id
2703 /// @return
2704 ///   - # TRUE fbId is allocated
2705 ///   - # FALSE fbId is invalid or not allocated
2706 //-------------------------------------------------------------------------------------------------
2707 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_Is32FBExist(MS_U32 u32fbId);
2708 //-------------------------------------------------------------------------------------------------
2709 /// MApi_GOP_GWIN_GetFreeFBID
2710 /// @ingroup GOP_ToBeRemove
2711 /// @return GOP_API_SUCCESS - Success
2712 //-------------------------------------------------------------------------------------------------
2713 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_GetFreeFBID(void);
2714 //-------------------------------------------------------------------------------------------------
2715 /// Get free frame buffer id
2716 /// @ingroup FB_STATUS
2717 /// @return frame buffer id. If return oxFF, it represents no free frame buffer id for use.
2718 //-------------------------------------------------------------------------------------------------
2719 DLL_PUBLIC MS_U32 MApi_GOP_GWIN_GetFree32FBID(void);
2720 //-------------------------------------------------------------------------------------------------
2721 /// MApi_GOP_GWIN_CreateFB
2722 /// @ingroup GOP_ToBeRemove
2723 /// @return GOP_API_SUCCESS - Success
2724 //-------------------------------------------------------------------------------------------------
2725 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_CreateFB(MS_U8 fbId, MS_U16 dispX, MS_U16 dispY, MS_U16 width, MS_U16 height,  MS_U16 fbFmt);
2726 //-----------------
2727 // FB_CREATE
2728 //-----------------
2729 //-------------------------------------------------------------------------------------------------
2730 /// Create frame buffer from given frame buffer id . User should call MApi_GOP_GWIN_GetFree32FBID()
2731 /// first and then use this frame buffer id as this function input parameter
2732 /// @ingroup FB_CREATE
2733 /// @param fbId  \b IN frame buffer id
2734 /// @param dispX \b IN display x
2735 /// @param dispY \b IN display y
2736 /// @param width \b IN width
2737 /// @param height \b IN height
2738 /// @param fbFmt \b IN frame buffer format
2739 /// @return GOP_API_SUCCESS - Success
2740 /// @return GOP_API_CRT_GWIN_NOAVAIL - Failure
2741 DLL_PUBLIC MS_U8 MApi_GOP_GWIN_Create32FB(MS_U32 u32fbId, MS_U16 dispX, MS_U16 dispY, MS_U16 width, MS_U16 height, MS_U16 fbFmt);
2742 //-------------------------------------------------------------------------------------------------
2743 /// MApi_GOP_GWIN_GetFBFmt
2744 /// @ingroup GOP_ToBeRemove
2745 /// @return GOP_API_SUCCESS - Success
2746 //----------------------------------------------------------------------------------------------
2747 DLL_PUBLIC MS_U16 MApi_GOP_GWIN_GetFBFmt(MS_U8 fbId);
2748 //-------------------------------------------------------------------------------------------------
2749 /// MApi_GOP_GWIN_Get32FBFmt
2750 /// @ingroup GOP_ToBeRemove
2751 /// @return GOP_API_SUCCESS - Success
2752 //-------------------------------------------------------------------------------------------------
2753 DLL_PUBLIC MS_U16 MApi_GOP_GWIN_Get32FBFmt(MS_U32 u32fbId);
2754 //-------------------------------------------------------------------------------------------------
2755 /// MApi_GOP_GWIN_SetPaletteOpt
2756 /// @ingroup GOP_ToBeRemove
2757 /// @return GOP_API_SUCCESS - Success
2758 //-------------------------------------------------------------------------------------------------
2759 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetPaletteOpt( GOP_PaletteEntry *pPalArray, MS_U16 u32PalStart, MS_U16 u32PalEnd, EN_GOP_PALETTE_TYPE ePalType);
2760 //-----------------
2761 // PALETTE
2762 //-----------------
2763 //-------------------------------------------------------------------------------------------------
2764 /// Write optional palette values to GOP0 registers
2765 /// Note that this GOP0 palette table only support 256 group palette data
2766 /// @ingroup PALETTE
2767 /// @param u8GOP \b IN : Number of GOP
2768 /// @param *pPalArray \b IN Pointer to pallete list gonna set into pallete table
2769 /// @param u32PalStart \b IN start of pallete table gonna be overwrite
2770 /// @param u32PalEnd \b IN end of pallete table gonna be overwrite
2771 /// @param ePalType \b IN Pallete format, true/false ARGB8888
2772 /// @return GOP_API_SUCCESS - Success
2773 //-------------------------------------------------------------------------------------------------
2774 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetPaletteOpt_EX(MS_U8 u8GOP,GOP_PaletteEntry *pPalArray, MS_U16 u32PalStart, MS_U16 u32PalEnd, EN_GOP_PALETTE_TYPE ePalType);
2775 //-------------------------------------------------------------------------------------------------
2776 /// MApi_GOP_GWIN_SetPaletteRead
2777 /// @ingroup GOP_ToBeRemove
2778 /// @return GOP_API_SUCCESS - Success
2779 //-------------------------------------------------------------------------------------------------
2780 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_SetPaletteRead(EN_GOP_PALETTE_READTYPE type);
2781 //-------------------------------------------------------------------------------------------------
2782 /// Set GOP0 palette table read out control
2783 /// @ingroup PALETTE
2784 /// @param u8GOP \b IN : Number of GOP
2785 /// @param type \b IN \copydoc EN_GOP_PALETTE_READTYPE
2786 /// @return GOP_API_SUCCESS - Success
2787 //-------------------------------------------------------------------------------------------------
2788 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetPaletteRead_EX(MS_U8 u8GOP,EN_GOP_PALETTE_READTYPE type);
2789 //-------------------------------------------------------------------------------------------------
2790 /// MApi_GOP_GWIN_ReadPalette
2791 /// @ingroup GOP_ToBeRemove
2792 /// @return GOP_API_SUCCESS - Success
2793 //-------------------------------------------------------------------------------------------------
2794 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_ReadPalette(MS_U8 idx, MS_U32* clr);
2795 //-------------------------------------------------------------------------------------------------
2796 /// Read GOP0 palette values From Pallete
2797 /// @ingroup PALETTE
2798 /// @param u8GOP \b IN : Number of GOP
2799 /// @param idx \b IN Index for pallete wanna retrieve
2800 /// @param clr \b OUT color of specific pallete index
2801 /// @return GOP_API_SUCCESS - Success
2802 //-------------------------------------------------------------------------------------------------
2803 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_ReadPalette_EX(MS_U8 u8GOP,MS_U8 idx, MS_U32* clr);
2804 //-------------------------------------------------------------------------------------------------
2805 /// MApi_GOP_GetInfo
2806 /// @ingroup GOP_ToBeRemove
2807 /// @return GOP_API_SUCCESS - Success
2808 //-------------------------------------------------------------------------------------------------
2809 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_2GSetPaletteOpt(GOP_PaletteEntry *pPalArray, MS_U16 u32PalStart, MS_U16 u32PalEnd);
2810 //-------------------------------------------------------------------------------------------------
2811 /// Write optional palette values to GOP1 registers
2812 /// Note that this GOP1 palette table only support 64 group palette data
2813 /// @ingroup PALETTE
2814 /// @param u8GOP \b IN : Number of GOP
2815 /// @param *pPalArray \b IN Pointer to pallete list gonna set into pallete table
2816 /// @param u32PalStart \b IN start of pallete table gonna be overwrite
2817 /// @param u32PalEnd \b IN end of pallete table gonna be overwrite
2818 /// @return GOP_API_SUCCESS - Success
2819 //-------------------------------------------------------------------------------------------------
2820 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_2GSetPaletteOpt_EX(MS_U8 u8GOP,GOP_PaletteEntry *pPalArray, MS_U16 u32PalStart, MS_U16 u32PalEnd);
2821 //-------------------------------------------------------------------------------------------------
2822 /// MApi_GOP_GWIN_2GSetPaletteRead
2823 /// @ingroup GOP_ToBeRemove
2824 /// @return GOP_API_SUCCESS - Success
2825 //-------------------------------------------------------------------------------------------------
2826 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_2GSetPaletteRead(EN_GOP_PALETTE_READTYPE type);
2827 //-------------------------------------------------------------------------------------------------
2828 /// Set GOP1 palette table read out control
2829 /// @ingroup PALETTE
2830 /// @param u8GOP \b IN : Number of GOP
2831 /// @param type \b IN \copydoc EN_GOP_PALETTE_READTYPE
2832 /// @return GOP_API_SUCCESS - Success
2833 //-------------------------------------------------------------------------------------------------
2834 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_2GSetPaletteRead_EX(MS_U8 u8GOP,EN_GOP_PALETTE_READTYPE type);
2835 //-------------------------------------------------------------------------------------------------
2836 /// MApi_GOP_GWIN_2GReadPalette
2837 /// @ingroup GOP_ToBeRemove
2838 /// @return GOP_API_SUCCESS - Success
2839 //-------------------------------------------------------------------------------------------------
2840 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_2GReadPalette(MS_U8 idx, MS_U32* clr);
2841 //-------------------------------------------------------------------------------------------------
2842 /// Read GOP2G(GOP1) palette values From Pallete
2843 /// @ingroup PALETTE
2844 /// @param u8GOP \b IN : Number of GOP
2845 /// @param idx \b IN Index for pallete wanna retrieve
2846 /// @param clr \b OUT color of specific pallete index
2847 /// @return GOP_API_SUCCESS - Success
2848 //-------------------------------------------------------------------------------------------------
2849 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_2GReadPalette_EX(MS_U8 u8GOP,MS_U8 idx, MS_U32* clr);
2850 
2851 
2852 //-----------------
2853 // DWIN
2854 //-----------------
2855 //-----------------
2856 // DWIN_CONFIG
2857 //-----------------
2858 //-------------------------------------------------------------------------------------------------
2859 /// API for initialize the GOP DWIN
2860 /// @ingroup DWIN_CONFIG
2861 /// @return GOP_API_SUCCESS - Success
2862 //-------------------------------------------------------------------------------------------------
2863 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_Init(void);
2864 
2865 //-------------------------------------------------------------------------------------------------
2866 /// Config Dwin source (OP or MVOP).
2867 /// @ingroup DWIN_CONFIG
2868 /// @param enScanMode \b IN: EN_GOP_DWIN_SCAN_MODE
2869 /// @return GOP_API_SUCCESS - Success
2870 ///            GOP_API_INVALID_PARAMETERS - don't support this dwin source
2871 //-------------------------------------------------------------------------------------------------
2872 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetSourceSel(EN_GOP_DWIN_SRC_SEL enSrcSel);
2873 //-------------------------------------------------------------------------------------------------
2874 /// Set gop dwin capture one frame
2875 /// @ingroup DWIN_CAPTURE
2876 /// @return GOP_API_SUCCESS - Success
2877 //-------------------------------------------------------------------------------------------------
2878 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_CaptureOneFrame2(void);
2879 //-----------------
2880 // DWIN_INTERRUPT
2881 //-----------------
2882 //-------------------------------------------------------------------------------------------------
2883 
2884 /// Set interrupt mask of GOP DWIN.
2885 /// @ingroup DWIN_INTERRUPT
2886 /// @param u8mask \b IN bitmask of interrupt type
2887 ///   - bit7 DWIN VSYNC interrupt mask
2888 ///   - bit6 Dump Window interlace Bottom Field ACK Interrupt Mask
2889 ///   - bit5 Dump Window interlace Top Field ACK Interrupt Mask
2890 ///   - bit4 Dump Window Progressive ACK Interrupt Mask
2891 ///   - bit3:1 Reserved
2892 ///   - bit0 GWIN VSYNC Interrupt Mask
2893 /// @param bEnable \b IN
2894 ///   - # TRUE enable interrupts specified by u8mask
2895 ///   - # FALSE disable interrupts specified by u8mask
2896 /// @return GOP_API_SUCCESS - Success
2897 //-------------------------------------------------------------------------------------------------
2898 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_EnableIntr(MS_U16 u8mask, MS_BOOL bEnable);
2899 
2900 //-------------------------------------------------------------------------------------------------
2901 /// Set gop dwin capture one frame
2902 /// @ingroup DWIN_CAPTURE
2903 /// @return GOP_API_SUCCESS - Success
2904 //-------------------------------------------------------------------------------------------------
2905 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_CaptureOneFrame(void);
2906 //-----------------
2907 // DWIN_CAPTURE
2908 //-----------------
2909 //-------------------------------------------------------------------------------------------------
2910 /// API for enable or disable DWIN
2911 /// @ingroup DWIN_CAPTURE
2912 /// @param bEnable \b IN DWIN enable or not
2913 /// @return GOP_API_SUCCESS - Success
2914 //-------------------------------------------------------------------------------------------------
2915 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_Enable(MS_BOOL bEnable);
2916 
2917 //-------------------------------------------------------------------------------------------------
2918 /// Get DWIN property
2919 /// @ingroup DWIN_INTERRUPT
2920 /// @param pproperty \b OUT buffer to store DWIN property
2921 /// @return GOP_API_SUCCESS - Success
2922 //-------------------------------------------------------------------------------------------------
2923 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_GetWinProperty(GOP_DwinProperty *pproperty);
2924 //-------------------------------------------------------------------------------------------------
2925 /// Set DWIN property
2926 /// @ingroup DWIN_INTERRUPT
2927 /// @param pproperty \b IN buffer to store DWIN property
2928 /// @return GOP_API_SUCCESS - Success
2929 //-------------------------------------------------------------------------------------------------
2930 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetWinProperty(GOP_DwinProperty *pproperty);
2931 //-------------------------------------------------------------------------------------------------
2932 /// Set DWIN data source scan type
2933 /// @ingroup DWIN_CONFIG
2934 /// @param enScanMode \b IN: EN_GOP_DWIN_SCAN_MODE
2935 /// @return GOP_API_SUCCESS - Success
2936 //-------------------------------------------------------------------------------------------------
2937 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SelectSourceScanType(EN_GOP_DWIN_SCAN_MODE enScanMode);
2938 //-------------------------------------------------------------------------------------------------
2939 /// Set DWIN Capture format
2940 /// @ingroup DWIN_CONFIG
2941 /// @param fmt \b IN: buffer format to store DWIN content
2942 /// @return GOP_API_SUCCESS - Success
2943 //-------------------------------------------------------------------------------------------------
2944 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetDataFmt(EN_GOP_DWIN_DATA_FMT fmt);
2945 //-------------------------------------------------------------------------------------------------
2946 /// Set DWIN Capture constant alpha value for format ARGB8888
2947 /// @ingroup DWIN_CONFIG
2948 /// @param u8AlphaVal \b IN: constant alpha value
2949 /// @return GOP_API_SUCCESS - Success
2950 //-------------------------------------------------------------------------------------------------
2951 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetAlphaValue(MS_U8 u8AlphaVal);
2952 //-----------------
2953 // DWIN_OPTION
2954 //-----------------
2955 //-------------------------------------------------------------------------------------------------
2956 /// Set DWIN Capture alpha source
2957 /// @ingroup DWIN_OPTION
2958 /// @param source \b IN: alpha source
2959 /// @return GOP_API_SUCCESS - Success
2960 //-------------------------------------------------------------------------------------------------
2961 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetAlphaSrc(EN_GOP_DWIN_ALPHA_SRC source);
2962 //-------------------------------------------------------------------------------------------------
2963 /// Set DWIN Capture alpha inverse
2964 /// @ingroup DWIN_OPTION
2965 /// @param source \b IN: enable alpha inverse
2966 /// @return GOP_API_SUCCESS - Success
2967 //-------------------------------------------------------------------------------------------------
2968 // DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetAlphaInverse(MS_BOOL bEnable);
2969 
2970 //-------------------------------------------------------------------------------------------------
2971 /// Set DWIN UVSample mode
2972 /// @ingroup DWIN_OPTION
2973 /// @param mode \b IN: UVSample mode
2974 /// @return GOP_API_SUCCESS - Success
2975 //-------------------------------------------------------------------------------------------------
2976 // DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetUVSample(EN_GOP_DWIN_UVSAMPLE_Mode mode);
2977 //-------------------------------------------------------------------------------------------------
2978 /// Set DWIN skipframe count
2979 /// @ingroup DWIN_OPTION
2980 /// @param mode \b IN: skipframe count
2981 /// @return GOP_API_SUCCESS - Success
2982 //-------------------------------------------------------------------------------------------------
2983 // DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetSkipFrame(MS_U32 framecount);
2984 //-------------------------------------------------------------------------------------------------
2985 /// clear DWIN interrupt
2986 /// @ingroup DWIN_INTERRUPT
2987 /// @param u8mask \b IN: interrup mask
2988 /// @return GOP_API_SUCCESS - Success
2989 //-------------------------------------------------------------------------------------------------
2990 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_ClearIntr(MS_U16 u8mask);
2991 
2992 //-------------------------------------------------------------------------------------------------
2993 /// Get DWIN interrupt Information.
2994 /// @ingroup DWIN_CAPTURE
2995 /// @param pDWinIntInfo \b OUT: dwin interrup flag
2996 /// @return GOP_API_SUCCESS - Success
2997 //-------------------------------------------------------------------------------------------------
2998 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_GetDWinIntInfo(GOP_DWinIntInfo *pDWinIntInfo);
2999 //-------------------------------------------------------------------------------------------------
3000 /// Get DWIN interrupt Information.
3001 /// @ingroup DWIN_CAPTURE
3002 /// @param pDWinIntInfo \b OUT: dwin interrup flag
3003 /// @return GOP_API_SUCCESS - Success
3004 //-------------------------------------------------------------------------------------------------
3005 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_GetDWinIntInfoTimeout(GOP_DWinIntInfo *pDWinIntInfo, MS_U32 u32Timeout);
3006 //-------------------------------------------------------------------------------------------------
3007 /// MApi_GOP_SetClkForCapture
3008 /// @ingroup GOP_ToBeRemove
3009 /// @return GOP_API_SUCCESS - Success
3010 //-------------------------------------------------------------------------------------------------
3011 DLL_PUBLIC E_GOP_API_Result MApi_GOP_SetClkForCapture(void);   //only for source is OP path clock
3012 //-------------------------------------------------------------------------------------------------
3013 /// Get GOP Dwin interrupt status
3014 /// @ingroup DWIN_INTERRUPT
3015 /// @return GOP Dwin interrupt status
3016 //-------------------------------------------------------------------------------------------------
3017 DLL_PUBLIC MS_U16 MApi_GOP_DWIN_GetIntrStatus(void);
3018 //-------------------------------------------------------------------------------------------------
3019 /// API for enable or disable DWIN
3020 /// @ingroup DWIN_OPTION
3021 /// @param bEnable \b IN DWIN enable or not
3022 /// @return GOP_API_SUCCESS - Success
3023 //-------------------------------------------------------------------------------------------------
3024 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_EnableR2YCSC(MS_BOOL bEnable);
3025 
3026 //-------------------------------------------------------------------------------------------------
3027 /// API for enable or disable DWIN UV SWAP
3028 /// @ingroup DWIN_OPTION
3029 /// @param bEnable \b IN DWIN enable or not
3030 /// @return GOP_API_SUCCESS - Success
3031 //-------------------------------------------------------------------------------------------------
3032 DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetUVSwap(MS_BOOL bEnable);
3033 //-----------------
3034 // GOP_LOCK_BEGINE_END
3035 //-----------------
3036 //-------------------------------------------------------------------------------------------------
3037 /// Begine of lock GOP.
3038 /// @ingroup GOP_LOCK_BEGINE_END
3039 /// @param  void
3040 /// @return GOP_API_SUCCESS     - Success
3041 /// @return GOP_API_FAIL        - Failure
3042 //-------------------------------------------------------------------------------------------------
3043 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_BeginDraw(void);
3044 //-------------------------------------------------------------------------------------------------
3045 /// End of lock GOP.
3046 /// @ingroup GOP_LOCK_BEGINE_END
3047 /// @param  void
3048 /// @return GOP_API_SUCCESS     - Success
3049 /// @return GOP_API_FAIL        - Failure
3050 //-------------------------------------------------------------------------------------------------
3051 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_EndDraw(void);
3052 //-----------------
3053 // BG
3054 //-----------------
3055 //-------------------------------------------------------------------------------------------------
3056 /// Enable back ground window
3057 /// @ingroup BG
3058 /// @param bgwID \b IN:  GWIN number
3059 /// @param bEnable \b IN: ENABLE/DISABLE
3060 /// @return GOP_API_SUCCESS - Success
3061 /// @return GOP_API_FAIL - Failure
3062 //-------------------------------------------------------------------------------------------------
3063 // DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Enable_BGWIN(MS_U8 bgwID, MS_BOOL bEnable);
3064 
3065 //-------------------------------------------------------------------------------------------------
3066 /// Set back ground window
3067 /// @ingroup BG
3068 /// @param bgwID            \b IN:  GWIN number
3069 /// @param x0               \b IN:  left position
3070 /// @param y0               \b IN:  top position
3071 /// @param w                \b IN:  width
3072 /// @param h                \b IN:  height
3073 /// @param color            \b IN:  color
3074 /// @return GOP_API_SUCCESS - Success
3075 /// @return GOP_API_FAIL - Failure
3076 //-------------------------------------------------------------------------------------------------
3077 // DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_BGWIN(MS_U8 bgwID, MS_U16 x0, MS_U16 y0, MS_U16 w, MS_U16 h, MS_U16 color);
3078 //-------------------------------------------------------------------------------------------------
3079 /// Set back ground window
3080 /// @ingroup BG
3081 /// @param bgwID            \b IN:  GWIN number
3082 /// @param bEnable          \b IN:  ENABLE/DISABLE
3083 /// @param alpha            \b IN:  alpha
3084 /// @return GOP_API_SUCCESS - Success
3085 /// @return GOP_API_FAIL - Failure
3086 //-------------------------------------------------------------------------------------------------
3087 // DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_Set_BGWIN_Alpha(MS_U8 bgwID, MS_BOOL bEnable, MS_U8 alpha);
3088 
3089 //-------------------------------------------------------------------------------------------------
3090 /// API for set gop pinpong
3091 /// @ingroup DWIN_OPTION
3092 /// @param winId \b IN: GWIN id
3093 /// @param u32fbaddr0   \b IN:  pinpon addr0
3094 /// @param u32fbaddr1   \b IN:  pinpon addr1
3095 /// @return GOP_API_SUCCESS - Success
3096 /// @return GOP_API_FAIL - Failure
3097 //-------------------------------------------------------------------------------------------------
3098 // DLL_PUBLIC E_GOP_API_Result MApi_GOP_DWIN_SetBufferPINPON(MS_PHY phyfbaddr0,MS_PHY phyfbaddr1);
3099 
3100 //-----------------
3101 // GOP_CB
3102 //-----------------
3103 //-------------------------------------------------------------------------------------------------
3104 /// GOP call back function: Set destination buffer pitch,addr,fmt to GE.
3105 /// @ingroup GOP_CB
3106 /// This function should be registered before MApi_GOP_Init!!
3107 /// @return GOP_API_SUCCESS - Success
3108 /// @return GOP_API_FAIL - Failure
3109 //-------------------------------------------------------------------------------------------------
3110 DLL_PUBLIC E_GOP_API_Result MApi_GOP_RegisterFBFmtCB(MS_U32 (*fpGOP_CB)(MS_U16 pitch,MS_PHY addr , MS_U16 fmt )  );
3111 //-------------------------------------------------------------------------------------------------
3112 /// GOP call back function: Get vedio status (is interlace mode?) from scaler.
3113 /// @ingroup GOP_CB
3114 /// This function should be registered before MApi_GOP_Init!!
3115 /// @return GOP_API_SUCCESS - Success
3116 /// @return GOP_API_FAIL - Failure
3117 //-------------------------------------------------------------------------------------------------
3118 DLL_PUBLIC E_GOP_API_Result MApi_GOP_RegisterXCIsInterlaceCB(MS_BOOL (*fpGOP_CB)(void));
3119 //-------------------------------------------------------------------------------------------------
3120 /// GOP call back function: Get capture window h-start from scaler.
3121 /// @ingroup GOP_CB
3122 /// This function should be registered before MApi_GOP_Init!!
3123 /// @return GOP_API_SUCCESS - Success
3124 /// @return GOP_API_FAIL - Failure
3125 //-------------------------------------------------------------------------------------------------
3126 DLL_PUBLIC E_GOP_API_Result MApi_GOP_RegisterXCGetCapHStartCB(MS_U16 (*fpGOP_CB)(void));
3127 
3128 //-------------------------------------------------------------------------------------------------
3129 /// GOP call back function: Reduce scaler bandwidth when OSD on.
3130 /// @ingroup GOP_CB
3131 /// This function should be registered before MApi_GOP_Init!!
3132 /// @return GOP_API_SUCCESS - Success
3133 /// @return GOP_API_FAIL - Failure
3134 //-------------------------------------------------------------------------------------------------
3135 DLL_PUBLIC E_GOP_API_Result MApi_GOP_RegisterXCReduceBWForOSDCB(void (*fpGOP_CB)(MS_U8 PqWin, MS_BOOL enable));
3136 //-------------------------------------------------------------------------------------------------
3137 /// GOP call back function: Notify callback for the end of GOP events such as buffer rearrange.
3138 /// @ingroup GOP_CB
3139 /// This function should be registered before MApi_GOP_Init!!
3140 /// @return GOP_API_SUCCESS - Success
3141 /// @return GOP_API_FAIL - Failure
3142 //-------------------------------------------------------------------------------------------------
3143 DLL_PUBLIC E_GOP_API_Result MApi_GOP_RegisterEventNotify(void (*fpGOP_CB)(MS_U32 u32EventID, void* reserved0));
3144 
3145 //-------------------------------------------------------------------------------------------------
3146 /// GOP call back function: Register XC DIP call back
3147 /// @ingroup GOP_CB
3148 /// This function should be registered before MApi_GOP_Init!!
3149 /// @return GOP_API_SUCCESS - Success
3150 /// @return GOP_API_FAIL - Failure
3151 //-------------------------------------------------------------------------------------------------
3152 DLL_PUBLIC E_GOP_API_Result MApi_GOP_RegisterXCSetDwinInfo(MS_BOOL (*fpGOP_CB)(MS_U16 cmd,MS_U32 *arg,MS_U16 size));
3153 
3154 //-------------------------------------------------------------------------------------------------
3155 /// MApi_GOP_OC_SetOCFBinfo
3156 /// @ingroup GOP_ToBeRemove
3157 /// @return GOP_API_SUCCESS - Success
3158 //-------------------------------------------------------------------------------------------------
3159 DLL_PUBLIC E_GOP_API_Result MApi_GOP_OC_SetOCFBinfo(MS_PHY phyAddr, EN_GOP_OC_SEL_TYPE BankMode, MS_U32 enBufSize);
3160 
3161 //-------------------------------------------------------------------------------------------------
3162 /// Set GPU Tile Mode
3163 /// @ingroup TILE_MODE
3164 /// @param u8win \b IN GWIN id
3165 /// @param TileMode \b IN
3166 ///   - # TRUE Gwin Tile Mode
3167 ///   - # FALSE Gwin Tile Mode
3168 /// @param tiletype \b IN: tile type
3169 /// @return GOP_API_SUCCESS - Success
3170 //-------------------------------------------------------------------------------------------------
3171 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetGPUTile(MS_U8 u8win, EN_GOP_GPU_TILE_MODE TileMode);
3172 
3173 //-------------------------------------------------------------------------------------------------
3174 /// MApi_GOP_TLB_Enable
3175 /// @ingroup GOP_ToBeRemove
3176 /// @return GOP_API_SUCCESS - Success
3177 // DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_TLB_Enable(MS_U8 u8GOP,MS_BOOL bEnable, MS_PHY phytlbaddr);
3178 
3179 //-------------------------------------------------------------------------------------------------
3180 /// MApi_GOP_GWIN_UpdateRegOnce
3181 /// @ingroup GOP_ToBeRemove
3182 /// @return GOP_API_SUCCESS - Success
3183 //-------------------------------------------------------------------------------------------------
3184 DLL_PUBLIC E_GOP_API_Result MApi_GOP_GWIN_UpdateRegOnce(MS_BOOL bWriteRegOnce);
3185 //-------------------------------------------------------------------------------------------------
3186 /// MApi_GOP_GWIN_SetMux
3187 /// @ingroup GOP_ToBeRemove
3188 /// @return GOP_API_SUCCESS - Success
3189 //-------------------------------------------------------------------------------------------------
3190 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_SetMux(GOP_MuxConfig * pGopMuxConfig, MS_U32 u32SizeOfMuxInfo);
3191 //-------------------------------------------------------------------------------------------------
3192 /// MApi_GOP_GWIN_OutputLayerSwitch
3193 /// @ingroup GOP_ToBeRemove
3194 /// @return GOP_API_SUCCESS - Success
3195 //-------------------------------------------------------------------------------------------------
3196 DLL_PUBLIC SYMBOL_WEAK E_GOP_API_Result MApi_GOP_GWIN_OutputLayerSwitch(MS_U8 u8GOP);
3197 
3198 #ifdef __cplusplus
3199 }
3200 #endif
3201 
3202 #endif // _API_GOP_H_
3203 
3204