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 /// 97 /// @file apiGOP.h 98 /// @brief MStar Graphics Output Path API 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 #ifndef _GOP_H_ 103 #define _GOP_H_ 104 105 #include "MsTypes.h" 106 #include "UFO.h" 107 108 #ifdef __cplusplus 109 extern "C" 110 { 111 #endif 112 113 //------------------------------------------------------------------------------------------------- 114 // Macro and Define 115 //------------------------------------------------------------------------------------------------- 116 /// GOP Version 117 118 #if (defined(UFO_PUBLIC_HEADER_212)||defined(UFO_PUBLIC_HEADER_300)) 119 #define DWIN_SUPPORT_BUFFER 0x2 120 #define GOP_MULTIINFO_NUM 8 121 #else 122 #define DWIN_SUPPORT_BUFFER 0x2UL 123 #define GOP_MULTIINFO_NUM 8UL 124 #endif 125 126 /// Define GWIN color format. 127 typedef enum 128 { 129 /// Color format RGB555 and Blink. 130 E_GOP_COLOR_RGB555_BLINK =E_MS_FMT_1ABFgBg12355, 131 /// Color format RGB565. 132 E_GOP_COLOR_RGB565 =E_MS_FMT_RGB565, 133 /// Color format ARGB4444. 134 E_GOP_COLOR_ARGB4444 =E_MS_FMT_ARGB4444, 135 /// Color format alpha blink. 136 E_GOP_COLOR_2266 =E_MS_FMT_FaBaFgBg2266, 137 /// Color format I8 (256-entry palette). 138 E_GOP_COLOR_I8 =E_MS_FMT_I8, 139 /// Color format ARGB8888. 140 E_GOP_COLOR_ARGB8888 =E_MS_FMT_ARGB8888, 141 /// Color format ARGB1555. 142 E_GOP_COLOR_ARGB1555 =E_MS_FMT_ARGB1555, 143 /// Color format ABGR8888. - Andriod Format 144 E_GOP_COLOR_ABGR8888 =E_MS_FMT_ABGR8888, 145 /// Color format RGB555/YUV422. 146 E_GOP_COLOR_RGB555YUV422 =E_MS_FMT_ARGB1555_DST, 147 /// Color format YUV422. 148 E_GOP_COLOR_YUV422 =E_MS_FMT_YUV422, 149 /// Color format RGBA5551. - Andriod Format 150 E_GOP_COLOR_RGBA5551 =E_MS_FMT_RGBA5551, 151 /// Color format RGBA4444. - Andriod Format 152 E_GOP_COLOR_RGBA4444 =E_MS_FMT_RGBA4444, 153 /// Color format RGBA8888. - Andriod Format 154 E_GOP_COLOR_RGBA8888 =E_MS_FMT_RGBA8888, 155 /// Color format BGR565. - Andriod Format 156 E_GOP_COLOR_BGR565 =E_MS_FMT_BGR565, 157 /// Color format ABGR4444. - Andriod Format 158 E_GOP_COLOR_ABGR4444 =E_MS_FMT_ABGR4444, 159 /// Color format AYUV8888. - Andriod Format 160 E_GOP_COLOR_AYUV8888 =E_MS_FMT_AYUV8888, 161 /// Color format ABGR1555. - Andriod Format 162 E_GOP_COLOR_ABGR1555 =E_MS_FMT_ABGR1555, 163 /// Color format BGRA5551. - Andriod Format 164 E_GOP_COLOR_BGRA5551 =E_MS_FMT_BGRA5551, 165 /// Color format BGRA4444. - Andriod Format 166 E_GOP_COLOR_BGRA4444 =E_MS_FMT_BGRA4444, 167 /// Color format BGRA8888. - Andriod Format 168 E_GOP_COLOR_BGRA8888 =E_MS_FMT_BGRA8888, 169 /// Invalid color format. 170 E_GOP_COLOR_INVALID =E_MS_FMT_GENERIC 171 } EN_GOP_COLOR_TYPE; 172 173 174 /// Define GOP destination displayplane type 175 typedef enum 176 { 177 ///IP0 path. 178 E_GOP_DST_IP0=0, 179 ///Mixer to VE path . 180 E_GOP_DST_MIXER2VE, 181 ///OP path. 182 E_GOP_DST_OP0, 183 ///VOP path. 184 E_GOP_DST_VOP, 185 ///IP1 path. 186 E_GOP_DST_IP1, 187 /// IP man path. 188 E_GOP_DST_IP_MAIN, 189 ///IP sub path. 190 E_GOP_DST_IP_SUB, 191 ///Mixer to OP Path 192 E_GOP_DST_MIXER2OP, 193 ///VOP path. 194 E_GOP_DST_VOP_SUB, 195 ///FRC path 196 E_GOP_DST_FRC, 197 ///DIRECT TO VE path 198 E_GOP_DST_VE, 199 ///OP1 path. 200 E_GOP_DST_OP1, 201 ///MIXER2OP1 202 E_GOP_DST_MIXER2OP1, 203 ///DIP path. 204 E_GOP_DST_DIP, 205 ///GS path. 206 E_GOP_DST_GOPScaling, 207 ///4K2K BYPASS path 208 E_GOP_DST_BYPASS, 209 // for op with double frequency. 210 E_GOP_DST_OP_DUAL_RATE, 211 ///MOD path 212 E_GOP_DST_MOD, 213 MAX_GOP_DST_SUPPORT, 214 } EN_GOP_DST_TYPE; 215 216 // scale direction 217 typedef enum 218 { 219 // no scale 220 E_GOP_NO_STRETCH = 0x00, 221 // horizontal scale 222 E_GOP_H_STRETCH = 0x01, 223 // vertical scale 224 E_GOP_V_STRETCH = 0x10, 225 // both horizontal and vertical scale 226 E_GOP_HV_STRETCH = 0x11, 227 } EN_GOP_STRETCH_DIRECTION; 228 229 /// Define palette read type. 230 typedef enum 231 { 232 /// Palette access from GOP0 RIU. 233 E_GOP_PAL_GOP_RIU = 0, 234 /// Palette access from GOP0 REGDMA. 235 E_GOP_PAL_GOP_REGDMA = 1, 236 /// Palette access from GOP1 RIU. 237 E_GOP1_PAL_GOP_RIU = 2, 238 /// Palette access from GOP1 REGDMA. 239 E_GOP1_PAL_GOP_REGDMA = 3, 240 } EN_GOP_PALETTE_READTYPE; 241 242 243 ///GOP config type 244 typedef enum 245 { 246 /// This type is for not init some GOP features. 247 /// That is, this is for not changing some registers state 248 E_GOP_IGNOREINIT, 249 E_GOP_CONSALPHA_BITS, 250 E_GOP_TIMING_INFO, 251 E_GOP_IS_PIXELBASE_ENABLE, 252 E_GOP_GET_MAXFBNUM, 253 E_GOP_SET_SCROLL_AUTO_STOP_POSITION, 254 E_GOP_SET_ADDR_BY_MBX, 255 E_GOP_IS_INIT, 256 //Mixer config 257 E_GOP_VFILTER_RATIO = 0x100, 258 //AFBC 259 E_GOP_AFBC_RESET = 0x200, 260 E_GOP_AFBC_ENABLE = 0x201, 261 } EN_GOP_CONFIG_TYPE; 262 263 /// Transparent color format 264 typedef enum 265 { 266 /// RGB mode transparent color. 267 GOPTRANSCLR_FMT0, 268 /// index mode transparent color. 269 GOPTRANSCLR_FMT1, 270 /// ARGB8888 mode transparent color. 271 GOPTRANSCLR_FMT2, 272 /// YUV mode transparent color. 273 GOPTRANSCLR_FMT3, 274 } EN_GOP_TRANSCLR_FMT; 275 276 277 //GOP Test Pattern type 278 typedef enum 279 { 280 E_GOP_TP_DISABLE=0, 281 E_GOP_TP_GRAY16, 282 E_GOP_TP_GRAY16_INVERSE, 283 E_GOP_TP_GRAY32, 284 E_GOP_TP_GRAY32_INVERSE, 285 E_GOP_TP_GRAY64, 286 E_GOP_TP_GRAY64_INVERSE, 287 E_GOP_TP_GRAY256, 288 E_GOP_TP_GRAY256_INVERSE, 289 E_GOP_TP_BLACK, 290 E_GOP_TP_WHITE, 291 E_GOP_TP_CLR, 292 E_GOP_TP_BW_DOT, 293 E_GOP_TP_BW_LINE, 294 E_GOP_TP_BW_CROSS, 295 E_GOP_TP_CLR_BAR, 296 E_GOP_TP_CLR_BAR_INVERSE, 297 }EN_GOP_TST_PATTERN; 298 299 typedef enum 300 { 301 E_GOP_GPU_TILE_LINEAR=0, 302 E_GOP_GPU_TILE_DIP8X, 303 E_GOP_GPU_TILE_DIP16X, 304 E_GOP_GPU_TILE_GPU, 305 }EN_GOP_GPU_TILE_MODE; 306 307 /// Define palette color format. 308 typedef enum 309 { 310 /// Palette color format is ARGB8888. 311 E_GOP_PAL_ARGB8888 = 0, 312 /// Invalid palette color format. 313 E_GOP_PAL_INVALID 314 } EN_GOP_PALETTE_TYPE; 315 316 typedef enum 317 { 318 E_GOP_4G_PALETTE, 319 E_GOP_2G_PALETTE, 320 }EN_GOP_PALETTE; 321 322 /// DWIN scan mode 323 typedef enum 324 { 325 /// progessive. 326 DWIN_SCAN_MODE_PROGRESSIVE, 327 /// interlace. 328 DWIN_SCAN_MODE_extern, 329 } EN_GOP_DWIN_SCAN_MODE; 330 331 /// DWIN alpha source 332 typedef enum 333 { 334 /// Alpha from constant. 335 DWIN_ALPHA_SRC_CONST = 0, 336 /// Alpha from source. 337 DWIN_ALPHA_SRC_SOURCE = 1, 338 DWIN_ALPHA_SRC_MAX 339 } EN_GOP_DWIN_ALPHA_SRC; 340 341 342 /// DWIN UV sample mode 343 typedef enum 344 { 345 /// original. 346 DWIN_UVSAMPLE_ORI = 0, 347 /// left point. 348 DWIN_UVSAMPLE_LEFT = 1, 349 /// right point. 350 DWIN_UVSAMPLE_RIGHT = 2, 351 /// average point. 352 DWIN_UVSAMPLE_AVG = 3, 353 DWIN_UVSAMPLE_MAX 354 } EN_GOP_DWIN_UVSAMPLE_Mode; 355 356 /// Define GOP Transparent color Stretch Mode. 357 typedef enum 358 { 359 E_GOP_TRANSPCOLOR_STRCH_DUPLICATE = 0, 360 E_GOP_TRANSPCOLOR_STRCH_ASNORMAL = 1, 361 } EN_GOP_STRCH_TRANSPCOLORMODE; 362 363 /// Define GOP H-Stretch mode. 364 typedef enum 365 { 366 /// 6-tape (including nearest) mode. 367 E_GOP_HSTRCH_6TAPE = 0, 368 /// duplicate mode. 369 E_GOP_HSTRCH_DUPLICATE = 1, 370 /// 6-tape (Linear mode) 371 E_GOP_HSTRCH_6TAPE_LINEAR = 2, 372 /// 6-tape (Nearest mode) 373 E_GOP_HSTRCH_6TAPE_NEAREST = 3, 374 /// 6-tape (Gain0) 375 E_GOP_HSTRCH_6TAPE_GAIN0 = 4, 376 /// 6-tape (Gain1) 377 E_GOP_HSTRCH_6TAPE_GAIN1 = 5, 378 /// 6-tape (Gain2) 379 E_GOP_HSTRCH_6TAPE_GAIN2 = 6, 380 /// 6-tape (Gain3) 381 E_GOP_HSTRCH_6TAPE_GAIN3 = 7, 382 /// 6-tape (Gain4) 383 E_GOP_HSTRCH_6TAPE_GAIN4 = 8, 384 /// 6-tape (Gain5) 385 E_GOP_HSTRCH_6TAPE_GAIN5 = 9, 386 /// 4-tap filer 387 E_GOP_HSTRCH_4TAPE = 0xA, 388 ///2-tape 389 E_GOP_HSTRCH_2TAPE = 0xB, 390 } EN_GOP_STRETCH_HMODE; 391 392 /// Define GOP V-Stretch mode. 393 typedef enum 394 { 395 ///2-TAP mode. 396 E_GOP_VSTRCH_LINEAR = 0, 397 /// duplicate mode. 398 E_GOP_VSTRCH_DUPLICATE = 1, 399 /// nearest mode. 400 E_GOP_VSTRCH_NEAREST = 2, 401 /// nearest mode. 402 E_GOP_VSTRCH_LINEAR_GAIN0 = 3, 403 E_GOP_VSTRCH_LINEAR_GAIN1 = 4, 404 /// Linear 405 E_GOP_VSTRCH_LINEAR_GAIN2 = 5, 406 ///4-TAP mode 407 E_GOP_VSTRCH_4TAP = 6, 408 } EN_GOP_STRETCH_VMODE; 409 410 411 /// Define GOP bandwidth strength. 412 typedef enum 413 { 414 /// bandwidth strength: strong 415 E_GOP_BW_STRONG, 416 /// bandwidth strength: middle 417 E_GOP_BW_MIDDLE, 418 /// bandwidth strength: weak 419 E_GOP_BW_WEAK, 420 /// bandwidth strength: error status 421 E_GOP_BW_UNKNOWN, 422 } EN_GOP_BW_STRENGTH; 423 424 //PINPON 425 typedef enum 426 { 427 E_GOP_PINPON_G3D , 428 E_GOP_PINPON_VE, 429 E_GOP_PINPON_DWIN, 430 E_GOP_PINPON_DIP, 431 E_GOP_PINPON_DWIN0, 432 E_GOP_PINPON_DWIN1, 433 } EN_GOP_PINPON_MODE; 434 435 /// GOP MIXER timing type 436 typedef enum 437 { 438 GOP_NTSC , 439 GOP_PAL, 440 GOP_CUSTOM, 441 GOP_CUSTOM_OP, 442 GOP_MIXER_TIMEING_MAX, 443 }GOP_MIXER_TIMINGTYPE; 444 445 446 /// Scroll direction 447 typedef enum 448 { 449 E_GOP_SCROLL_NONE = 0, 450 E_GOP_SCROLL_UP, // bottom to top 451 E_GOP_SCROLL_DOWN, // top to bottom 452 E_GOP_SCROLL_LEFT, //right to left 453 E_GOP_SCROLL_RIGHT, //left to right 454 E_GOP_SCROLL_SW, //Scroll by SW 455 E_GOP_SCROLL_KERNEL, //Scroll by SW on kernel 456 } GOP_SCROLL_TYPE; 457 458 459 /// GOP VE timing type 460 typedef enum 461 { 462 GOP_VE_NTSC , 463 GOP_VE_PAL, 464 GOP_VE_TIMEING_MAX, 465 }GOP_VE_TIMINGTYPE; 466 467 468 ///Define OC Bank Mode SEL 469 typedef enum 470 { 471 /// SEL 2 memory bank Mode 472 E_GOP_OC_SEL_2BankMode = 1, 473 /// SEL 4 memory bank Mode 474 E_GOP_OC_SEL_4BankMode = 2 , 475 } EN_GOP_OC_SEL_TYPE; 476 477 478 //3D OSD mode type 479 typedef enum 480 { 481 E_GOP_3D_DISABLE , 482 E_GOP_3D_SWITH_BY_FRAME, 483 E_GOP_3D_SIDE_BY_SYDE, 484 E_GOP_3D_TOP_BOTTOM, 485 E_GOP_3D_LINE_ALTERNATIVE, 486 E_GOP_3D_FRAMEPACKING, 487 }EN_GOP_3D_MODETYPE; 488 489 typedef enum 490 { 491 GOP_DWIN_SEL0, //add this for extend the dwin number in the future 492 }EN_GOP_DWIN_SEL; 493 //=================================================== 494 //struct 495 //=================================================== 496 497 ///the GOP MIXER timing info 498 typedef struct DLL_PACKED 499 { 500 MS_U32 hstart; 501 MS_U32 hend; 502 MS_U32 vstart; 503 MS_U32 vend; 504 MS_U32 htotal; 505 }GOP_MixerTiming; 506 507 ///the GOP MIXER2OP timing info 508 typedef struct DLL_PACKED 509 { 510 MS_U32 hstart; 511 MS_U32 hend; 512 MS_U32 vstart; 513 MS_U32 vend; 514 MS_U32 htotal; 515 MS_U32 hsyncdelay; 516 }GOP_Mixer2OPTiming; 517 518 /// GWIN Information 519 typedef struct DLL_PACKED 520 { 521 /// gwin v-start (unit: line). 522 MS_U16 u16DispVPixelStart; 523 /// gwin v-end (unit: line). 524 MS_U16 u16DispVPixelEnd; 525 /// gwin h-start (unit: pix). 526 MS_U16 u16DispHPixelStart; 527 /// gwin h-end (unit: pix). 528 MS_U16 u16DispHPixelEnd; 529 /// gwin dram starting address (unit: Byte). 530 #if (defined(UFO_PUBLIC_HEADER_212)||defined(UFO_PUBLIC_HEADER_300)) 531 MS_U32 u32DRAMRBlkStart; 532 #else 533 MS_PHY u32DRAMRBlkStart; 534 #endif 535 /// gwin's frame buffer width (unit: pix). 536 MS_U16 u16RBlkHPixSize; 537 /// gwin's frame buffer height (unit: pix). 538 MS_U16 u16RBlkVPixSize; 539 /// gwin's frame buffer pitch (unit: Byte). 540 MS_U16 u16RBlkHRblkSize; 541 /// gwin's frame buffer x0 (unit: pix). 542 MS_U16 u16WinX; 543 /// gwin's frame buffer v0 (unit: pix). 544 MS_U16 u16WinY; 545 /// no use now. 546 MS_U32 u32scrX; 547 /// no use now. 548 MS_U32 u32scrY; 549 /// gwin's frame buffer color format. 550 EN_GOP_COLOR_TYPE clrType; 551 } GOP_GwinInfo; 552 553 /// GOP Stretch Window Information 554 typedef struct DLL_PACKED 555 { 556 /// Destination Type 557 EN_GOP_DST_TYPE eDstType; 558 /// x start 559 MS_U16 x; 560 /// y start 561 MS_U16 y; 562 /// Stretch Window Width 563 MS_U16 width; 564 /// Stretch Windows Height 565 MS_U16 height; 566 } GOP_StretchInfo; 567 568 /// DWIN property 569 typedef struct DLL_PACKED 570 { 571 /// dwin h-start (unit: pix). 572 MS_U16 u16x; 573 /// dwin h-end (unit: pix). 574 MS_U16 u16y; 575 /// dwin width (unit: pix). 576 MS_U16 u16w; 577 /// height (unit: line). 578 MS_U16 u16h; 579 #if (defined(UFO_PUBLIC_HEADER_212)||defined(UFO_PUBLIC_HEADER_300)) 580 /// dwin dram starting address (unit: Byte). 581 MS_U32 u32fbaddr0; 582 /// dwin access address high bond (unit: Byte). 583 MS_U32 u32fbaddr1; 584 #else 585 /// dwin dram starting address (unit: Byte). 586 MS_PHY u32fbaddr0; 587 /// dwin access address high bond (unit: Byte). 588 MS_PHY u32fbaddr1; 589 #endif 590 /// Number of pixels per horizontal line. 591 MS_U16 u16fbw; 592 } GOP_DwinProperty; 593 594 typedef union DLL_PACKED 595 { 596 MS_U8 u8DWinIntInfo; 597 struct DLL_PACKED 598 { 599 MS_U8 bDWinIntWADR:1; 600 MS_U8 bDWinIntPROG:1; 601 MS_U8 bDWinIntTF:1; 602 MS_U8 bDWinIntBF:1; 603 MS_U8 bDWinIntVS:1; 604 MS_U8 reserved:3; 605 }sDwinIntInfo; 606 }GOP_DWinIntInfo; 607 608 /// Define the entry of palette. 609 typedef union DLL_PACKED 610 { 611 ///8-bits access. 612 struct DLL_PACKED 613 { 614 ///A. 615 MS_U8 u8A; 616 ///R. 617 MS_U8 u8R; 618 ///G. 619 MS_U8 u8G; 620 ///B. 621 MS_U8 u8B; 622 } RGB; 623 /// 32-bits direct access. 624 MS_U8 u8Data[4]; 625 } GOP_PaletteEntry; 626 627 /// Define GOP Gwin Relative Priority setting info 628 typedef struct DLL_PACKED 629 { 630 ///The valid number of below setting. Since Relative Priority, Must larger than 1 and smaller than 5 631 /// 2 means u81stGwin & u82stGwin valid, 3 means u81stGwin, u82stGwin, u83stGwin valid 632 /// 4 means all valid. 633 MS_U8 u8GwinNum; 634 MS_U8 u8GwinPri[4]; 635 }GOP_GwinPri; 636 637 /// GOP API info 638 typedef struct DLL_PACKED 639 { 640 /// Maximum support GOP number. 641 MS_U8 u8MaxGOPNum; 642 /// Maximum support GWIN number. 643 MS_U8 u8MaxGwinNum; 644 /// gop destination blending path. (save supported dst type in array) 645 EN_GOP_DST_TYPE SupportGOPDst[MAX_GOP_DST_SUPPORT]; 646 } GOP_ApiInfo; 647 648 /// GOP API run time status 649 typedef struct DLL_PACKED 650 { 651 /// gop0 destination blending path. (0xFF represent not support) 652 EN_GOP_DST_TYPE eGOPNumDstType[6]; 653 /// gop stretch window h size status. (0xFF represent not support) 654 MS_U16 u16GopNumStrWinHSize[6]; 655 /// gop stretch window v size status. (0xFF represent not support) 656 MS_U16 u16GopNumStrWinVSize[6]; 657 658 /// gop0 gwin status (Is gwin enable?). (gop0 gwin ID: 0~3) 659 MS_BOOL Gop0GwinIsEnable[4]; 660 /// gop1 gwin status (Is gwin enable?). (gop1 gwin ID: 4~5) 661 MS_BOOL Gop1GwinIsEnable[4]; 662 /// gop2 gwin status (Is gwin enable?) (gop2 gwin ID: 6) 663 MS_BOOL Gop2GwinIsEnable; 664 /// gop3 gwin status (Is gwin enable?) (gop2 gwin ID: 7) 665 MS_BOOL Gop3GwinIsEnable; 666 MS_BOOL Gop4GwinIsEnable; 667 MS_BOOL Gop5GwinIsEnable; 668 } GOP_ApiStatus; 669 670 typedef struct DLL_PACKED 671 { 672 ///if use YUV transparent color, then color is YUYV (Y: 8bits, U: 8 bits, V: 8 bits, Y is same value) 673 MS_U32 color; 674 }ST_Transparent_Color; 675 #ifdef __cplusplus 676 } 677 #endif 678 679 #endif // _API_GOP_H_ 680 681