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 drvPQ.h 98 /// @brief PQ interface 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 #ifndef _DRVPQ_H_ 103 #define _DRVPQ_H_ 104 105 #include "MsTypes.h" 106 #include "apiXC.h" 107 #include "MsDevice.h" 108 #include "apiPNL.h" 109 110 #ifdef _MDRV_PQ_C_ 111 #define INTERFACE 112 #else 113 #define INTERFACE extern 114 #endif 115 #ifdef __cplusplus 116 extern "C" 117 { 118 #endif 119 120 //------------------------------------------------------------------------------------------------- 121 // Macro and Define 122 //------------------------------------------------------------------------------------------------- 123 124 #define MSIF_PQ_TAG {'M','S','I','F'} // MSIF 125 #define MSIF_PQ_CLASS {'0','0'} // DRV/API (DDI) 126 #define MSIF_PQ_CUS 0x0000 // MStar Common library 127 #define MSIF_PQ_MOD 0x0000 // MStar Common library 128 #define MSIF_PQ_CHIP 0x0000 129 #define MSIF_PQ_CPU '0' 130 #define MSIF_PQ_OS '0' 131 132 // library information 133 134 /// the PQ lib code 135 #define MSIF_PQ_LIB_CODE {'P','Q','_','_'} 136 /// the PQ lib version 137 #define MSIF_PQ_LIBVER {'0','0'} 138 /// the PQ build number 139 #define MSIF_PQ_BUILDNUM {'0','7'} 140 /// the PQ CL 141 #define MSIF_PQ_CHANGELIST {'0','0','3','5','3','5','7','6'} 142 143 /// the PQ driver version 144 #define PQ_DRV_VERSION /* Character String for DRV/API version */ \ 145 MSIF_PQ_TAG, /* 'MSIF' */ \ 146 MSIF_PQ_CLASS, /* '00' */ \ 147 MSIF_PQ_CUS, /* 0x0000 */ \ 148 MSIF_PQ_MOD, /* 0x0000 */ \ 149 MSIF_PQ_CHIP, \ 150 MSIF_PQ_CPU, \ 151 MSIF_PQ_LIB_CODE , /* IP__ */ \ 152 MSIF_PQ_LIBVER , /* 0.0 ~ Z.Z */ \ 153 MSIF_PQ_BUILDNUM , /* 00 ~ 99 */ \ 154 MSIF_PQ_CHANGELIST, /* CL# */ \ 155 MSIF_PQ_OS 156 157 158 //------------------------------------------------------------------------------------------------- 159 // Macro for chips difference: 160 // The chip that has the feature should define the macro in drvpq.h in itself folder 161 // The macro here is for other chips don't have these features. 162 // They don't need to change drvpq.h for later new feature adding 163 //------------------------------------------------------------------------------------------------- 164 #ifndef ENABLE_VGA_EIA_TIMING 165 #define ENABLE_VGA_EIA_TIMING 1 166 #endif 167 168 #ifndef PQ_QM_NETMM_VIDEO 169 #define PQ_QM_NETMM_VIDEO 0 170 #endif 171 172 #ifndef PQ_ENABLE_3D_STRENGTHEN_NR //to avoid compile warnings... 173 #define PQ_ENABLE_3D_STRENGTHEN_NR 0 174 #endif 175 176 #ifndef PQ_QM_24HZMM_VIDEO 177 #define PQ_QM_24HZMM_VIDEO 0 178 #endif 179 180 #ifndef PQ_QM_HDMI_FP_VIDEO 181 #define PQ_QM_HDMI_FP_VIDEO 0 182 #endif 183 184 #ifndef PQ_QM_4K2K_FS 185 #define PQ_QM_4K2K_FS 0 186 #endif 187 188 #ifndef PQ_LCE_CTL_FOR_MVC4KX1K 189 #define PQ_LCE_CTL_FOR_MVC4KX1K 0 190 #endif 191 192 #ifndef PQ_DLC_CTL_FOR_MVC4KX1K 193 #define PQ_DLC_CTL_FOR_MVC4KX1K 0 194 #endif 195 196 #ifndef PQ_QM_MWE_CLONE_VER1 197 #define PQ_QM_MWE_CLONE_VER1 0 198 #endif 199 200 #ifndef PQ_QM_MWE_CLONE_VER2 201 #define PQ_QM_MWE_CLONE_VER2 0 202 #endif 203 204 #ifndef PQ_VGASubCaseForceTo422Mode 205 #define PQ_VGASubCaseForceTo422Mode 0 206 #endif 207 208 #ifndef PQ_QM_3D_CLONE_ENABLE 209 #define PQ_QM_3D_CLONE_ENABLE 0 210 #endif 211 212 #ifndef PQ_GRULE_GAME_MODE_ENABLE 213 #define PQ_GRULE_GAME_MODE_ENABLE 0 214 #endif 215 216 #ifndef PQ_GRULE_HDR_ENABLE 217 #define PQ_GRULE_HDR_ENABLE 0 218 #endif 219 220 #ifndef PQ_QM_4K2K_60Hz 221 #define PQ_QM_4K2K_60Hz 0 222 #endif 223 224 #ifndef PQ_FRCM_CBCR_SWAP_BY_SW 225 #define PQ_FRCM_CBCR_SWAP_BY_SW 0 226 #endif 227 228 #ifndef PQ_SUPPORT_HDMI_4K2K_P2P 229 #define PQ_SUPPORT_HDMI_4K2K_P2P 0 230 #endif 231 232 #ifndef PQ_4K2K_PHOTO 233 #define PQ_4K2K_PHOTO 0 234 #endif 235 236 #ifndef PQ_4K2K_P2P_H_OFFSET_LIMITIOM 237 #define PQ_4K2K_P2P_H_OFFSET_LIMITIOM 1 238 #endif 239 240 #ifndef ENABLE_PQ_BIN_CF 241 #define ENABLE_PQ_BIN_CF 0 242 #endif 243 //------------------------------------------------------------------------------------------------- 244 // Type and Structure 245 //------------------------------------------------------------------------------------------------- 246 247 #define ENABLE_PQ_LOAD_TABLE_INFO 0 ///<Pr init PQ load table info 248 249 #define PQ_REG_READ_FUNC( u32Reg) MApi_XC_ReadByte( u32Reg ) 250 #define PQ_REG_FUNC( u32Reg, u8Value, u8Mask ) MApi_XC_WriteByteMask( u32Reg, u8Value, u8Mask ) 251 #define PQ_REG_MLOAD_FUNC(u32Reg,u8Value,u8Mask) \ 252 do{ \ 253 if(u32Reg%2) \ 254 { \ 255 MApi_XC_MLoad_WriteCmd_And_Fire(u32Reg-1, ((MS_U16)u8Value)<<8, ((MS_U16)u8Mask)<<8); \ 256 } \ 257 else \ 258 { \ 259 MApi_XC_MLoad_WriteCmd_And_Fire(u32Reg, u8Value, u8Mask); \ 260 } \ 261 }while(0) 262 263 #define PQ_REG_MLOAD_WRITE_CMD(u32Reg,u8Value,u8Mask) \ 264 do{ \ 265 if(u32Reg%2) \ 266 { \ 267 _u32MLoadCmd[_u16MLoadCmdCnt] = u32Reg-1; \ 268 _u16MLoadMsk[_u16MLoadCmdCnt] = ((MS_U16)u8Mask)<<8; \ 269 _u16MLoadVal[_u16MLoadCmdCnt] = ((MS_U16)u8Value)<<8; \ 270 } \ 271 else \ 272 { \ 273 _u32MLoadCmd[_u16MLoadCmdCnt] = u32Reg; \ 274 _u16MLoadMsk[_u16MLoadCmdCnt] = ((MS_U16)u8Mask); \ 275 _u16MLoadVal[_u16MLoadCmdCnt] = ((MS_U16)u8Value); \ 276 } \ 277 _u16MLoadCmdCnt++; \ 278 if(_u16MLoadCmdCnt >= MLOAD_MAX_CMD)\ 279 {\ 280 printf("[PQ ERROR] ====ML overflow !!! \n");\ 281 _u16MLoadCmdCnt = MLOAD_MAX_CMD - 1; \ 282 }\ 283 }while(0) 284 285 #ifndef assert 286 #define assert(b) \ 287 do { \ 288 if (!(b)){ \ 289 printf("assert at [%s][%d] \n", __FUNCTION__, __LINE__); \ 290 *((int*)0) = 0; \ 291 } \ 292 } while(0) 293 #endif 294 295 #define ENLARGE_GATE 1000000 296 297 /* FIX ME*/ 298 #define KERNEL_DRIVER_PATCH 299 //---------------------------- 300 // Return value 301 //---------------------------- 302 /** 303 * The return value for PQ fuction. 304 */ 305 typedef enum 306 { 307 /// fail 308 E_PQ_RET_FAIL = 0, 309 /// success 310 E_PQ_RET_OK, 311 } PQ_ReturnValue; 312 313 typedef enum 314 { 315 E_DRVPQ_RET_FAIL = 0, ///<Fail 316 E_DRVPQ_RET_OK, ///<OK 317 } E_DRVPQ_ReturnValue; 318 319 #if 0 320 /** 321 * PQ DEINTERLACE MODE 322 */ 323 typedef enum 324 { 325 /// off 326 PQ_DEINT_OFF=0, 327 /// 2DDI BOB 328 PQ_DEINT_2DDI_BOB, 329 /// 2DDI AVG 330 PQ_DEINT_2DDI_AVG, 331 /// 3DDI History(24 bit) 332 PQ_DEINT_3DDI_HISTORY, 333 /// 3DDI(16 bit) 334 PQ_DEINT_3DDI, 335 } PQ_DEINTERLACE_MODE; 336 #endif 337 338 /** 339 * PQ 3D_NR_FUNCTION_TYPE 340 */ 341 typedef enum 342 { 343 /// off 344 PQ_3D_NR_MIN, 345 /// off 346 PQ_3D_NR_OFF = PQ_3D_NR_MIN, 347 /// Low 348 PQ_3D_NR_LOW, 349 /// Middle 350 PQ_3D_NR_MID, 351 /// High 352 PQ_3D_NR_HIGH, 353 /// Auto 354 PQ_3D_NR_AUTO, 355 /// Auto Low For Low level 356 PQ_3D_NR_AUTO_LOW_L, 357 /// Auto Mid For Low level 358 PQ_3D_NR_AUTO_LOW_M, 359 /// Auto High For Low level 360 PQ_3D_NR_AUTO_LOW_H, 361 /// Auto Low For Mid level 362 PQ_3D_NR_AUTO_MID_L, 363 /// Auto Mid For Mid level 364 PQ_3D_NR_AUTO_MID_M, 365 /// Auto High For Mid level 366 PQ_3D_NR_AUTO_MID_H, 367 /// Auto Low For High level 368 PQ_3D_NR_AUTO_HIGH_L, 369 /// Auto Mid For High level 370 PQ_3D_NR_AUTO_HIGH_M, 371 /// Auto High For High level 372 PQ_3D_NR_AUTO_HIGH_H, 373 /// Default 374 PQ_3D_NR_DEFAULT, 375 /// The max support number of PQ 3D Noise reduction 376 PQ_3D_NR_NUM, 377 }PQ_3D_NR_FUNCTION_TYPE; 378 379 380 typedef enum 381 { 382 /// off 383 PQ_FilmMode_MIN, 384 /// off 385 PQ_FilmMode_OFF = PQ_FilmMode_MIN, 386 /// On 387 PQ_FilmMode_ON, 388 /// Default 389 PQ_FilmMode_DEFAULT, 390 /// The max support number of PQ Perfect Clear 391 PQ_FilmMode_NUM, 392 }PQ_FILM_MODE_FUNCTION_TYPE; 393 394 typedef enum 395 { 396 /// off 397 PQ_DynContr_MIN, 398 /// off 399 PQ_DynContr_OFF = PQ_DynContr_MIN, 400 /// On 401 PQ_DynContr_ON, 402 /// Default 403 PQ_DynContr_DEFAULT, 404 /// The max support number of PQ Vibrant Colour 405 PQ_DynContr_NUM, 406 }PQ_DYNAMIC_CONTRAST_FUNCTION_TYPE; 407 408 409 typedef enum 410 { 411 PQ_OSD_BW_ON, 412 PQ_OSD_BW_NUM, 413 }PQ_OSD_BW_FUNCTION_TYPE; 414 415 typedef enum 416 { 417 PQ_PTP_PTP, 418 PQ_PTP_NUM, 419 }PQ_PTP_FUNCTION_TYPE; 420 421 422 // PQ Function 423 typedef enum 424 { 425 E_IOCTL_PQ_NONE = 0x00000000, 426 E_IOCTL_HSD_SAMPLING = 0x00000001, 427 E_IOCTL_PREVSD_BILINEAR = 0x00000002, 428 E_IOCTL_ADC_SAMPLING = 0x00000003, 429 E_IOCTL_RFBL_CTRL = 0x00000004, 430 E_IOCTL_PQ_SUGGESTED_FRAMENUM = 0x00000008, 431 E_IOCTL_SET_UCFEATURE = 0x00000010, 432 E_IOCTL_PQ_NUM, 433 }E_PQ_IOCTL_TYPE; 434 435 typedef enum 436 { 437 /// Default 438 PQ_DE_FLICK_DEFAULT, 439 /// Low 440 PQ_DE_FLICK_LOW, 441 /// Middle 442 PQ_DE_FLICK_MID, 443 /// High 444 PQ_DE_FLICK_HIGH, 445 446 }PQ_DE_FLICKER_FUNCTION_TYPE; 447 #if 0 448 /** 449 * INPUT SOURCE TYPE 450 */ 451 typedef enum 452 { 453 /// VGA 454 PQ_INPUT_SOURCE_VGA, 455 /// TV 456 PQ_INPUT_SOURCE_TV, 457 458 /// CVBS 459 PQ_INPUT_SOURCE_CVBS, 460 461 /// S-video 462 PQ_INPUT_SOURCE_SVIDEO, 463 464 /// Component 465 PQ_INPUT_SOURCE_YPBPR, 466 /// Scart 467 PQ_INPUT_SOURCE_SCART, 468 469 470 /// HDMI 471 PQ_INPUT_SOURCE_HDMI, 472 473 /// DTV 474 PQ_INPUT_SOURCE_DTV, 475 476 /// DVI 477 PQ_INPUT_SOURCE_DVI, 478 479 // Application source 480 /// Storage 481 PQ_INPUT_SOURCE_STORAGE, 482 /// KTV 483 PQ_INPUT_SOURCE_KTV, 484 /// JPEG 485 PQ_INPUT_SOURCE_JPEG, 486 487 /// The max support number of PQ input source 488 PQ_INPUT_SOURCE_NUM, 489 /// None 490 PQ_INPUT_SOURCE_NONE = PQ_INPUT_SOURCE_NUM, 491 } PQ_INPUT_SOURCE_TYPE; 492 #endif 493 494 /** 495 * HDMI COLOR FORMAT 496 */ 497 typedef enum 498 { 499 /// RGB 500 PQ_HDMI_COLOR_RGB, 501 /// YUV422 502 PQ_HDMI_COLOR_YUV_422, 503 /// YUV444 504 PQ_HDMI_COLOR_YUV_444, 505 /// YUV420 506 PQ_HDMI_COLOR_YUV_420, 507 }PQ_HDMI_COLOR_TYPE; 508 509 #if 0 510 /** 511 * The active Window for PQ function to takes place. 512 */ 513 typedef enum 514 { 515 /// Main window 516 PQ_MAIN_WINDOW=0, 517 /// Sub window 518 PQ_SUB_WINDOW=1, 519 /// The max support window of PQ 520 PQ_MAX_WINDOW 521 }PQ_WIN; 522 523 /** 524 * FOURCE COLOR FMT 525 */ 526 typedef enum 527 { 528 /// Default 529 PQ_FOURCE_COLOR_DEFAULT, 530 /// RGB 531 PQ_FOURCE_COLOR_RGB, 532 /// YUV 533 PQ_FOURCE_COLOR_YUV, 534 }PQ_FOURCE_COLOR_FMT; 535 #endif 536 537 /** 538 * VIDEO STANDARD TYPE 539 */ 540 typedef enum 541 { 542 /// PAL BGHI 543 E_PQ_VIDEOSTANDARD_PAL_BGHI = 0x00, 544 /// NTSC M 545 E_PQ_VIDEOSTANDARD_NTSC_M = 0x01, 546 /// SECAM 547 E_PQ_VIDEOSTANDARD_SECAM = 0x02, 548 /// NTSC 44 549 E_PQ_VIDEOSTANDARD_NTSC_44 = 0x03, 550 /// PAL M 551 E_PQ_VIDEOSTANDARD_PAL_M = 0x04, 552 /// PAL N 553 E_PQ_VIDEOSTANDARD_PAL_N = 0x05, 554 /// PAL 60 555 E_PQ_VIDEOSTANDARD_PAL_60 = 0x06, 556 /// NOT standard 557 E_PQ_VIDEOSTANDARD_NOTSTANDARD = 0x07, 558 /// AUTO 559 E_PQ_VIDEOSTANDARD_AUTO = 0x08, 560 /// The max support number of Video standard 561 E_PQ_VIDEOSTANDARD_MAX 562 } PQ_VIDEOSTANDARD_TYPE; 563 564 typedef enum 565 { 566 PQ_DISPLAY_ONE, 567 PQ_DISPLAY_PIP, 568 PQ_DISPLAY_POP, 569 }PQ_DISPLAY_TYPE; 570 571 /** 572 * Different PQ Types for PQ information merged to code, need to re-compile if changed PQ setting. 573 */ 574 typedef enum 575 { 576 /// Select main window standard PQ setting for each input source/resolution 577 PQ_BIN_STD_MAIN, 578 /// Select sub window standard PQ setting for each input source/resolution 579 PQ_BIN_STD_SUB, 580 /// Select main window extension PQ setting for each input source/resolution 581 PQ_BIN_EXT_MAIN, 582 /// Select sub window extension PQ setting for each input source/resolution 583 PQ_BIN_EXT_SUB, 584 /// Select main window extension PQ setting for each input source/resolution 585 PQ_BIN_CUSTOMER_MAIN, 586 /// Select sub window extension PQ setting for each input source/resolution 587 PQ_BIN_CUSTOMER_SUB, 588 /// Select UFSC extension PQ setting for each input source/resolution 589 PQ_BIN_UFSC, 590 /// Select main window CF extension PQ setting for each input source/resolution 591 PQ_BIN_CF_MAIN, 592 /// Select sub window CF extension PQ setting for each input source/resolution 593 PQ_BIN_CF_SUB, 594 /// The max number of PQ Bin 595 MAX_PQ_BIN_NUM, 596 }PQ_BIN_TYPE; 597 598 typedef enum 599 { 600 /// Select Scaler0 standard PQ setting for each input source/resolution 601 PQ_XC0_STD = 0x0000, 602 /// Select Scaler0 extension PQ setting for each input source/resolution 603 PQ_XC0_EXT, 604 /// Select Scaler0 customer PQ setting for each input source/resolution 605 PQ_XC0_CUSTOMER, 606 /// Select Scaler0 UFSC PQ setting for each input source/resolution 607 PQ_XC0_UFSC, 608 #if 0 // *** This is example, if you want to add new Scaler 1, 2, ... 609 /// Select Scaler1 standard PQ setting for each input source/resolution 610 PQ_XC1_STD = 0x0010, 611 /// Select Scaler1 extension PQ setting for each input source/resolution 612 PQ_XC1_EXT, 613 /// Select Scaler1 customer PQ setting for each input source/resolution 614 PQ_XC1_CUSTOMER, 615 /// Select Scaler1 UFSC PQ setting for each input source/resolution 616 PQ_XC1_UFSC, 617 #endif 618 } PQ_ENGINE_TYPE; 619 620 /** 621 * Different PQ Types for PQ information merged to binary, need to modify binary if changed PQ setting. 622 */ 623 typedef enum 624 { 625 /// Select main window standard PQ setting for each input source/resolution 626 PQ_TEXT_BIN_STD_MAIN, 627 /// Select sub window standard PQ setting for each input source/resolution 628 PQ_TEXT_BIN_STD_SUB, 629 /// The max number of PQ Text Bin 630 MAX_PQ_TEXT_BIN_NUM, 631 }PQ_TEXT_BIN_TYPE; 632 633 typedef enum 634 { 635 /// PQ VD sampling is on 636 PQ_VD_SAMPLING_ON, 637 /// PQ VD sampling is off 638 PQ_VD_SAMPLING_OFF, 639 /// the max number of PQ VD sampling 640 PQ_VD_SAMPLING_NUM, 641 }PQ_VD_SAMPLING_TYPE; 642 643 644 /** 645 * PQ library idetifcation information. 646 */ 647 typedef struct DLL_PACKED 648 { 649 /// ID 650 MS_U8 u8PQID; 651 /// Virtual address 652 void * pPQBin_AddrVirt; 653 #ifdef UFO_XC_PACKED_SHM 654 #if !defined (__aarch64__) 655 MS_U32 u32AlignDummy0; //align size for MI init share mem size check fail 656 #endif 657 #endif 658 /// Physical address 659 MS_PHYADDR PQBin_PhyAddr; 660 #ifdef UFO_XC_PACKED_SHM 661 #if !defined (__aarch64__) 662 MS_U32 u32AlignDummy1; //align size for MI init share mem size check fail 663 #endif 664 #endif 665 }PQ_Bin_Info; 666 667 /** 668 * PQ initialize information. 669 */ 670 typedef struct DLL_PACKED 671 { 672 /// DDR2 673 MS_BOOL bDDR2; 674 ///MIU0 mem size 675 MS_U32 u32miu0em_size; 676 ///MIU1 mem size 677 MS_U32 u32miu1em_size; 678 /// DDR Frequency 679 MS_U32 u32DDRFreq; 680 /// Bus width 681 MS_U8 u8BusWidth; 682 /// Panel width 683 MS_U16 u16PnlWidth; 684 /// Panel height 685 MS_U16 u16PnlHeight; 686 /// Panel Vtotal 687 MS_U16 u16Pnl_vtotal; 688 /// OSD Hsize 689 MS_U16 u16OSD_hsize; 690 /// Bin count 691 MS_U8 u8PQBinCnt; 692 /// Text Bin count 693 MS_U8 u8PQTextBinCnt; 694 /// Customer Bin count 695 MS_U8 u8PQBinCustomerCnt; 696 /// PQ Bin informaton array 697 MS_U8 u8PQBinUFSCCnt; 698 /// UFSC Bin count 699 PQ_Bin_Info stPQBinInfo[MAX_PQ_BIN_NUM]; 700 /// PQ Text bin information array 701 PQ_Bin_Info stPQTextBinInfo[MAX_PQ_TEXT_BIN_NUM]; 702 /// CF Bin count 703 MS_U8 u8PQBinCFCnt; 704 }MS_PQ_Init_Info; 705 706 /** 707 * The information to infer whether the input source is HDMI or DVI, and format. 708 */ 709 typedef struct DLL_PACKED 710 { 711 /// is HDMI or not 712 MS_BOOL bIsHDMI; 713 /// HDMI color format 714 PQ_HDMI_COLOR_TYPE enColorFmt; 715 /// is HDMI Video or PC 716 MS_BOOL bIsHDMIPC; 717 }MS_PQ_Hdmi_Info; 718 719 /** 720 * The information of video. 721 */ 722 typedef struct DLL_PACKED 723 { 724 /// is SCART_RGB or not 725 MS_BOOL bIsSCART_RGB; 726 /// Video standard type 727 PQ_VIDEOSTANDARD_TYPE enVideoStandard; 728 /// is VIFIN or not 729 MS_BOOL bIsVIFIN; 730 }MS_PQ_Vd_Info; 731 #if 0 732 /** 733 * Video data information to supply when in PQ mode. 734 */ 735 typedef struct 736 { 737 /// is FBL or not 738 MS_BOOL bFBL; 739 /// is interlace mode or not 740 MS_BOOL bInterlace; 741 /// input Horizontal size 742 MS_U16 u16input_hsize; 743 /// input Vertical size 744 MS_U16 u16input_vsize; 745 /// input Vertical total 746 MS_U16 u16input_vtotal; 747 /// input Vertical frequency 748 MS_U16 u16input_vfreq; 749 /// output Vertical frequency 750 MS_U16 u16ouput_vfreq; 751 /// Display Horizontal size 752 MS_U16 u16display_hsize; 753 /// Display Vertical size 754 MS_U16 u16display_vsize; 755 }MS_PQ_Mode_Info; 756 #endif 757 /** 758 * The media type. Photo or Movie 759 */ 760 typedef enum 761 { 762 /// Photo 763 E_PQ_MULTIMEDIA_PHOTO, 764 /// Movie 765 E_PQ_MULTIMEDIA_MOVIE, 766 }MS_PQ_MULTIMEDIA_TYPE; 767 /** 768 * MultiMedia information. 769 */ 770 typedef struct DLL_PACKED 771 { 772 /// PQ MultiMedia information 773 MS_PQ_MULTIMEDIA_TYPE eType; 774 }MS_PQ_MuliMedia_Info; 775 776 777 /** 778 * Supported DTV TYPE 779 */ 780 typedef enum 781 { 782 /// H264 783 E_PQ_DTV_H264, 784 /// MPEG2 785 E_PQ_DTV_MPEG2, 786 /// IFrame 787 E_PQ_DTV_IFRAME, 788 }MS_PQ_DTV_TYPE; 789 790 791 typedef enum 792 { 793 E_PQ_ADC_SAMPLING_NONE = 0x00, 794 E_PQ_ADC_SAMPLING_X_1 = 0x01, 795 E_PQ_ADC_SAMPLING_X_2 = 0x02, 796 E_PQ_ADC_SAMPLING_X_4 = 0x04, 797 E_PQ_ADC_SAMPLING_X_8 = 0x08, 798 E_PQ_ADC_SAMPLING_NOT_SUPPORT = 0xFE, 799 E_PQ_ADC_SAMPLING_MAX = 0xFF, 800 }MS_PQ_ADC_SAMPLING_TYPE; 801 802 /** 803 * PQ table loading, Sub is for the PIP feature 804 */ 805 typedef enum 806 { 807 /// PQ table for Main window 808 PQ_LOAD_TABLE_MAIN, 809 /// PQ table for Sub window 810 PQ_LOAD_TABLE_SUB, 811 /// PQ Ext table for Main window 812 PQ_LOAD_TABLE_MAIN_EX, 813 /// PQ Ext table for Sub window 814 PQ_LOAD_TABLE_SUB_EX, 815 } MS_PQ_PQLOADTABLE_WIN; 816 817 /** 818 * The Detail information of supported DTV 819 */ 820 typedef struct DLL_PACKED 821 { 822 /// PQ DTV information 823 MS_PQ_DTV_TYPE eType; 824 }MS_PQ_Dtv_Info; 825 826 #define PQ_DBG_PQTAB (0x0001) ///< Debug PQ Table 827 #define PQ_DBG_SRULE (0x0002)///< Debug S RULE 828 #define PQ_DBG_CSCRULE (0x0004)///< Debug CSC RULE 829 #define PQ_DBG_GRULE (0x0008)///< Debug G RULE 830 #define PQ_DBG_BW (0x0010)///< Debug BANDWIDTH 831 #define PQ_DBG_MADI (0x0020)///< Debug MADI 832 #define PQ_DBG_INFO (0x0040)///< Debug INFO 833 #define PQ_DBG_IOCTL (0x0080)///< Debug MADI 834 #define PQ_DBG_P2P (0x0100)///< Debug point to point 835 836 #define PQP2P_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_P2P) x; } while(0); 837 #define PQTAB_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_PQTAB) x; } while(0); 838 #define SRULE_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_SRULE) x; } while(0); 839 #define CSCRULE_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_CSCRULE) x; } while(0); 840 #define PQGRULE_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_GRULE) x; } while(0); 841 #define PQBW_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_BW) x; } while(0); 842 #define PQMADi_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_MADI) x; } while(0); 843 #define PQINFO_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_INFO) x; } while(0); 844 #define PQIOCTL_DBG(x) do { if( _u16PQDbgSwitch & PQ_DBG_IOCTL) x; } while(0); 845 846 /** 847 * PQ Status 848 */ 849 typedef struct DLL_PACKED 850 { 851 MS_BOOL bIsInitialized; 852 MS_BOOL bIsRunning; 853 }MS_PQ_Status; 854 855 /** 856 * PQ Information 857 */ 858 typedef struct DLL_PACKED 859 { 860 MS_U16 u16Input_Src_Num; 861 MS_U8 u8IP_Num; 862 }MS_PQ_INFO; 863 864 865 typedef struct DLL_PACKED 866 { 867 PQ_VD_SAMPLING_TYPE eType; 868 MS_U16 u16Hstart; 869 MS_U16 u16Vstart; 870 MS_U16 u16Hsize; 871 MS_U16 u16Vsize; 872 MS_U16 u16Htt; 873 }MS_PQ_VD_Sampling_Info; 874 875 typedef struct DLL_PACKED 876 { 877 MS_BOOL bPIP_Supported; 878 MS_BOOL b3DVideo_Supported; 879 MS_BOOL b4K2KPIP_Supported; 880 }MS_PQ_CAP_INFO; 881 882 #if(ENABLE_PQ_LOAD_TABLE_INFO) 883 typedef struct 884 { 885 MS_U16 _u16CurInputSrcType; 886 //MS_U8 _au8IPGroupIdx[PQ_IP_NUM_Main]; // current table of each IP 887 MS_U8 _au8IPGroupIdx[512]; // current table of each IP, because of build problem, use 512 instead PQ_IP_NUM_Main 888 }MS_PQ_LOAD_TABLE_INFO; 889 #endif 890 891 /** 892 * PQ RFBL mode info 893 */ 894 typedef struct DLL_PACKED 895 { 896 ///RFBL mode enable/disable 897 MS_BOOL bEnable; 898 ///RFBL mode with/without film type 899 MS_BOOL bFilm; 900 ///PQ MADi type 901 MS_U8 u8MADiType; 902 }MS_PQ_RFBL_INFO; 903 904 /** 905 * PQ Switch Control 906 */ 907 typedef enum 908 { 909 /// PQ AP FEATURE On 910 PQ_FEATURE_SWITCH_ON, 911 /// PQ AP FEATURE Off 912 PQ_FEATURE_SWITCH_OFF, 913 /// The max support number of PQ AP FEATURE 914 PQ_FEATURE_SWITCH_NUM, 915 }PQ_FEATURE_SWITCH_TYPE; 916 917 /** 918 * PQ HDR Mode 919 */ 920 typedef enum 921 { 922 /// Off mode 923 PQ_HDR_OFF, 924 /// On mode 925 PQ_HDR_ON, 926 /// The max support number of PQ HDR MODE 927 PQ_HDR_NUM, 928 } PQ_HDR_MODE; 929 930 /** 931 * PQ Level Control 932 */ 933 typedef enum 934 { 935 /// PQ AP FEATURE Level Low 936 PQ_FEATURE_LEVEL_LOW, 937 /// PQ AP FEATURE Level Middle 938 PQ_FEATURE_LEVEL_MIDDLE, 939 /// PQ AP FEATURE Level High 940 PQ_FEATURE_LEVEL_HIGH, 941 /// PQ AP FEATURE Level Auto 942 PQ_FEATURE_LEVEL_AUTO, 943 /// The max support number of Level 944 PQ_FEATURE_LEVEL_NUM, 945 }PQ_FEATURE_LEVEL_TYPE; 946 947 /** 948 * PQ 3D Type 949 */ 950 typedef enum 951 { 952 E_PQ_3DTYPE_XC, /// 3D processed by XC 953 E_PQ_3DTYPE_MVOP, /// 3D processed by MVOP 954 E_PQ_3DTYPE_DUALVIEW, /// special 3d type: dual view 955 E_PQ_3DTYPE_MAX, 956 } PQ_3DTYPE; 957 958 typedef enum 959 { 960 /// SOC 961 EN_PQ_EXECUTOR_SOC, 962 /// backend 963 EN_PQ_EXECUTOR_BACKEND, 964 /// none 965 EN_PQ_NONE=0xFF, 966 }MS_PQ_EXECUTOR; 967 968 typedef enum 969 { 970 E_PQ_4K_PATH = 0, 971 E_PQ_UFSC_4K_PATH = 1, 972 E_PQ_PATH_MAX, 973 }E_PQ_Path_Type; 974 975 typedef enum 976 { 977 /// Ace 978 EN_PQ_ACE, 979 /// Color temperature 980 EN_PQ_COLOR_TEMPERATURE, 981 /// Noise reduction 982 EN_PQ_NOISE_REDUCTION, 983 /// mpeg noise reduction 984 EN_PQ_MPEG_NOISE_REDUCTION, 985 /// dynamic contrast 986 EN_PQ_DYNAMIC_CONTRAST, 987 /// PQ Version 988 EN_PQ_VERSION, 989 /// back light 990 EN_PQ_BACKLIGHT, 991 /// max 992 EN_MAX_NUM=0xFF, 993 }MS_PQ_FUNCTION_TYPE; 994 995 typedef struct 996 { 997 // input timing 998 MS_U16 u16input_hsize; 999 MS_U16 u16input_vtotal; 1000 MS_U16 u16input_vfreq; 1001 1002 // output timing 1003 MS_U16 u16output_hsize; 1004 MS_U16 u16output_vtotal; 1005 MS_U16 u16output_vfreq; 1006 1007 // memory format 1008 MS_BOOL bFBL; 1009 MS_BOOL bMemFmt422; 1010 MS_BOOL bInterlace; 1011 MS_BOOL b4RMode; 1012 MS_U8 u8BitsPerPixel; 1013 1014 // osd 1015 MS_BOOL bOSD_On; 1016 MS_U16 u16OSD_hsize; 1017 MS_U8 u8OSD_BitsPerPixel; 1018 1019 // dram 1020 MS_U32 u32MemBW; 1021 MS_BOOL bSC_MIUSel; 1022 MS_BOOL bGOP_MIUSel; 1023 MS_BOOL bDDR2; 1024 MS_U32 u32DDRFreq; 1025 MS_U8 u8BusWidth; 1026 MS_U32 u32Miu0MemSize; 1027 MS_U32 u32Miu1MemSize; 1028 1029 // PVR 1030 MS_U32 u32PVR_BW; 1031 1032 //AEON 1033 MS_U32 u32MISC_BW; 1034 } BW_INFO_t; 1035 1036 typedef enum 1037 { 1038 E_PQ_MISC_A_NULL = 0, 1039 E_PQ_MISC_A_HDMITX_ENABLE = 1, 1040 E_PQ_MISC_A_LITESN_ENABLE = 2, 1041 E_PQ_MISC_A_NEXT=0x8000, 1042 } PQ_MISC_A; 1043 1044 typedef enum 1045 { 1046 E_PQ_GROUP_A, 1047 E_PQ_GROUP_B, 1048 E_PQ_GROUP_C, 1049 E_PQ_GROUP_D, 1050 } PQ_MISC_GROUP; 1051 1052 typedef struct 1053 { 1054 MS_U32 u32PQMISC_version; ///<Version of current structure. 1055 MS_U32 u32MISC_A; 1056 MS_U32 u32MISC_B; 1057 MS_U32 u32MISC_C; 1058 MS_U32 u32MISC_D; 1059 } PQ_MISC; 1060 typedef enum 1061 { 1062 /// 1063 E_PQ_YUV_STD_0_255 = 0x00, 1064 /// 1065 E_PQ_YUV_STD_BT601 = 0x01, 1066 /// The max support number of Video standard 1067 E_PQ_YUV_STD_MAX 1068 }PQ_YUV_STD; 1069 1070 1071 /** 1072 * The information of soc output color format. 1073 */ 1074 typedef enum 1075 { 1076 /// RGB 1077 E_PQ_COLOR_RGB, 1078 /// YUV422 1079 E_PQ_COLOR_YUV422, 1080 /// YUV444 1081 E_PQ_COLOR_YUV444, 1082 /// YUV420 1083 E_PQ_COLOR_YUV420, 1084 }PQ_COLOR_FORMAT; 1085 1086 typedef enum 1087 { 1088 /// Customer 1089 E_PQ_BIN_PATH_CUSTOMER, 1090 /// Default 1091 E_PQ_BIN_PATH_DEFAULT, 1092 /// INI 1093 E_PQ_BIN_PATH_INI, 1094 /// Bandwidth 1095 E_PQ_BIN_PATH_BANDWIDTH, 1096 /// The max support number of paths 1097 E_PQ_BIN_PATH_MAX 1098 }PQ_BIN_PATH; 1099 1100 INTERFACE void *pu32PQInst; 1101 INTERFACE void *pu32BWInst; 1102 //------------------------------------------------------------------------------------------------- 1103 // Function and Variable 1104 //------------------------------------------------------------------------------------------------- 1105 1106 //------------------------------------------------------------------------------------------------- 1107 /// Get library version 1108 /// @param ppVersion \b OUT: point to point to MSIF_Version 1109 /// @return PQ_ReturnValue 1110 //------------------------------------------------------------------------------------------------- 1111 INTERFACE E_DRVPQ_ReturnValue MDrv_PQ_GetLibVer(const MSIF_Version **ppVersion); 1112 1113 //------------------------------------------------------------------------------------------------- 1114 /// Get PQ information 1115 /// @param pInfo \b OUT: point to PQ information 1116 /// @return PQ_ReturnValue 1117 //------------------------------------------------------------------------------------------------- 1118 INTERFACE PQ_ReturnValue MDrv_PQ_GetInfo(MS_PQ_INFO *pInfo); 1119 1120 //------------------------------------------------------------------------------------------------- 1121 /// Get PQ status 1122 /// @param pStatus \b OUT: point to PQ status 1123 /// @return MS_BOOL 1124 //------------------------------------------------------------------------------------------------- 1125 INTERFACE MS_BOOL MDrv_PQ_GetStatus(MS_PQ_Status *pStatus); 1126 /* 1127 DEBUG MASK: 1128 0x01;///< Debug PQ Table 1129 0x02;///< Debug S RULE 1130 0x04;///< Debug CSC RULE 1131 0x08;///< Debug G RULE 1132 0x10;///< Debug BANDWIDTH 1133 0x20;///< Debug INFO 1134 */ 1135 1136 //------------------------------------------------------------------------------------------------- 1137 /// Get PQ debug message output level 1138 /// @param u16DbgSwitch \b IN: DEBUG MASK, the debug message output level 1139 /// 0x01;///< Debug PQ Table 1140 /// 0x02;///< Debug S RULE 1141 /// 0x04;///< Debug CSC RULE 1142 /// 0x08;///< Debug G RULE 1143 /// 0x10;///< Debug BANDWIDTH 1144 /// 0x20;///< Debug INFO 1145 /// @return MS_BOOL 1146 //------------------------------------------------------------------------------------------------- 1147 INTERFACE MS_BOOL MDrv_PQ_SetDbgLevel(MS_U16 u16DbgSwitch); 1148 1149 // common PQ function 1150 //------------------------------------------------------------------------------------------------- 1151 /// Initial function 1152 /// @param pstPQInitInfo \b IN: point to PQ initial information 1153 //------------------------------------------------------------------------------------------------- 1154 INTERFACE void MDrv_PQ_Init(MS_PQ_Init_Info *pstPQInitInfo); 1155 1156 //------------------------------------------------------------------------------------------------- 1157 /// Get PQ parameter (config) 1158 /// @param pstPQ_Config \b IN: point to PQ config information 1159 /// @retval Success or fail 1160 //------------------------------------------------------------------------------------------------- 1161 INTERFACE MS_BOOL SYMBOL_WEAK MDrv_PQ_GetConfig(MS_PQ_Init_Info *pstPQInitInfo); 1162 1163 //------------------------------------------------------------------------------------------------- 1164 /// Exit function 1165 /// @retval Success or fail 1166 //------------------------------------------------------------------------------------------------- 1167 INTERFACE MS_BOOL MDrv_PQ_Exit(void); 1168 1169 //------------------------------------------------------------------------------------------------- 1170 /// Deside source type 1171 /// @param eWindow \b IN: TBD 1172 /// @param enInputSourceType \b IN: input source type 1173 //------------------------------------------------------------------------------------------------- 1174 INTERFACE void MDrv_PQ_DesideSrcType(PQ_WIN eWindow, PQ_INPUT_SOURCE_TYPE enInputSourceType); 1175 1176 //------------------------------------------------------------------------------------------------- 1177 /// Get source type 1178 /// @param eWindow \b IN: TBD 1179 /// @return Main window or Sub window 1180 //------------------------------------------------------------------------------------------------- 1181 INTERFACE MS_U16 MDrv_PQ_GetSrcType(PQ_WIN eWindow); 1182 1183 //------------------------------------------------------------------------------------------------- 1184 /// Get PQ delay time by memc 1185 /// @return delay time by memc 1186 //------------------------------------------------------------------------------------------------- 1187 INTERFACE MS_U16 MDrv_PQ_GetDelayTimeByMemc(SCALER_WIN eWindow, MS_U32 u32MemcFrameDelay); 1188 1189 //------------------------------------------------------------------------------------------------- 1190 /// Get PQ delay time 1191 /// @return delay time value 1192 //------------------------------------------------------------------------------------------------- 1193 INTERFACE MS_U16 MDrv_PQ_GetDelayTime(SCALER_WIN eWindow); 1194 1195 //------------------------------------------------------------------------------------------------- 1196 /// Get Qmap Executor 1197 /// @param eFunctionType \b IN: TBD 1198 /// @return CHIP Executor of EXECUTOR_SOC or EXECUTOR_URSA 1199 //------------------------------------------------------------------------------------------------- 1200 MS_PQ_EXECUTOR MDrv_PQ_GetQmapExecutor(MS_PQ_FUNCTION_TYPE eFunctionType); 1201 1202 //------------------------------------------------------------------------------------------------- 1203 /// Get input source type 1204 /// @param eWindow \b IN: TBD 1205 /// @return Input Source Type of Main window or Sub window 1206 //------------------------------------------------------------------------------------------------- 1207 INTERFACE PQ_INPUT_SOURCE_TYPE MDrv_PQ_GetInputSourceType(PQ_WIN eWindow); 1208 1209 //------------------------------------------------------------------------------------------------- 1210 /// Set color range 1211 /// @param eWindow \b IN: TBD 1212 /// @param bColorRange0_255 \b IN: Color range 1213 //------------------------------------------------------------------------------------------------- 1214 INTERFACE void MDrv_PQ_SetColorRange(PQ_WIN eWindow, MS_BOOL bColorRange0_255); 1215 1216 //------------------------------------------------------------------------------------------------- 1217 /// Set YUV Standard 1218 /// @param eWindow \b IN: pq window 1219 /// @param enStd \b IN: yuv standard 1220 //------------------------------------------------------------------------------------------------- 1221 void MDrv_PQ_SetPhotoYUVStandard(PQ_WIN eWindow, PQ_YUV_STD enStd); 1222 1223 //------------------------------------------------------------------------------------------------- 1224 /// Set CSC 1225 /// @param eWindow \b IN: TBD 1226 /// @param enFourceColor \b IN: TBD 1227 /// @retval TBD 1228 //------------------------------------------------------------------------------------------------- 1229 INTERFACE MS_BOOL MDrv_PQ_SetCSC(PQ_WIN eWindow, PQ_FOURCE_COLOR_FMT enFourceColor); 1230 1231 1232 //------------------------------------------------------------------------------------------------- 1233 /// Get Memory color format 1234 /// @param eWindow \b IN: TBD 1235 /// @param enFourceColor \b IN: TBD 1236 /// @retval TBD 1237 //------------------------------------------------------------------------------------------------- 1238 INTERFACE MS_BOOL MDrv_PQ_Get_MemYUVFmt(PQ_WIN eWindow, PQ_FOURCE_COLOR_FMT enFourceColor); 1239 1240 //------------------------------------------------------------------------------------------------- 1241 /// Load scaling table 1242 /// @param eWindow \b IN: TBD 1243 /// @param eScalingType \b IN: TBD 1244 /// @param bPreV_ScalingDown \b IN: TBD 1245 /// @param bInterlace \b IN: TBD 1246 /// @param bColorSpaceYUV \b IN: TBD 1247 /// @param u16InputSize \b IN: TBD 1248 /// @param u16SizeAfterScaling \b IN: TBD 1249 /// @retval TBD 1250 //------------------------------------------------------------------------------------------------- 1251 INTERFACE MS_BOOL MDrv_PQ_LoadScalingTable(PQ_WIN eWindow, 1252 MS_U8 eScalingType, 1253 MS_BOOL bPreV_ScalingDown, 1254 MS_BOOL bInterlace, 1255 MS_BOOL bColorSpaceYUV, 1256 MS_U16 u16InputSize, 1257 MS_U16 u16SizeAfterScaling); 1258 1259 //------------------------------------------------------------------------------------------------- 1260 /// Reduce Bandwidth for PVR 1261 /// @param eWindow \b IN: TBD 1262 /// @param bPVR_On \b IN: TBD 1263 //------------------------------------------------------------------------------------------------- 1264 INTERFACE void MDrv_PQ_ReduceBW_ForPVR(PQ_WIN eWindow, MS_BOOL bPVR_On); 1265 1266 //------------------------------------------------------------------------------------------------- 1267 /// Enable MADI Force 1268 /// @param eWindow \b IN: PQ Window 1269 /// @param bFullMotion \b IN: Full Motion 1270 //------------------------------------------------------------------------------------------------- 1271 INTERFACE void MDrv_PQ_EnableMADIForce(PQ_WIN eWindow, MS_BOOL bFullMotion); 1272 1273 //------------------------------------------------------------------------------------------------- 1274 /// Set 420 up sampling 1275 /// @param eWindow \b IN: TBD 1276 /// @param bFBL \b IN: TBD 1277 /// @param bPreV_ScalingDown \b IN: TBD 1278 /// @param u16V_CropStart \b IN: TBD 1279 //------------------------------------------------------------------------------------------------- 1280 INTERFACE void MDrv_PQ_Set420upsampling(PQ_WIN eWindow, MS_BOOL bFBL, MS_BOOL bPreV_ScalingDown, MS_U16 u16V_CropStart); 1281 1282 //------------------------------------------------------------------------------------------------- 1283 /// Set Film mode 1284 /// @param eWindow \b IN: TBD 1285 /// @param bEnable \b IN: TBD 1286 //------------------------------------------------------------------------------------------------- 1287 INTERFACE void MDrv_PQ_SetFilmMode(PQ_WIN eWindow, MS_BOOL bEnable); 1288 1289 //------------------------------------------------------------------------------------------------- 1290 /// Set non-linear scaling 1291 /// @param eWindow \b IN: TBD 1292 /// @param u8Level \b IN: TBD 1293 /// @param bEnable \b IN: TBD 1294 //------------------------------------------------------------------------------------------------- 1295 INTERFACE void MDrv_PQ_SetNonLinearScaling(PQ_WIN eWindow, MS_U8 u8Level, MS_BOOL bEnable); 1296 1297 //------------------------------------------------------------------------------------------------- 1298 /// Check settings 1299 /// @param eWindow \b IN: TBD 1300 //------------------------------------------------------------------------------------------------- 1301 INTERFACE void MDrv_PQ_CheckSettings(PQ_WIN eWindow); 1302 1303 //------------------------------------------------------------------------------------------------- 1304 /// Skip duplicated actions of load settings, to save time and avoid flash garbage for some cases 1305 /// @param eWindow \b IN: the specific window, now useless 1306 /// @param bSkip \b IN: skip or not 1307 /// @retval the result of setting 1308 //------------------------------------------------------------------------------------------------- 1309 INTERFACE MS_BOOL MDrv_PQ_SkipDuplicatedSetting(PQ_WIN eWindow, MS_BOOL bSkip); 1310 1311 //------------------------------------------------------------------------------------------------- 1312 /// Get Status of Skip duplicated actions of load settings 1313 /// @param eWindow \b IN: the specific window, now useless 1314 /// @retval the status of skip duplicated pq setting 1315 //------------------------------------------------------------------------------------------------- 1316 INTERFACE MS_BOOL MDrv_PQ_GetSkipDuplicatedSettingStatus(PQ_WIN eWindow); 1317 1318 //------------------------------------------------------------------------------------------------- 1319 /// Load settings 1320 /// @param eWindow \b IN: TBD 1321 //------------------------------------------------------------------------------------------------- 1322 INTERFACE void MDrv_PQ_LoadSettings(PQ_WIN eWindow); 1323 1324 //------------------------------------------------------------------------------------------------- 1325 /// Load customer settings 1326 /// @param eWindow \b IN: TBD 1327 //------------------------------------------------------------------------------------------------- 1328 INTERFACE void MDrv_PQ_LoadCustomerSettings(PQ_WIN eWindow); 1329 1330 //------------------------------------------------------------------------------------------------- 1331 /// Load table 1332 /// @param eWindow \b IN: TBD 1333 /// @param u16TabIdx \b IN: TBD 1334 /// @param u16PQIPIdx \b IN: TBD 1335 //------------------------------------------------------------------------------------------------- 1336 INTERFACE void MDrv_PQ_LoadTable(PQ_WIN eWindow, MS_U16 u16TabIdx, MS_U16 u16PQIPIdx); 1337 1338 //------------------------------------------------------------------------------------------------- 1339 /// Clone table, the PQ assgined value is ignored, this function will read value from hw reg 1340 /// of u16PQMainIPIdx, then copy to hw reg of u16PQSubIPIdx 1341 /// @param eWindow \b IN: Main window or sub window 1342 /// @param u16TabIdx \b IN: useless currently 1343 /// @param u16PQMainIPIdx \b IN: copy from 1344 /// @param u16PQSubIPIdx \b IN: copy to 1345 //------------------------------------------------------------------------------------------------- 1346 INTERFACE void MDrv_PQ_CloneTable(PQ_WIN eWindow, MS_U16 u16TabIdx, MS_U16 u16PQMainIPIdx, MS_U16 u16PQSubIPIdx); 1347 1348 //------------------------------------------------------------------------------------------------- 1349 /// Load customer table 1350 /// @param eWindow \b IN: TBD 1351 /// @param u16TabIdx \b IN: TBD 1352 /// @param u16PQIPIdx \b IN: TBD 1353 //------------------------------------------------------------------------------------------------- 1354 INTERFACE void MDrv_PQ_LoadCustomerTable(PQ_WIN eWindow, MS_U16 u16TabIdx, MS_U16 u16PQIPIdx); 1355 1356 //------------------------------------------------------------------------------------------------- 1357 /// Get IP number 1358 /// @param eWindow \b IN: TBD 1359 /// @retval TBD 1360 //------------------------------------------------------------------------------------------------- 1361 INTERFACE MS_U16 MDrv_PQ_GetIPNum(PQ_WIN eWindow); 1362 1363 //------------------------------------------------------------------------------------------------- 1364 /// Get current table number 1365 /// @param eWindow \b IN: TBD 1366 /// @param u16PQIPIdx \b IN: TBD 1367 /// @retval TBD 1368 //------------------------------------------------------------------------------------------------- 1369 INTERFACE MS_U16 MDrv_PQ_GetTableNum(PQ_WIN eWindow, MS_U16 u16PQIPIdx); 1370 1371 //------------------------------------------------------------------------------------------------- 1372 /// Get current table index 1373 /// @param eWindow \b IN: TBD 1374 /// @param u16PQIPIdx \b IN: TBD 1375 /// @retval TBD 1376 //------------------------------------------------------------------------------------------------- 1377 INTERFACE MS_U16 MDrv_PQ_GetCurrentTableIndex(PQ_WIN eWindow, MS_U16 u16PQIPIdx); 1378 1379 //------------------------------------------------------------------------------------------------- 1380 /// 3D pq clone, sub win sync with main win 1381 /// @param bIpSync \b IN: do Ip sync operation 1382 //------------------------------------------------------------------------------------------------- 1383 INTERFACE void MDrv_PQ_3DCloneforPIP(MS_BOOL bIpSync); 1384 1385 //------------------------------------------------------------------------------------------------- 1386 /// Disable film mode 1387 /// @param eWindow \b IN: Window type 1388 /// @param bOn \b IN: TBD 1389 //------------------------------------------------------------------------------------------------- 1390 INTERFACE void MDrv_PQ_DisableFilmMode(PQ_WIN eWindow, MS_BOOL bOn); 1391 1392 //------------------------------------------------------------------------------------------------- 1393 /// Get Source type name 1394 /// @param eWindow \b IN: Window type 1395 /// @retval TBD 1396 //------------------------------------------------------------------------------------------------- 1397 INTERFACE char* MDrv_PQ_GetSrcTypeName(PQ_WIN eWindow); 1398 1399 //------------------------------------------------------------------------------------------------- 1400 /// Get IP name 1401 /// @param u8PQIPIdx \b IN: TBD 1402 /// @retval TBD 1403 //------------------------------------------------------------------------------------------------- 1404 INTERFACE char* MDrv_PQ_GetIPName(MS_U8 u8PQIPIdx); 1405 1406 //------------------------------------------------------------------------------------------------- 1407 /// Get table name 1408 /// @param u8PQIPIdx \b IN: TBD 1409 /// @param u8TabIdx \b IN: TBD 1410 /// @retval TBD 1411 //------------------------------------------------------------------------------------------------- 1412 INTERFACE char* MDrv_PQ_GetTableName(MS_U8 u8PQIPIdx, MS_U8 u8TabIdx); 1413 1414 //------------------------------------------------------------------------------------------------- 1415 /// Set DTV Info 1416 /// @param eWindow \b IN: TBD 1417 /// @param pstPQDTVInfo \b IN: TBD 1418 //------------------------------------------------------------------------------------------------- 1419 INTERFACE void MDrv_PQ_Set_DTVInfo(PQ_WIN eWindow, MS_PQ_Dtv_Info *pstPQDTVInfo); 1420 1421 //------------------------------------------------------------------------------------------------- 1422 /// Set MultiMedia information 1423 /// @param eWindow \b IN: TBD 1424 /// @param pstPQMMInfo \b IN: TBD 1425 //------------------------------------------------------------------------------------------------- 1426 INTERFACE void MDrv_PQ_Set_MultiMediaInfo(PQ_WIN eWindow, MS_PQ_MuliMedia_Info *pstPQMMInfo); 1427 1428 //------------------------------------------------------------------------------------------------- 1429 /// Set Video Decoder information 1430 /// @param eWindow \b IN: TBD 1431 /// @param pstPQVDInfo \b IN: TBD 1432 //------------------------------------------------------------------------------------------------- 1433 INTERFACE void MDrv_PQ_Set_VDInfo(PQ_WIN eWindow, MS_PQ_Vd_Info* pstPQVDInfo); 1434 1435 //------------------------------------------------------------------------------------------------- 1436 /// Set mode information 1437 /// @param eWindow \b IN: TBD 1438 /// @param enInputSourceType \b IN: TBD 1439 /// @param pstPQModeInfo \b IN: TBD 1440 //------------------------------------------------------------------------------------------------- 1441 INTERFACE void MDrv_PQ_Set_ModeInfo(PQ_WIN eWindow, PQ_INPUT_SOURCE_TYPE enInputSourceType, MS_PQ_Mode_Info *pstPQModeInfo); 1442 1443 //------------------------------------------------------------------------------------------------- 1444 /// Set HDMI information 1445 /// @param eWindow \b IN: TBD 1446 /// @param pstPQHDMIInfo \b IN: TBD 1447 //------------------------------------------------------------------------------------------------- 1448 INTERFACE void MDrv_PQ_SetHDMIInfo(PQ_WIN eWindow, const MS_PQ_Hdmi_Info* const pstPQHDMIInfo); 1449 1450 //------------------------------------------------------------------------------------------------- 1451 /// Set HDMI information 1452 /// @param eWindow \b IN: TBD 1453 /// @param bIsTrue \b IN: TBD 1454 //------------------------------------------------------------------------------------------------- 1455 INTERFACE void MDrv_PQ_SetHDMI_PC(PQ_WIN eWindow, MS_BOOL bIsTrue); 1456 1457 //------------------------------------------------------------------------------------------------- 1458 /// Set HDMI information 1459 /// @param eWindow \b IN: TBD 1460 /// @retval TBD 1461 //------------------------------------------------------------------------------------------------- 1462 INTERFACE MS_BOOL MDrv_PQ_GetHDMI_PC_Status(PQ_WIN eWindow); 1463 1464 //------------------------------------------------------------------------------------------------- 1465 /// Set force Y motion 1466 /// @param eWindow \b IN: TBD 1467 /// @param bEnable \b IN: TBD 1468 //------------------------------------------------------------------------------------------------- 1469 INTERFACE void MDrv_PQ_MADiForceMotionY(PQ_WIN eWindow, MS_BOOL bEnable); 1470 1471 //------------------------------------------------------------------------------------------------- 1472 /// Set force C motion 1473 /// @param eWindow \b IN: TBD 1474 /// @param bEnable \b IN: TBD 1475 //------------------------------------------------------------------------------------------------- 1476 INTERFACE void MDrv_PQ_MADiForceMotionC(PQ_WIN eWindow, MS_BOOL bEnable); 1477 1478 #ifdef UFO_XC_PQ_SUPPORT_SWMOTION 1479 //------------------------------------------------------------------------------------------------- 1480 /// Set force Y and C motion, with customized motion data 1481 /// @param eWindow \b IN: Window Type 1482 /// @param bEnableY \b IN: Enable Force Y Motion 1483 /// @param u16DataY \b IN: Y motion 1484 /// @param bEnableC \b IN: Enable Force C Motion 1485 /// @param u16DataC \b IN: C motion 1486 //------------------------------------------------------------------------------------------------- 1487 INTERFACE void MDrv_PQ_MADiForceMotion(PQ_WIN eWindow, MS_BOOL bEnableY, MS_U16 u16DataY, 1488 MS_BOOL bEnableC, MS_U16 u16DataC); 1489 #endif 1490 1491 //------------------------------------------------------------------------------------------------- 1492 /// Set RFBL mode for U4 skip field mechanism 1493 /// @param bEnable \b IN: TBD 1494 /// @param bFilm \b IN: TBD 1495 //------------------------------------------------------------------------------------------------- 1496 INTERFACE void MDrv_PQ_SetRFblMode(MS_BOOL bEnable,MS_BOOL bFilm); 1497 1498 //------------------------------------------------------------------------------------------------- 1499 /// Get RFBL mode for U4 skip field mechanism 1500 //------------------------------------------------------------------------------------------------- 1501 INTERFACE void MDrv_PQ_GetRFblMode(MS_PQ_RFBL_INFO * stInfo); 1502 1503 //------------------------------------------------------------------------------------------------- 1504 /// Get VD Sampling 1505 /// @param eWindow \b IN: TBD 1506 /// @param enInputSourceType \b IN: TBD 1507 /// @param eStandard \b IN: TBD 1508 /// @param pInfo \b OUT: TBD 1509 /// @return MS_BOOL 1510 //------------------------------------------------------------------------------------------------- 1511 INTERFACE MS_BOOL MDrv_PQ_Get_VDSampling_Info(PQ_WIN eWindow, PQ_INPUT_SOURCE_TYPE enInputSourceType, PQ_VIDEOSTANDARD_TYPE eStandard, MS_PQ_VD_Sampling_Info *pInfo); 1512 1513 1514 //------------------------------------------------------------------------------------------------- 1515 /// IOCTL function 1516 /// @param eWindow \b IN: TBD 1517 /// @param u32Flag \b IN: TBD 1518 /// @param pBuf \b OUT: TBD 1519 /// @param u32BufSize \b OUT: TBD 1520 /// @return MS_BOOL 1521 //------------------------------------------------------------------------------------------------- 1522 INTERFACE MS_BOOL MDrv_PQ_IOCTL(PQ_WIN eWindow, MS_U32 u32Flag, void *pBuf, MS_U32 u32BufSize); 1523 1524 1525 //------------------------------------------------------------------------------------------------- 1526 /// Set MLoad enable/disable 1527 /// @param eWindow \b IN: TBD 1528 /// @param bEn \b IN: TBD 1529 //------------------------------------------------------------------------------------------------- 1530 INTERFACE void MDrv_PQ_Set_MLoadEn(PQ_WIN eWindow, MS_BOOL bEn); 1531 1532 1533 //------------------------------------------------------------------------------------------------- 1534 /// Get ADC Sampling 1535 /// @param eWindow \b IN: TBD 1536 /// @param enInputSourceType \b IN: TBD 1537 /// @param pstPQModeInfo \b IN: TBD 1538 /// @return MS_PQ_ADC_SAMPLING_TYPE 1539 //------------------------------------------------------------------------------------------------- 1540 INTERFACE MS_PQ_ADC_SAMPLING_TYPE MDrv_PQ_Get_ADCSampling_Info(PQ_WIN eWindow, PQ_INPUT_SOURCE_TYPE enInputSourceType, MS_PQ_Mode_Info *pstPQModeInfo); 1541 1542 //------------------------------------------------------------------------------------------------- 1543 /// set 3D Video mode 1544 /// @param bEn \b IN: TBD 1545 /// @return MS_BOOL 1546 //------------------------------------------------------------------------------------------------- 1547 INTERFACE MS_BOOL MDrv_PQ_Set3D_OnOff(MS_BOOL bEn); 1548 1549 //------------------------------------------------------------------------------------------------- 1550 /// disable UCFeature 1551 /// @param eWindow \b IN: TBD 1552 /// @param BOOL \b OUT: TBD 1553 //------------------------------------------------------------------------------------------------- 1554 INTERFACE MS_BOOL MDrv_PQ_DisableUCFeature(PQ_WIN eWindow); 1555 1556 //------------------------------------------------------------------------------------------------- 1557 /// set UCFeature 1558 /// @param eWindow \b IN: TBD 1559 /// @param u16TabIdx_MADi_DFK \b IN: TBD 1560 /// @param u16TabIdx_MADi_SST \b IN: TBD 1561 /// @param u16TabIdx_MADi_EODiW \b IN: TBD 1562 /// @param u16TabIdx_UCNR \b IN: TBD 1563 /// @param u16TabIdx_UCDi \b IN: TBD 1564 /// @param u16TabIdx_UCCTL \b IN: TBD 1565 /// @param BOOL \b OUT: TBD 1566 //------------------------------------------------------------------------------------------------- 1567 INTERFACE MS_BOOL MDrv_PQ_SetUCFeature(PQ_WIN eWindow, 1568 MS_U16 u16TabIdx_MADi, 1569 MS_U16 u16TabIdx_MADi_Mot, 1570 MS_U16 u16TabIdx_MADi_DFK, 1571 MS_U16 u16TabIdx_MADi_SST, 1572 MS_U16 u16TabIdx_MADi_EODiW, 1573 MS_U16 u16TabIdx_UCNR, 1574 MS_U16 u16TabIdx_UCDi, 1575 MS_U16 u16TabIdx_UCCTL, 1576 MS_U16 u16TabIdx_SwDriver, 1577 MS_U16 u16TabIdx_PostCCS, 1578 MS_U16 u16TabIdx_DHD 1579 ); 1580 1581 //------------------------------------------------------------------------------------------------- 1582 /// get Current UCFeature status 1583 /// @param eWindow \b IN: TBD 1584 /// @param pu16TabIdx_MADi_DFK \b IN: TBD 1585 /// @param pu16TabIdx_MADi_SST \b IN: TBD 1586 /// @param pu16TabIdx_MADi_EODiW \b IN: TBD 1587 /// @param pu16TabIdx_UCNR \b IN: TBD 1588 /// @param pu16TabIdx_UCDi \b IN: TBD 1589 /// @param pu16TabIdx_UCCTL \b IN: TBD 1590 /// @param BOOL \b OUT: TBD 1591 //------------------------------------------------------------------------------------------------- 1592 INTERFACE MS_BOOL MDrv_PQ_GetCurrentUCFeature(PQ_WIN eWindow, 1593 MS_U16 *pu16TabIdx_MADi, 1594 MS_U16 *pu16TabIdx_MADi_Mot, 1595 MS_U16 *pu16TabIdx_MADi_DFK, 1596 MS_U16 *pu16TabIdx_MADi_SST, 1597 MS_U16 *pu16TabIdx_MADi_EODiW, 1598 MS_U16 *pu16TabIdx_UCNR, 1599 MS_U16 *pu16TabIdx_UCDi, 1600 MS_U16 *pu16TabIdx_UCCTL, 1601 MS_U16 *pu16TabIdx_SwDriver, 1602 MS_U16 *pu16TabIdx_PostCCS, 1603 MS_U16 *pu16TabIdx_DHD 1604 ); 1605 1606 //------------------------------------------------------------------------------ 1607 /// Set DMS V12 L on/off 1608 /// @param eWindow \b IN: TBD 1609 /// @param bEnable \b IN: Enable DMS V12L if it is TRUE 1610 /// @return MS_BOOL 1611 //------------------------------------------------------------------------------ 1612 INTERFACE MS_BOOL MDrv_PQ_SetDMSV12L(PQ_WIN eWindow, MS_BOOL bEnable); 1613 1614 //------------------------------------------------------------------------------ 1615 /// Get DMS V12 L on/off 1616 /// @param eWindow \b IN: TBD 1617 /// @return \b OUT: BOOL TURE for DMSV 12L on 1618 //------------------------------------------------------------------------------ 1619 INTERFACE MS_BOOL MDrv_PQ_GetDMSV12LFromXRuleTable(PQ_WIN eWindow); 1620 1621 //------------------------------------------------------------------------------------------------- 1622 /// get the capibility of PQ 1623 /// @param pInfo \b IN: TBD 1624 /// @return MS_BOOL 1625 //------------------------------------------------------------------------------------------------- 1626 INTERFACE MS_BOOL MDrv_PQ_GetCaps(MS_PQ_CAP_INFO *pInfo); 1627 1628 //------------------------------------------------------------------------------------------------- 1629 /// Set Dynamic Scaling on/off 1630 /// @param eWindow \b IN: TBD 1631 /// @param bEn \b IN: TBD 1632 /// @return MS_BOOL 1633 //------------------------------------------------------------------------------------------------- 1634 INTERFACE MS_BOOL MDrv_PQ_SetDS_OnOFF(PQ_WIN eWindow, MS_BOOL bEn); 1635 1636 //------------------------------------------------------------------------------------------------- 1637 /// print out table information of each IP 1638 /// @param enPQWin \b IN: TBD 1639 //------------------------------------------------------------------------------------------------- 1640 INTERFACE void MDRV_PQ_PrintLoadTableInfo(MS_PQ_PQLOADTABLE_WIN enPQWin); 1641 1642 //------------------------------------------------------------------------------------------------- 1643 /// Get madi information 1644 /// @param eWindow \b IN: TBD 1645 /// @return MS_BOOL MADI:True , NULL : False 1646 //------------------------------------------------------------------------------------------------- 1647 INTERFACE MS_BOOL MDrv_PQ_Get_RFBL_Info( PQ_WIN eWindow); 1648 1649 //------------------------------------------------------------------------------------------------- 1650 /// get src hd/sd information 1651 /// @param eWindow \b IN: TBD 1652 /// @return MS_BOOL 1653 //------------------------------------------------------------------------------------------------- 1654 INTERFACE MS_BOOL MDrv_PQ_CheckHDMode( PQ_WIN eWindow ); 1655 1656 //------------------------------------------------------------------------------------------------- 1657 /// get Interlace SD mode 1658 //------------------------------------------------------------------------------------------------- 1659 INTERFACE MS_BOOL MDrv_PQ_Get_Interlace_SD_mode(void); 1660 1661 1662 //------------------------------------------------------------------------------------------------- 1663 /// Set point to point mode on/off 1664 /// @param bEnable \b IN: TBD 1665 //------------------------------------------------------------------------------------------------- 1666 INTERFACE void MDrv_PQ_SetDotByDotMode(MS_BOOL bEnable); 1667 1668 //------------------------------------------------------------------------------------------------- 1669 /// Update the Memory Format 1670 /// @retval Success or not 1671 //------------------------------------------------------------------------------------------------- 1672 INTERFACE MS_BOOL MDrv_PQ_Update_MemFormat(void); 1673 1674 //------------------------------------------------------------------------------------------------- 1675 /// set low 3d picture quality, for user demo 1676 /// @param bEnable \b IN: low or high quality 1677 /// @return NONE 1678 //------------------------------------------------------------------------------------------------- 1679 INTERFACE MS_BOOL MDrv_PQ_LOW_3dQuality(MS_BOOL bEnable); 1680 1681 //------------------------------------------------------------------------------------------------- 1682 /// set enhance quality, for mwe demo 1683 /// @return NONE 1684 //------------------------------------------------------------------------------------------------- 1685 INTERFACE MS_BOOL MDrv_PQ_MWE_SetEnhanceQuality(void); 1686 //------------------------------------------------------------------------------------------------- 1687 /// restore enhance quality, for mwe demo 1688 /// @return NONE 1689 //------------------------------------------------------------------------------------------------- 1690 INTERFACE MS_BOOL MDrv_PQ_MWE_RestoreEnhanceQuality(void); 1691 //------------------------------------------------------------------------------------------------- 1692 /// set enhance quality, for mwe demo 1693 /// @return NONE 1694 //------------------------------------------------------------------------------------------------- 1695 INTERFACE MS_BOOL MDrv_PQ_MWE_RestoreOffQuality(void); 1696 //------------------------------------------------------------------------------------------------- 1697 /// set enhance quality, for mwe demo 1698 /// @return NONE 1699 //------------------------------------------------------------------------------------------------- 1700 INTERFACE MS_BOOL MDrv_PQ_MWE_SetOffQuality(void); 1701 //------------------------------------------------------------------------------------------------- 1702 /// MWE main window and sub window clone 1703 /// @param eWindow \b IN: PQ Window Main or sub 1704 /// @return NONE 1705 //------------------------------------------------------------------------------------------------- 1706 INTERFACE void MDrv_PQ_MWE_CloneWindow(PQ_WIN eWindow); 1707 //------------------------------------------------------------------------------------------------- 1708 /// 3D main window and sub window clone 1709 /// @param enPQ3DType \b IN: PQ 3D type 1710 /// @param eWindow \b IN: PQ Window Main or sub 1711 /// @return NONE 1712 //------------------------------------------------------------------------------------------------- 1713 INTERFACE void MDrv_PQ_3D_CloneWindow(PQ_3DTYPE enPQ3DType, PQ_WIN eWindow); 1714 //------------------------------------------------------------------------------------------------- 1715 /// 3D main window and sub window load pq for LBL settings. 1716 /// @param eWindow \b IN: PQ Window Main or sub 1717 /// @return MS_BOOL 1718 //------------------------------------------------------------------------------------------------- 1719 INTERFACE MS_BOOL MDrv_PQ_3D_SettingForLBL(PQ_WIN eWindow); 1720 1721 //------------------------------------------------------------------------------------------------- 1722 /// Get the H size 1723 /// @return MS_U16 Horizontal size 1724 //------------------------------------------------------------------------------------------------- 1725 INTERFACE MS_U16 MDrv_PQ_GetHsize(PQ_WIN enPQWin); 1726 //------------------------------------------------------------------------------------------------- 1727 /// Get the V size 1728 /// @return MS_U16 Vertical size 1729 //------------------------------------------------------------------------------------------------- 1730 INTERFACE MS_U16 MDrv_PQ_GetVsize(PQ_WIN enPQWin); 1731 //------------------------------------------------------------------------------------------------- 1732 /// Check interlace 1733 /// @return MS_BOOL 1734 //------------------------------------------------------------------------------------------------- 1735 INTERFACE MS_BOOL MDrv_PQ_IsInterlace(PQ_WIN enPQWin); 1736 1737 //------------------------------------------------------------------------------------------------- 1738 /// selection to VIP CSC 1739 /// Both equation selection rules are 1740 /// 0: SDTV(601) R G B : 16-235 1741 /// 1: SDTV(601) R G B : 0-255 1742 /// @param u16selection \b IN: Select 16-235 or 0-255 1743 /// @param eWindow \b IN: PQ Window Main or sub 1744 //------------------------------------------------------------------------------------------------- 1745 INTERFACE void MDrv_PQ_SetSelectCSC(MS_U16 u16selection, PQ_WIN eWindow); 1746 1747 //------------------------------------------------------------------------------------------------- 1748 /// Get R2Y EQ Select 1749 /// @param eWindow \b IN: PQ Window Main or sub 1750 /// @return TRUE: 709 to 601 , FALSE: not 709 to 601 1751 //------------------------------------------------------------------------------------------------- 1752 INTERFACE MS_BOOL MDrv_PQ_GetR2YEqSelect(PQ_WIN eWindow); 1753 1754 1755 //------------------------------------------------------------------------------------------------- 1756 /// Enable or diable PTP 1757 /// @param pstXC_SetWin_Info \b IN: Set Win Info 1758 /// @param bEnable \b IN: Enable or disable the PTP 1759 /// @param eWindow \b IN: PQ Window Main or sub 1760 /// @return the result of Setting 1761 //------------------------------------------------------------------------------------------------- 1762 INTERFACE MS_BOOL MDrv_PQ_Set_PointToPoint(XC_SETWIN_INFO *pstXC_SetWin_Info, 1763 MS_BOOL bEnable, 1764 PQ_WIN eWindow); 1765 1766 //------------------------------------------------------------------------------------------------- 1767 /// whether need to do vga force to 422 mode, for ucnr cbcr swap problem 1768 /// @return need or not 1769 //------------------------------------------------------------------------------------------------- 1770 INTERFACE MS_BOOL MDrv_PQ_GetVGASubCaseForceTo422Mode(void); 1771 1772 //------------------------------------------------------------------------------------------------- 1773 /// Enable or diable Dualview state 1774 /// @param bEnable \b IN: Enable or disable the dualview 1775 /// @return the result of Setting 1776 //------------------------------------------------------------------------------------------------- 1777 INTERFACE MS_BOOL MDrv_PQ_SetDualViewState(MS_BOOL bEnable); 1778 1779 //------------------------------------------------------------------------------------------------- 1780 /// Get the current Dualview state(Enable or diable) 1781 /// @return the state 1782 //------------------------------------------------------------------------------------------------- 1783 INTERFACE MS_BOOL MDrv_PQ_GetDualViewState(void); 1784 1785 //------------------------------------------------------------------------------------------------- 1786 /// Enable or diable ForceVideoInputMode(Force Input to do IP_CSC) 1787 /// @param bEnable \b IN: Enable or disable the ForceVideoInputMode 1788 /// @param eWindow \b IN: PQ Window Main or sub 1789 /// @return the result of Setting 1790 //------------------------------------------------------------------------------------------------- 1791 INTERFACE MS_BOOL MDrv_PQ_ForceVideoInputMode(MS_BOOL bEnable, PQ_WIN eWindow); 1792 1793 //------------------------------------------------------------------------------------------------- 1794 /// Get the current ForceVideoInputMode state(Enable or diable) 1795 /// @param eWindow \b IN: PQ Window Main or sub 1796 /// @return the state 1797 //------------------------------------------------------------------------------------------------- 1798 INTERFACE MS_BOOL MDrv_PQ_IsForceVideoInputMode(PQ_WIN eWindow); 1799 1800 //------------------------------------------------------------------------------------------------- 1801 /// get PTP current status, enable or disable 1802 /// @param eWindow \b IN: PQ Window Main or sub 1803 /// @return the current status 1804 //------------------------------------------------------------------------------------------------- 1805 INTERFACE MS_BOOL MDrv_PQ_Get_PointToPoint(PQ_WIN eWindow); 1806 1807 INTERFACE MS_BOOL MDrv_PQ_GetMemFmtInGeneral(PQ_WIN eWindow, 1808 MS_BOOL bMemFmt422, 1809 MS_U16 *pu16TabIdx_MemFormat, 1810 MS_U16 *pu16TabIdx_444To422, 1811 MS_U16 *pu16TabIdx_422To444 1812 ); 1813 INTERFACE MS_BOOL MDrv_PQ_GetMADiForRFBL(PQ_WIN eWindow, MS_BOOL bFBL, MS_U16 *pu16TabIdx_MADi_Motion, MS_U16 *pu16TabIdx_MADi); 1814 INTERFACE MS_BOOL MDrv_PQ_Patch2Rto4RForFieldPackingMode(PQ_WIN eWindow, MS_U16 u16TabIdx_MADi); 1815 INTERFACE MS_BOOL MDrv_PQ_GetBPPInfoFromMADi(PQ_WIN eWindow, 1816 MS_BOOL bMemFmt422, 1817 MS_U16 u16TabIdx_MADi, 1818 MS_U16 u16TabIdx_MemFormat, 1819 MS_U8 *pu8BitsPerPixel, 1820 PQ_DEINTERLACE_MODE *peDeInterlaceMode, 1821 MS_U8 *pu8FrameCount 1822 ); 1823 INTERFACE MS_BOOL MDrv_PQ_ChangeMemConfigFor3D(PQ_WIN eWindow, 1824 MS_BOOL bMemFmt422, 1825 MS_U16 *pu16TabIdx_MemFormat, 1826 MS_U16 *pu16TabIdx_444To422, 1827 MS_U16 *pu16TabIdx_422To444, 1828 MS_U8 *pu8BitsPerPixel, 1829 MS_U16 *pu16TabIdx_MADi_Motion, 1830 MS_U16 *pu16TabIdx_MADi 1831 ); 1832 INTERFACE MS_BOOL MDrv_PQ_ForceBPPForDynamicMemFmt(PQ_WIN eWindow, MS_BOOL bMemFmt422, MS_U8 *pu8BitsPerPixel); 1833 INTERFACE MS_BOOL MDrv_PQ_SuggestFrameNum(PQ_WIN eWindow, MS_U16 u16TabIdx_MADi, MS_U8 u8FrameCount); 1834 1835 //------------------------------------------------------------------------------------------------- 1836 /// Set Game mode, enable or disable 1837 /// @param eWindow \b IN: PQ Window Main or sub 1838 /// @param bEnable \b IN: enable or disable 1839 /// @return TRUE: Success, FALSE: failed 1840 //------------------------------------------------------------------------------------------------- 1841 INTERFACE MS_BOOL MDrv_PQ_SetGameMode(PQ_WIN eWindow, MS_BOOL bEnable); 1842 1843 //------------------------------------------------------------------------------------------------- 1844 /// Set HDR mode, enable or disable 1845 /// @param eWindow \b IN: PQ Window Main or sub 1846 /// @param u16GRuleLevelIndex \b IN: GRule Level Index 1847 /// @return TRUE: Success, FALSE: failed 1848 //------------------------------------------------------------------------------------------------- 1849 INTERFACE MS_BOOL MDrv_PQ_EnableHDRMode(PQ_WIN eWindow, MS_U16 u16GRuleLevelIndex); 1850 1851 //------------------------------------------------------------------------------------------------- 1852 /// Get current Game mode status 1853 /// @param eWindow \b IN: PQ Window Main or sub 1854 /// @return the current status 1855 //------------------------------------------------------------------------------------------------- 1856 INTERFACE MS_BOOL MDrv_PQ_GetGameMode_Status(PQ_WIN eWindow); 1857 1858 //------------------------------------------------------------------------------------------------- 1859 /// Set bypass mode, enable or disable 1860 /// @param eWindow \b IN: PQ Window Main or sub 1861 /// @param bEnable \b IN: enable or disable 1862 /// @return TRUE: Success, FALSE: failed 1863 //------------------------------------------------------------------------------------------------- 1864 INTERFACE MS_BOOL MDrv_PQ_SetBypassMode(PQ_WIN eWindow, MS_BOOL bEnable); 1865 1866 //------------------------------------------------------------------------------------------------- 1867 /// Get current bypass mode status 1868 /// @param eWindow \b IN: PQ Window Main or sub 1869 /// @return the current status 1870 //------------------------------------------------------------------------------------------------- 1871 INTERFACE MS_BOOL MDrv_PQ_GetBypassModeStatus(PQ_WIN eWindow); 1872 1873 //------------------------------------------------------------------------------------------------- 1874 /// Get Qmap Version 1875 /// @param eWindow \b IN: PQ Window 1876 /// @return \b OUT: the Version of PQ 1877 //------------------------------------------------------------------------------------------------- 1878 INTERFACE char* MDrv_PQ_GetVersion(PQ_WIN eWindow); 1879 INTERFACE char* MDrv_PQ_Cus_GetVersion(PQ_WIN eWindow); 1880 1881 //------------------------------------------------------------------------------------------------- 1882 /// Get main page setting from u16IPIdx(column), according to current input source type(row) 1883 /// @param eWindow \b IN: PQ Window 1884 /// @param u16IPIdx \b IN: u16IPIdx(column) 1885 /// @return \b OUT: the Version of PQ 1886 //------------------------------------------------------------------------------------------------- 1887 INTERFACE MS_U16 MDrv_PQ_GetTableIndex(PQ_WIN eWindow, MS_U16 u16IPIdx); 1888 1889 //------------------------------------------------------------------------------------------------- 1890 /// Get customer main page setting from u16IPIdx(column), according to current input source type(row) 1891 /// @param eWindow \b IN: PQ Window 1892 /// @param u16IPIdx \b IN: u16IPIdx(column) 1893 /// @return \b OUT: the Version of PQ 1894 //------------------------------------------------------------------------------------------------- 1895 INTERFACE MS_U16 MDrv_PQ_GetCustomerTableIndex(PQ_WIN eWindow, MS_U16 u16IPIdx); 1896 1897 //------------------------------------------------------------------------------------------------- 1898 /// To Set Specified GRule's Specified Status 1899 /// @param eWindow \b IN: PQ Window 1900 /// @param u16GruleType \b IN: Specified Grule type 1901 /// @param u16GruleStatus \b IN: Specified status of u16GruleType 1902 /// @return MAPI_BOOL \b TRUE: success; FALSE: fail 1903 //------------------------------------------------------------------------------------------------- 1904 INTERFACE MS_BOOL MDrv_PQ_SetGRuleStatus(PQ_WIN eWindow, MS_U16 u16GruleType, MS_U16 u16GruleStatus); 1905 1906 //------------------------------------------------------------------------------------------------- 1907 /// To Get Specified GRule's Level Num 1908 /// @param eWindow \b IN: PQ Window 1909 /// @param u16GruleType \b IN: Grule typ ID 1910 /// @return MAPI_U16 \b 0: fail; non-0: success 1911 //------------------------------------------------------------------------------------------------- 1912 INTERFACE MS_U16 MDrv_PQ_GetGRule_LvlNum(PQ_WIN eWindow, MS_U16 u16GRuleType); 1913 1914 //------------------------------------------------------------------------------------------------- 1915 /// To Get Total GRule Type Num 1916 /// @param eWindow \b IN: PQ Window 1917 /// @return total Grule type num 1918 //------------------------------------------------------------------------------------------------- 1919 INTERFACE MS_U16 MDrv_PQ_GetGRule_GRuleNum(PQ_WIN eWindow); 1920 1921 //------------------------------------------------------------------------------------------------- 1922 /// To Get Grule level index 1923 /// @param eWindow \b IN: PQ Window 1924 /// @param u16GruleType \b IN: Grule typ ID 1925 /// @param u16GRuleLevelIndex \b IN: Grule level index 1926 /// @return total Grule type num 1927 //------------------------------------------------------------------------------------------------- 1928 INTERFACE MS_U16 MDrv_PQ_GetGRule_LevelIndex(PQ_WIN eWindow, MS_U16 u16GRuleType, MS_U16 u16GRuleLevelIndex); 1929 1930 //------------------------------------------------------------------------------------------------- 1931 /// To Get Grule IP index 1932 /// @param eWindow \b IN: PQ Window 1933 /// @param u16GruleType \b IN: Grule typ ID 1934 /// @param u16GRuleIPIndex \b IN: Grule ip index 1935 /// @return total Grule type num 1936 //------------------------------------------------------------------------------------------------- 1937 INTERFACE MS_U16 MDrv_PQ_GetGRule_IPIndex(PQ_WIN eWindow, MS_U16 u16GRuleType, MS_U16 u16GRuleIPIndex); 1938 1939 //------------------------------------------------------------------------------------------------- 1940 /// To Get Grule customer IP index 1941 /// @param eWindow \b IN: PQ Window 1942 /// @param u16GruleType \b IN: Grule typ ID 1943 /// @param u16GRuleIPIndex \b IN: Grule ip index 1944 /// @return total Grule type num 1945 //------------------------------------------------------------------------------------------------- 1946 INTERFACE MS_U16 MDrv_PQ_GetCustomerGRule_IPIndex(PQ_WIN eWindow, MS_U16 u16GRuleType, MS_U16 u16GRuleIPIndex); 1947 1948 //------------------------------------------------------------------------------------------------- 1949 /// To Get Grule Table Index 1950 /// @param eWindow \b IN: PQ Window 1951 /// @param u16GruleType \b IN: Grule typ ID 1952 /// @param u16PQ_NRIdx \b IN: Grule index 1953 /// @param u16GRuleIPIndex \b IN: Grule ip index 1954 /// @return total Grule type num 1955 //------------------------------------------------------------------------------------------------- 1956 INTERFACE MS_U16 MDrv_PQ_GetGRule_TableIndex(PQ_WIN eWindow, MS_U16 u16GRuleType, MS_U16 u16PQ_NRIdx, MS_U16 u16GRuleIPIndex); 1957 1958 //------------------------------------------------------------------------------------------------- 1959 /// To Get Customer Grule Table Index 1960 /// @param eWindow \b IN: PQ Window 1961 /// @param u16GruleType \b IN: Grule typ ID 1962 /// @param u16PQ_NRIdx \b IN: Grule index 1963 /// @param u16GRuleIPIndex \b IN: Grule ip index 1964 /// @return total Grule type num 1965 //------------------------------------------------------------------------------------------------- 1966 INTERFACE MS_U16 MDrv_PQ_GetGRule_CustomerTableIndex(PQ_WIN eWindow, MS_U16 u16GRuleType, MS_U16 u16PQ_NRIdx, MS_U16 u16GRuleIPIndex); 1967 1968 //------------------------------------------------------------------------------------------------- 1969 /// Set Power State 1970 /// @param enPowerState \b IN: Power state 1971 /// @return status 1972 //------------------------------------------------------------------------------------------------- 1973 INTERFACE MS_U32 MDrv_PQ_SetPowerState(EN_POWER_MODE enPowerState); 1974 1975 //------------------------------------------------------------------------------------------------- 1976 /// Set xvYCC Matrix Coefficient 1977 /// this is only available when we are using YUV domain inside scaler 1978 /// @param flRed \b IN: Red data in float 1979 /// @param flGreen \b IN: Green data in float 1980 /// @param flBlue \b IN: Blue data in float 1981 /// @param flWhite \b IN: White data in float 1982 /// @param eWindow \b IN: Main or Sub window 1983 /// @return setting matrix success or not 1984 //------------------------------------------------------------------------------------------------- 1985 INTERFACE MS_BOOL MDrv_PQ_Set_xvYCC_MatrixCoefficient(MS_U64 u64Red_x, MS_U64 u64Red_y, 1986 MS_U64 u64Green_x, MS_U64 u64Green_y, 1987 MS_U64 u64Blue_x, MS_U64 u64Blue_y, 1988 MS_U64 u64White_x, MS_U64 u64White_y, 1989 PQ_WIN eWindow); 1990 1991 //------------------------------------------------------------------------------------------------- 1992 /// Set xvYCC Matrix Enable 1993 /// this is only available when we are using YUV domain inside scaler 1994 /// @param flRed \b IN: Red data in float 1995 /// @param flGreen \b IN: Green data in float 1996 /// @param flBlue \b IN: Blue data in float 1997 /// @param flWhite \b IN: White data in float 1998 /// @return Enable matrix success or not 1999 //------------------------------------------------------------------------------------------------- 2000 INTERFACE MS_BOOL MDrv_PQ_Set_xvYCC_MatrixEnable(MS_BOOL bEnable, PQ_WIN eWindow); 2001 2002 //------------------------------------------------------------------------------------------------- 2003 /// Get main page setting from u16IPIdx(column), according to current input source type(row) by ePQEngineType 2004 /// @param eWindow \b IN: PQ Window 2005 /// @param u16IPIdx \b IN: u16IPIdx(column) 2006 /// @param ePQEngineType \b IN: From PQ engine type 2007 /// @return \b OUT: the Version of PQ 2008 //------------------------------------------------------------------------------------------------- 2009 INTERFACE MS_U16 MDrv_PQ_GetTableIndex_Ex( PQ_WIN eWindow, MS_U16 u16IPIdx, PQ_ENGINE_TYPE ePQEngineType); 2010 2011 //------------------------------------------------------------------------------------------------- 2012 /// Load table by ePQEngineType 2013 /// @param eWindow \b IN: Main window or sub window 2014 /// @param u16TabIdx \b IN: TBD 2015 /// @param u16PQIPIdx \b IN: TBD 2016 /// @param ePQEngineType \b IN: From PQ engine type 2017 //------------------------------------------------------------------------------------------------- 2018 INTERFACE void MDrv_PQ_LoadTable_Ex( PQ_WIN eWindow, MS_U16 u16TabIdx, MS_U16 u16PQIPIdx, PQ_ENGINE_TYPE ePQEngineType); 2019 2020 //------------------------------------------------------------------------------------------------- 2021 /// Demo main window and sub window clone 2022 /// @param eWindow \b IN: PQ Window Main or sub 2023 ///@param u8Mode \b IN: quality mode 2024 /// @return NONE 2025 //------------------------------------------------------------------------------------------------- 2026 INTERFACE MS_BOOL MDrv_PQ_Demo_CloneWindow(PQ_WIN eWindow, MS_U8 u8Mode); 2027 2028 //------------------------------------------------------------------------------------------------- 2029 /// To Get Specified GRule's Level Num by ePQEngineType 2030 /// @param eWindow \b IN: PQ Window 2031 /// @param u16GruleType \b IN: Grule typ ID 2032 /// @param ePQEngineType \b IN: From PQ engine type 2033 /// @return MAPI_U16 \b 0: fail; non-0: success 2034 //------------------------------------------------------------------------------------------------- 2035 INTERFACE MS_U16 MDrv_PQ_GetGRule_LvlNum_Ex(PQ_WIN eWindow, MS_U16 u16GRuleType, PQ_ENGINE_TYPE ePQEngineType); 2036 2037 //------------------------------------------------------------------------------------------------- 2038 /// To Get Grule level index by ePQEngineType 2039 /// @param eWindow \b IN: PQ Window 2040 /// @param u16GruleType \b IN: Grule typ ID 2041 /// @param u16GRuleLevelIndex \b IN: Grule level index 2042 /// @param ePQEngineType \b IN: From PQ engine type 2043 /// @return total Grule type num 2044 //------------------------------------------------------------------------------------------------- 2045 INTERFACE MS_U16 MDrv_PQ_GetGRule_LevelIndex_Ex(PQ_WIN eWindow, MS_U16 u16GRuleType, MS_U16 u16GRuleLevelIndex, PQ_ENGINE_TYPE ePQEngineType); 2046 2047 //------------------------------------------------------------------------------------------------- 2048 /// To Get Grule IP index by ePQEngineType 2049 /// @param eWindow \b IN: PQ Window 2050 /// @param u16GruleType \b IN: Grule typ ID 2051 /// @param u16GRuleIPIndex \b IN: Grule ip index 2052 /// @param ePQEngineType \b IN: From PQ engine type 2053 /// @return total Grule type num 2054 //------------------------------------------------------------------------------------------------- 2055 INTERFACE MS_U16 MDrv_PQ_GetGRule_IPIndex_Ex( PQ_WIN eWindow, MS_U16 u16GRuleType, MS_U16 u16GRuleIPIndex, PQ_ENGINE_TYPE ePQEngineType); 2056 2057 //------------------------------------------------------------------------------------------------- 2058 /// To Get Grule Table Index by ePQEngineType 2059 /// @param eWindow \b IN: PQ Window 2060 /// @param u16GruleType \b IN: Grule typ ID 2061 /// @param u16PQ_NRIdx \b IN: Grule index 2062 /// @param u16GRuleIPIndex \b IN: Grule ip index 2063 /// @param ePQEngineType \b IN: From PQ engine type 2064 /// @return total Grule type num 2065 //------------------------------------------------------------------------------------------------- 2066 INTERFACE MS_U16 MDrv_PQ_GetGRule_TableIndex_Ex(PQ_WIN eWindow, MS_U16 u16GRuleType, MS_U16 u16PQ_NRIdx, MS_U16 u16GRuleIPIndex, PQ_ENGINE_TYPE ePQEngineType); 2067 2068 //------------------------------------------------------------------------------------------------- 2069 /// Up layer set any kind of setting base on enum 2070 /// @param uplayerSetting \b IN: a set of setting 2071 /// @param group \b IN: Setting Group 2072 /// @return Enable matrix success or not 2073 //------------------------------------------------------------------------------------------------- 2074 INTERFACE MS_BOOL MDrv_PQ_Up_Layer_Set_Config(MS_U16 uplayerSetting, PQ_MISC_GROUP group); 2075 2076 //------------------------------------------------------------------------------------------------- 2077 /// set gamma 2078 /// @param eWindow \b IN: PQ Window Main or sub 2079 ///@param bEnable \b IN: enable/disable 2080 /// @return NONE 2081 //------------------------------------------------------------------------------------------------- 2082 INTERFACE void MDrv_PQ_EnableScalerGamma(PQ_WIN eWindow, MS_BOOL bEnable); 2083 2084 //------------------------------------------------------------------------------ 2085 /// Set Scaler Gamma 2086 /// @param enGammType IN: Gamma Type of 10bit/12bit 2087 /// @param pu16GammTable IN: GammaR/G/B 2088 /// @param enGammaMappingMode IN: mapping 1024 to 256/1024 gamma entries 2089 /// @return None 2090 //------------------------------------------------------------------------------ 2091 INTERFACE void MDrv_PQ_SetGammaTbl(APIPNL_GAMMA_TYPE enGammType, MS_U8 **pu8GammTable, APIPNL_GAMMA_MAPPEING_MODE enGammaMappingMode); 2092 2093 INTERFACE char* MDrv_PQ_Ex_GetVersion(PQ_WIN eWindow); 2094 2095 INTERFACE MS_U32 MDrv_PQ_GetAdaptiveVersion(PQ_WIN eWindow); 2096 2097 INTERFACE void MDrv_PQ_LoadUFSCSettings(PQ_WIN eWindow); 2098 2099 INTERFACE void MDrv_PQ_LoadCFSettings(PQ_WIN eWindow); 2100 2101 //------------------------------------------------------------------------------------------------- 2102 /// Get DNR whole register 2103 /// @param eWindow \b IN: PQ Window 2104 /// @return DNR whole register 2105 //------------------------------------------------------------------------------------------------- 2106 MS_U16 MDrv_PQ_Get_DNR_Whole_Reg(PQ_WIN eWindow); 2107 2108 //------------------------------------------------------------------------------------------------- 2109 /// set P2P force to do CSC 2110 /// @param bEnable \b IN: enable or disable 2111 /// @return NONE 2112 //------------------------------------------------------------------------------------------------- 2113 void MDrv_PQ_SetP2pForceToDoCsc(MS_BOOL bEnable); 2114 2115 //------------------------------------------------------------------------------------------------- 2116 /// set soc output color format 2117 /// @param enColorFmt \b IN: color format 2118 /// @return NONE 2119 //------------------------------------------------------------------------------------------------- 2120 void MDrv_PQ_SetOutputColorFormat(PQ_COLOR_FORMAT enColorFmt); 2121 2122 //------------------------------------------------------------------------------------------------- 2123 /// Get PQ path to Distinguish 4k madi mode between non-4k madi mode 2124 /// @param E_PQ_Path_Type \b IN: pq madi type enum 2125 /// @param u16Width \b IN: width 2126 /// @param u16Height \b IN: height 2127 /// @return ePqPathType path type mode 2128 //------------------------------------------------------------------------------------------------- 2129 MS_BOOL MDrv_PQ_GetPQPathStatus(E_PQ_Path_Type ePqPathType, MS_U16 u16Width, MS_U16 u16Height); 2130 2131 //------------------------------------------------------------------------------------------------- 2132 /// Get PQ BIN path to load the PQ BIN 2133 /// @param PQ_BIN_PATH \b IN: pq bin path type enum 2134 /// @param u8size \b IN: size of the path in char 2135 /// @param b_PQBinFilePath \b IN: TBD 2136 /// @return NONE 2137 //------------------------------------------------------------------------------------------------- 2138 void MDrv_PQ_SetPQBinPath(PQ_BIN_PATH ePqBinPath,MS_U8 u8size,char* b_PQBinFilePath); 2139 2140 //------------------------------------------------------------------------------------------------- 2141 /// Load HDR Table 2142 /// @param eWindow \b IN: TBD 2143 /// @param enHdrMode \b IN: TBD 2144 //------------------------------------------------------------------------------------------------- 2145 INTERFACE void MDrv_PQ_Load_HDR_Table(PQ_WIN eWindow, PQ_HDR_MODE enHdrMode); 2146 2147 //------------------------------------------------------------------------------ 2148 /// load mwe table 2149 /// @param eType which table will be load 2150 /// @return MS_BOOL 2151 //------------------------------------------------------------------------------ 2152 INTERFACE MS_BOOL SYMBOL_WEAK MDrv_PQ_Load_MWEType_Table(MS_U8 eType); 2153 2154 //------------------------------------------------------------------------------ 2155 /// set keep color hue 2156 /// @param u8Hue hue of color 2157 /// @return MS_BOOL 2158 //------------------------------------------------------------------------------ 2159 INTERFACE MS_BOOL SYMBOL_WEAK MDrv_PQ_Load_ColorHue_Table(MS_U8 u8Hue); 2160 2161 INTERFACE void MDrv_PQ_SetFrameBuffMode(MS_BOOL bFrameBuffLess); 2162 2163 2164 #undef INTERFACE 2165 2166 #ifdef __cplusplus 2167 } 2168 #endif 2169 2170 #include "drvPQ_cus.h" 2171 2172 #endif /* _DRVPQ_H_ */ 2173