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 78 #ifndef _API_ACE_PRIV_H_ 79 #define _API_ACE_PRIV_H_ 80 81 #ifdef __cplusplus 82 extern "C" 83 { 84 #endif 85 86 #include "MsTypes.h" 87 88 typedef enum 89 { 90 E_ACE_CMD_INIT, 91 E_ACE_CMD_EXIT, 92 E_ACE_CMD_DMS, 93 E_ACE_CMD_SETPCYUV2RGB, 94 E_ACE_CMD_SELECTYUVTORGBMATRIX, 95 E_ACE_CMD_SETCOLORCORRECTIONTABLE, 96 E_ACE_CMD_SETPCSRGBTABLE, 97 E_ACE_CMD_GETCOLORMATRIX, 98 E_ACE_CMD_SETCOLORMATRIX, 99 E_ACE_CMD_SETBYPASSCOLORMATRIX, 100 E_ACE_CMD_SETIHC, 101 E_ACE_CMD_SETICC, 102 E_ACE_CMD_SETIBC, 103 E_ACE_CMD_PATCHDTGCOLORCHECKER, 104 E_ACE_CMD_GETACEINFO, 105 E_ACE_CMD_GETACEINFOEX, 106 E_ACE_CMD_PICSETCONTRAST, 107 E_ACE_CMD_PICSETBRIGHTNESS, 108 E_ACE_CMD_PICSETBRIGHTNESSPRECISE, 109 E_ACE_CMD_PICSET_PRE_Y_OFFSET, 110 E_ACE_CMD_PICGET_PRE_Y_OFFSET, 111 E_ACE_CMD_PICSETHUE, 112 E_ACE_CMD_SKIPWAITVSYNC, 113 E_ACE_CMD_PICSETSATURATION, 114 E_ACE_CMD_PICSETSHARPNESS, 115 E_ACE_CMD_PICSETCOLORTEMP, 116 E_ACE_CMD_PICSETCOLORTEMPEX, 117 E_ACE_CMD_PICSETPOSTCOLORTEMP_V02, 118 E_ACE_CMD_SETFLESHTONE, 119 E_ACE_CMD_SETBLACKADJUST, 120 E_ACE_CMD_SET_IHC_SRAM, 121 E_ACE_CMD_SET_ICC_SRAM, 122 E_ACE_CMD_ENABLEMWE, 123 E_ACE_CMD_MWESETMIRRORMODE, 124 E_ACE_CMD_MWECLONEVISUALEFFECT, 125 E_ACE_CMD_MWESETREGTABLE, 126 E_ACE_CMD_SETMWELOADFROMPQ, 127 E_ACE_CMD_MWESTATUS, 128 E_ACE_CMD_MWEHANDLE, 129 E_ACE_CMD_MWEFUNCSEL, 130 E_ACE_CMD_MWESETDISPWIN, 131 E_ACE_CMD_3DCLONEPQMAP, 132 E_ACE_CMD_DNR_BLENDING_NRTBL, 133 E_ACE_CMD_DNR_BLENDING_MISC, 134 E_ACE_CMD_DNR_BLENDING, 135 E_ACE_CMD_DNR_GET_PRECISIONSHIFT, 136 E_ACE_CMD_DNR_GETMOTION_WEIGHT, 137 E_ACE_CMD_DNR_GETLUMA_WEIGHT, 138 E_ACE_CMD_DNR_GETNOISE_WEIGHT, 139 E_ACE_CMD_DNR_GETMOTION, 140 E_ACE_CMD_DNR_INIT_MOTION, 141 E_ACE_CMD_DNR_INIT_LUMA, 142 E_ACE_CMD_DNR_INIT_NOISE, 143 E_ACE_CMD_DNR_SETPARAM, 144 E_ACE_CMD_DNR_GETPARAM, 145 E_ACE_CMD_DNR_SETNRTBL, 146 E_ACE_CMD_GETLIBVER, 147 E_ACE_CMD_GETINFO, 148 E_ACE_CMD_GETSTATUS, 149 E_ACE_CMD_SETDBGLEVEL, 150 E_ACE_CMD_COLORCORRECTIONTABLE, 151 E_ACE_CMD_SETCOLORMATRIXCONTROL, 152 E_ACE_CMD_SETRBCHANNELRANGE, 153 E_ACE_CMD_PICSETPOSTCOLORTEMP, 154 E_ACE_CMD_PICSETPOSTCOLORTEMPEX, 155 E_ACE_CMD_PICSETPOSTCOLORTEMP2, 156 E_ACE_CMD_PICSETPOSTCOLORTEMP2EX, 157 E_ACE_CMD_SET_POWERSTATE, 158 E_ACE_CMD_SET_HDR_INFO, 159 E_ACE_CMD_NUM, 160 E_ACE_CMD_MAX = E_ACE_CMD_NUM, 161 } E_ACE_IOCTL_CMDS; 162 163 typedef struct _stACE_Init 164 { 165 XC_ACE_InitData *pstXC_ACE_InitData; 166 MS_U32 u32InitDataLen; 167 MS_BOOL bReturn; 168 } stACE_Init,*pstACE_Init; 169 170 typedef struct _stACE_Exit 171 { 172 MS_BOOL bReturn; 173 } stACE_Exit,*pstACE_Exit; 174 175 typedef struct _stACE_DMS 176 { 177 MS_BOOL eWindow; 178 MS_BOOL bisATV; 179 } stACE_DMS,*pstACE_DMS; 180 181 typedef struct _stACE_SetPCYUV2RGB 182 { 183 MS_BOOL eWindow; 184 MS_BOOL bEnable; 185 } stACE_SetPCYUV2RGB,*pstACE_SetPCYUV2RGB; 186 187 typedef struct _stACE_SelectYUVtoRGBMatrix 188 { 189 MS_BOOL eWindow; 190 MS_U8 ucMatrix; 191 MS_S16* psUserYUVtoRGBMatrix; 192 } stACE_SelectYUVtoRGBMatrix,*pstACE_SelectYUVtoRGBMatrix; 193 194 typedef struct _stACE_SetColorCorrectionTable 195 { 196 MS_BOOL bScalerWin; 197 } stACE_SetColorCorrectionTable,*pstACE_SetColorCorrectionTable; 198 199 typedef struct _stACE_SetPCsRGBTable 200 { 201 MS_BOOL bScalerWin; 202 } stACE_SetPCsRGBTable,*pstACE_SetPCsRGBTable; 203 204 typedef struct _stACE_ColorMatrix 205 { 206 MS_BOOL eWindow; 207 MS_U16* pu16Matrix; 208 } stACE_ColorMatrix,*pstACE_ColorMatrix; 209 210 typedef struct _stACE_SetBypassColorMatrix 211 { 212 MS_BOOL bEnable; 213 E_XC_ACE_RESULT eResult; 214 } stACE_SetBypassColorMatrix,*pstACE_SetBypassColorMatrix; 215 216 typedef struct _stACE_SetIHC 217 { 218 MS_BOOL bScalerWin; 219 XC_ACE_IHC_COLOR_TYPE eIHC; 220 MS_U8 u8Val; 221 MS_BOOL bReturn; 222 } stACE_SetIHC,*pstACE_SetIHC; 223 224 typedef struct _stACE_SetICC 225 { 226 MS_BOOL bScalerWin; 227 XC_ACE_ICC_COLOR_TYPE eICC; 228 MS_U8 u8Val; 229 MS_BOOL bReturn; 230 } stACE_SetICC,*pstACE_SetICC; 231 232 typedef struct _stACE_SetIBC 233 { 234 MS_BOOL bScalerWin; 235 XC_ACE_IBC_COLOR_TYPE eIBC; 236 MS_U8 u8Val; 237 MS_BOOL bReturn; 238 } stACE_SetIBC,*pstACE_SetIBC; 239 240 typedef struct _stACE_PatchDTGColorChecker 241 { 242 MS_U8 u8Mode; 243 } stACE_PatchDTGColorChecker,*pstACE_PatchDTGColorChecker; 244 245 typedef struct _stACE_GetACEInfo 246 { 247 MS_BOOL bWindow; 248 E_XC_ACE_INFOTYPE eXCACEInfoType; 249 MS_U16 u16Return; 250 } stACE_GetACEInfo,*pstACE_GetACEInfo; 251 252 typedef struct _stACE_GetACEInfoEx 253 { 254 MS_BOOL bWindow; 255 XC_ACE_InfoEx *pInfoEx; 256 } stACE_GetACEInfoEx,*pstACE_GetACEInfoEx; 257 258 typedef struct _stACE_PicSetBrightness 259 { 260 MS_BOOL eWindow; 261 MS_U8 u8Brightness_R; 262 MS_U8 u8Brightness_G; 263 MS_U8 u8Brightness_B; 264 } stACE_PicSetBrightness,*pstACE_PicSetBrightness; 265 266 typedef struct _stACE_PicSetBrightnessPrecise 267 { 268 MS_BOOL eWindow; 269 MS_U16 u16Brightness_R; 270 MS_U16 u16Brightness_G; 271 MS_U16 u16Brightness_B; 272 } stACE_PicSetBrightnessPrecise,*pstACE_PicSetBrightnessPrecise; 273 274 typedef struct _stACE_PreYOffset 275 { 276 MS_BOOL eWindow; 277 MS_U8 u8PreYOffset; 278 } stACE_PreYOffset,*pstACE_PreYOffset; 279 280 typedef struct _stACE_PicSetSharpness 281 { 282 MS_BOOL eWindow; 283 MS_U8 u8Sharpness; 284 } stACE_PicSetSharpness,*pstACE_PicSetSharpness; 285 286 typedef struct _stACE_PicSetHue 287 { 288 MS_BOOL eWindow; 289 MS_BOOL bUseYUVSpace; 290 MS_U8 u8Hue; 291 } stACE_PicSetHue,*pstACE_PicSetHue; 292 293 typedef struct _stACE_PicSetContrast 294 { 295 MS_BOOL eWindow; 296 MS_BOOL bUseYUVSpace; 297 MS_U8 u8Contrast; 298 } stACE_PicSetContrast,*pstACE_PicSetContrast; 299 300 typedef struct _stACE_SkipWaitVsync 301 { 302 MS_BOOL eWindow; 303 MS_BOOL bIsSkipWaitVsyn; 304 E_XC_ACE_RESULT eResult; 305 } stACE_SkipWaitVsync,*pstACE_SkipWaitVsync; 306 307 typedef struct _stACE_PicSetSaturation 308 { 309 MS_BOOL eWindow; 310 MS_BOOL bUseYUVSpace; 311 MS_U8 u8Saturation; 312 } stACE_PicSetSaturation,*pstACE_PicSetSaturation; 313 314 typedef struct _stACE_SetFleshTone 315 { 316 MS_BOOL eWindow; 317 MS_BOOL bEn; 318 MS_U8 u8FleshTone; 319 } stACE_SetFleshTone,*pstACE_SetFleshTone; 320 321 typedef struct _stACE_SetBlackAdjust 322 { 323 MS_BOOL eWindow; 324 MS_U8 u8BlackAdjust; 325 } stACE_SetBlackAdjust,*pstACE_SetBlackAdjust; 326 327 typedef struct _stACE_PicSetColorTemp 328 { 329 MS_BOOL eWindow; 330 MS_BOOL bUseYUVSpace; 331 XC_ACE_color_temp* pstColorTemp; 332 } stACE_PicSetColorTemp,*pstACE_PicSetColorTemp; 333 334 typedef struct _stACE_PicSetColorTempEx 335 { 336 MS_BOOL eWindow; 337 MS_BOOL bUseYUVSpace; 338 XC_ACE_color_temp_ex* pstColorTemp; 339 } stACE_PicSetColorTempEx,*pstACE_PicSetColorTempEx; 340 341 typedef struct _stACE_PicSetPostColorTemp_V02 342 { 343 MS_BOOL eWindow; 344 XC_ACE_color_temp_ex2* pstColorTemp; 345 } stACE_PicSetPostColorTemp_V02,*pstACE_PicSetPostColorTemp_V02; 346 347 typedef struct _stACE_PicSetPostColorTemp 348 { 349 MS_BOOL eWindow; 350 XC_ACE_color_temp* pstColorTemp; 351 } stACE_PicSetPostColorTemp,*pstACE_PicSetPostColorTemp; 352 353 typedef struct _stACE_PicSetPostColorTempEx 354 { 355 MS_BOOL eWindow; 356 MS_BOOL bUseYUVSpace; 357 XC_ACE_color_temp_ex* pstColorTemp; 358 } stACE_PicSetPostColorTempEx,*pstACE_PicSetPostColorTempEx; 359 360 typedef struct _stACE_GetLibVer 361 { 362 const MSIF_Version **ppVersion; 363 E_XC_ACE_RESULT eResult; 364 } stACE_GetLibVer,*pstACE_GetLibVer; 365 366 typedef struct _stACE_GetInfo 367 { 368 const XC_ACE_ApiInfo* pstApiInfo; 369 } stACE_GetInfo,*pstACE_GetInfo; 370 371 typedef struct _stACE_SetDbgLevel 372 { 373 MS_U16 u16DbgSwitch; 374 MS_BOOL bReturn; 375 } stACE_SetDbgLevel,*pstACE_SetDbgLevel; 376 377 typedef struct _stACE_GetStatus 378 { 379 XC_ACE_ApiStatus *pDrvStatus; 380 MS_BOOL bWindow; 381 MS_BOOL bReturn; 382 } stACE_GetStatus,*pstACE_GetStatus; 383 384 typedef struct _stACE_MWESetMirrorMode 385 { 386 E_XC_ACE_MWE_MIRROR_TYPE eMirrorMode; 387 } stACE_MWESetMirrorMode,*pstACE_MWESetMirrorMode; 388 389 typedef struct _stACE_EnableMWE 390 { 391 MS_BOOL bEnable; 392 } stACE_EnableMWE,*pstACE_EnableMWE; 393 394 typedef struct _stACE_3DClonePQMap 395 { 396 XC_ACE_WEAVETYPE enWeaveType; 397 } stACE_3DClonePQMap,*pstACE_3DClonePQMap; 398 399 typedef struct _stACE_MWESetRegTable 400 { 401 XC_ACE_TAB_Info *pMWETable; 402 MS_BOOL bReturn; 403 } stACE_MWESetRegTable,*pstACE_MWESetRegTable; 404 405 typedef struct _stACE_SetMWELoadFromPQ 406 { 407 MS_BOOL bEnable; 408 MS_BOOL bReturn; 409 } stACE_SetMWELoadFromPQ,*pstACE_SetMWELoadFromPQ; 410 411 typedef struct _stACE_MWESetDispWin 412 { 413 MS_U16 u16MWE_Disp_Hstart; 414 MS_U16 u16MWE_Disp_Vstart; 415 MS_U16 u16MWE_Disp_Width; 416 MS_U16 u16MWE_Disp_Height; 417 } stACE_MWESetDispWin,*pstACE_MWESetDispWin; 418 419 typedef struct _stACE_MWEStatus 420 { 421 MS_BOOL bReturn; 422 } stACE_MWEStatus,*pstACE_MWEStatus; 423 424 typedef struct _stACE_MWEFuncSel 425 { 426 MS_BOOL eWindow; 427 E_XC_ACE_MWE_FUNC mwe_func; 428 } stACE_MWEFuncSel,*pstACE_MWEFuncSel; 429 430 typedef struct _stACE_Set_IHC_SRAM 431 { 432 MS_U16 *pBuf; 433 MS_U16 u16ByteSize; 434 MS_BOOL bReturn; 435 } stACE_Set_IHC_SRAM,*pstACE_Set_IHC_SRAM; 436 437 typedef struct _stACE_Set_ICC_SRAM 438 { 439 MS_U16 *pBuf; 440 MS_U16 u16ByteSize; 441 MS_BOOL bReturn; 442 } stACE_Set_ICC_SRAM,*pstACE_Set_ICC_SRAM; 443 444 typedef struct _stACE_DNR_Get_PrecisionShift 445 { 446 MS_U16 u16Return; 447 } stACE_DNR_Get_PrecisionShift,*pstACE_DNR_Get_PrecisionShift; 448 449 typedef struct _stACE_DNR_Blending_NRTbl 450 { 451 MS_U8 *pu8NewNR; 452 MS_U8 u8Weight; 453 MS_U8 u8Step; 454 MS_U16 *pu16PreY0; 455 MS_U16 *pu16PreY1; 456 MS_U8 *pu8NRTBL; 457 } stACE_DNR_Blending_NRTbl,*pstACE_DNR_Blending_NRTbl; 458 459 typedef struct _stACE_DNR_Blending 460 { 461 MS_U8 u8NewItem; 462 MS_U16 u16PreItem; 463 MS_U8 u8Weight; 464 MS_U8 u8Return; 465 } stACE_DNR_Blending,*pstACE_DNR_Blending; 466 467 typedef struct _stACE_DNR_Blending_MISC 468 { 469 MS_U8 u8NewItem; 470 MS_U16 u16PreItem; 471 MS_U8 u8Weight; 472 MS_U8 u8Step; 473 MS_U16 u16Return; 474 } stACE_DNR_Blending_MISC,*pstACE_DNR_Blending_MISC; 475 476 typedef struct _stACE_DNR_GetMotion 477 { 478 MS_U8 u8Return; 479 } stACE_DNR_GetMotion,*pstACE_DNR_GetMotion; 480 481 typedef struct _stACE_DNR_GetMotion_Weight 482 { 483 MS_U8 u8CurMotion; 484 MS_U8 u8PreMotion; 485 MS_U8 u8CurMotionLvl; 486 MS_U8 u8PreMotionLvl; 487 MS_U8 u8DeFlick_Thre; 488 MS_U8 u8DeFilick_Step; 489 MS_U8 u8Return; 490 } stACE_DNR_GetMotion_Weight,*pstACE_DNR_GetMotion_Weight; 491 492 typedef struct _stACE_DNR_DNR_GetNoise_Weight 493 { 494 MS_U8 u8CurNoise; 495 MS_U8 u8PreNoise; 496 MS_U8 u8Range; 497 MS_U8 u8DeFlick_Th; 498 MS_U8 u8DeFlick_Step; 499 MS_U8 u8Return; 500 } stACE_DNR_GetNoise_Weight,*pstACE_DNR_GetNoise_Weight; 501 502 typedef struct _stACE_DNR_GetLuma_Weight 503 { 504 MS_U8 u8CurAvgLuma; 505 MS_U8 u8PreAvgLuam; 506 MS_U8 u8CurLumaLvl; 507 MS_U8 u8PreLumaLvl; 508 MS_U8 u8DeFlick_Th; 509 MS_U8 u8DeFlick_Step; 510 MS_U8 u8Return; 511 } stACE_DNR_GetLuma_Weight,*pstACE_DNR_GetLuma_Weight; 512 513 typedef struct _stACE_DNR_GetParam 514 { 515 MS_BOOL eWindow; 516 XC_ACE_DNR_Param eParam; 517 MS_U8 u8Return; 518 } stACE_DNR_GetParam,*pstACE_DNR_GetParam; 519 520 typedef struct _stACE_DNR_SetParam 521 { 522 MS_BOOL eWindow; 523 XC_ACE_DNR_Param eParam; 524 MS_U16 u16val; 525 } stACE_DNR_SetParam,*pstACE_DNR_SetParam; 526 527 typedef struct _stACE_DNR_SetNRTbl 528 { 529 MS_U8 *pu8Tbl; 530 } stACE_DNR_SetNRTbl,*pstACE_DNR_SetNRTbl; 531 532 typedef struct _stACE_ColorCorrectionTable 533 { 534 MS_BOOL bScalerWin; 535 MS_S16 *psColorCorrectionTable; 536 } stACE_ColorCorrectionTable,*pstACE_ColorCorrectionTable; 537 538 typedef struct _stACE_SetRBChannelRange 539 { 540 MS_BOOL bScalerWin; 541 MS_BOOL bRange; 542 } stACE_SetRBChannelRange,*pstACE_SetRBChannelRange; 543 544 typedef struct _stACE_SetColorMatrixControl 545 { 546 MS_BOOL bScalerWin; 547 MS_BOOL bEnable; 548 } stACE_SetColorMatrixControl,*pstACE_SetColorMatrixControl; 549 550 typedef struct _stACE_SetColorMatrix 551 { 552 MS_BOOL eWindow; 553 MS_U16* pu16Matrix; 554 } stACE_SetColorMatrix,*pstACE_SetColorMatrix; 555 556 typedef struct _stACE_Set_PowerState 557 { 558 EN_POWER_MODE enPowerState; 559 MS_U32 u32Return; 560 } stACE_Set_PowerState,*pstACE_Set_PowerState; 561 562 typedef struct _stACE_SetHDRInitData 563 { 564 XC_ACE_HDRinit *pstHDRInitData; 565 MS_BOOL bReturn; 566 } stACE_SetHDRInitData, *pstACE_HDRInitData; 567 568 #ifdef __cplusplus 569 } 570 #endif 571 572 #undef _API_ACE_PRIV_H_ 573 #endif //_API_ACE_PRIV_H_ 574