xref: /utopia/UTPA2-700.0.x/mxlib/include/apiXC_Ace_EX.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 //<MStar Software>
2 //******************************************************************************
3 // MStar Software
4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5 // All software, firmware and related documentation herein ("MStar Software") are
6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7 // law, including, but not limited to, copyright law and international treaties.
8 // Any use, modification, reproduction, retransmission, or republication of all
9 // or part of MStar Software is expressly prohibited, unless prior written
10 // permission has been granted by MStar.
11 //
12 // By accessing, browsing and/or using MStar Software, you acknowledge that you
13 // have read, understood, and agree, to be bound by below terms ("Terms") and to
14 // comply with all applicable laws and regulations:
15 //
16 // 1. MStar shall retain any and all right, ownership and interest to MStar
17 //    Software and any modification/derivatives thereof.
18 //    No right, ownership, or interest to MStar Software and any
19 //    modification/derivatives thereof is transferred to you under Terms.
20 //
21 // 2. You understand that MStar Software might include, incorporate or be
22 //    supplied together with third party`s software and the use of MStar
23 //    Software may require additional licenses from third parties.
24 //    Therefore, you hereby agree it is your sole responsibility to separately
25 //    obtain any and all third party right and license necessary for your use of
26 //    such third party`s software.
27 //
28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29 //    MStar`s confidential information and you agree to keep MStar`s
30 //    confidential information in strictest confidence and not disclose to any
31 //    third party.
32 //
33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34 //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35 //    without limitation, any warranties of merchantability, non-infringement of
36 //    intellectual property rights, fitness for a particular purpose, error free
37 //    and in conformity with any international standard.  You agree to waive any
38 //    claim against MStar for any loss, damage, cost or expense that you may
39 //    incur related to your use of MStar Software.
40 //    In no event shall MStar be liable for any direct, indirect, incidental or
41 //    consequential damages, including without limitation, lost of profit or
42 //    revenues, lost or damage of data, and unauthorized system use.
43 //    You agree that this Section 4 shall still apply without being affected
44 //    even if MStar Software has been modified by MStar in accordance with your
45 //    request or instruction for your use, except otherwise agreed by both
46 //    parties in writing.
47 //
48 // 5. If requested, MStar may from time to time provide technical supports or
49 //    services in relation with MStar Software to you for your use of
50 //    MStar Software in conjunction with your or your customer`s product
51 //    ("Services").
52 //    You understand and agree that, except otherwise agreed by both parties in
53 //    writing, Services are provided on an "AS IS" basis and the warranty
54 //    disclaimer set forth in Section 4 above shall apply.
55 //
56 // 6. Nothing contained herein shall be construed as by implication, estoppels
57 //    or otherwise:
58 //    (a) conferring any license or right to use MStar name, trademark, service
59 //        mark, symbol or any other identification;
60 //    (b) obligating MStar or any of its affiliates to furnish any person,
61 //        including without limitation, you and your customers, any assistance
62 //        of any kind whatsoever, or any information; or
63 //    (c) conferring any license or right under any intellectual property right.
64 //
65 // 7. These terms shall be governed by and construed in accordance with the laws
66 //    of Taiwan, R.O.C., excluding its conflict of law rules.
67 //    Any and all dispute arising out hereof or related hereto shall be finally
68 //    settled by arbitration referred to the Chinese Arbitration Association,
69 //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70 //    Rules of the Association by three (3) arbitrators appointed in accordance
71 //    with the said Rules.
72 //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73 //    be English.
74 //    The arbitration award shall be final and binding to both parties.
75 //
76 //******************************************************************************
77 //<MStar Software>
78 ////////////////////////////////////////////////////////////////////////////////
79 //
80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
81 // All rights reserved.
82 //
83 // Unless otherwise stipulated in writing, any and all information contained
84 // herein regardless in any format shall remain the sole proprietary of
85 // MStar Semiconductor Inc. and be kept in strict confidence
86 // ("MStar Confidential Information") by the recipient.
87 // Any unauthorized act including without limitation unauthorized disclosure,
88 // copying, use, reproduction, sale, distribution, modification, disassembling,
89 // reverse engineering and compiling of the contents of MStar Confidential
90 // Information is unlawful and strictly prohibited. MStar hereby reserves the
91 // rights to any and all damages, losses, costs and expenses resulting therefrom.
92 //
93 ////////////////////////////////////////////////////////////////////////////////
94 
95 ///////////////////////////////////////////////////////////////////////////////////////////////////
96 ///
97 /// @file   apiXC_ACE_EX.h
98 /// @brief  ACE EXTENSION API layer Interface FOR DUAL STREAMS
99 /// @author MStar Semiconductor Inc.
100 /// CL 227231+:In box case, there is no need to do YUV2RGB transform.
101 ///////////////////////////////////////////////////////////////////////////////////////////////////
102 
103 #ifndef _API_XC_ACE_EX_H_
104 #define _API_XC_ACE_EX_H_
105 
106 // Common Definition
107 #include "MsDevice.h"
108 #include "MsCommon.h"
109 #include "MsVersion.h"
110 
111 #ifdef __cplusplus
112 extern "C"
113 {
114 #endif
115 
116 //-------------------------------------------------------------------------------------------------
117 //  Macro and Define
118 //-------------------------------------------------------------------------------------------------
119 
120 //-------------------------------------------------------------------------------------------------
121 //  Type and Structure
122 //-------------------------------------------------------------------------------------------------
123 #define MSIF_ACE_EX_LIB_CODE               {'A','E','X','_'}
124 #define MSIF_ACE_EX_LIBVER                 {'0','0'}
125 #define MSIF_ACE_EX_BUILDNUM               {'5','9'}
126 #define MSIF_ACE_EX_CHANGELIST             {'0','0','6','2','1','0','5','3'}
127 #define XC_ACE_EX_API_VERSION              /* Character String for DRV/API version             */  \
128     MSIF_TAG,                           /* 'MSIF'                                           */  \
129     MSIF_CLASS,                         /* '00'                                             */  \
130     MSIF_CUS,                           /* 0x0000                                           */  \
131     MSIF_MOD,                           /* 0x0000                                           */  \
132     MSIF_CHIP,                                                                                  \
133     MSIF_CPU,                                                                                   \
134     MSIF_ACE_EX_LIB_CODE,                  /* IP__                                             */  \
135     MSIF_ACE_EX_LIBVER,                    /* 0.0 ~ Z.Z                                        */  \
136     MSIF_ACE_EX_BUILDNUM,                  /* 00 ~ 99                                          */  \
137     MSIF_ACE_EX_CHANGELIST,                /* CL#                                              */  \
138     MSIF_OS
139 
140 /// Define XC ACE device number
141 typedef enum
142 {
143     XC_ACE_EX_DEVICE0 = 0,
144     XC_ACE_EX_DEVICE1,
145     XC_ACE_EX_MAX_DEVICE_NUM
146 } XC_ACE_EX_DEVICE_NUM;
147 
148 /*!
149    The color information setting.
150 */
151 typedef enum
152 {
153     /// Version
154     E_XC_ACE_EX_INFO_TYPE_VERSION,
155     /// Contrast
156     E_XC_ACE_EX_INFO_TYPE_CONTRAST,
157     /// R Gain
158     E_XC_ACE_EX_INFO_TYPE_R_GAIN,
159     /// G Gain
160     E_XC_ACE_EX_INFO_TYPE_G_GAIN,
161     /// B Gain
162     E_XC_ACE_EX_INFO_TYPE_B_GAIN,
163     /// Saturation
164     E_XC_ACE_EX_INFO_TYPE_SATURATION,
165     /// Hue
166     E_XC_ACE_EX_INFO_TYPE_HUE,
167     /// Color correction XY R
168     E_XC_ACE_EX_INFO_TYPE_COLOR_CORRECTION_XY_R,
169     /// Color correction XY G
170     E_XC_ACE_EX_INFO_TYPE_COLOR_CORRECTION_XY_G,
171     /// Color correction XY B
172     E_XC_ACE_EX_INFO_TYPE_COLOR_CORRECTION_XY_B,
173     /// Color correction Offset R
174     E_XC_ACE_EX_INFO_TYPE_COLOR_CORRECTION_OFFSET_R,
175     /// Color correction Offset G
176     E_XC_ACE_EX_INFO_TYPE_COLOR_CORRECTION_OFFSET_G,
177     /// Color correction Offset B
178     E_XC_ACE_EX_INFO_TYPE_COLOR_CORRECTION_OFFSET_B,
179     /// R Brightness
180     E_XC_ACE_EX_INFO_TYPE_BRIGHTNESS_R,
181     /// G Brightness
182     E_XC_ACE_EX_INFO_TYPE_BRIGHTNESS_G,
183     /// B Brightness
184     E_XC_ACE_EX_INFO_TYPE_BRIGHTNESS_B,
185 
186     /// Dummy
187     E_XC_ACE_EX_INFO_TYPE_DUMMY
188 } E_XC_ACE_EX_INFOTYPE;
189 
190 /*!
191     The convert method of YUV to RGB
192 */
193 typedef enum
194 {
195     /// YUV to RGB matrix - Use Std CSCM for SDTV
196     E_XC_ACE_EX_YUV_TO_RGB_MATRIX_SDTV,
197     /// YUV to RGB matrix - Use Std CSCM for HDTV
198     E_XC_ACE_EX_YUV_TO_RGB_MATRIX_HDTV,
199     /// Use user define CSCM, specified by tUserYVUtoRGBMatrix
200     E_XC_ACE_EX_YUV_TO_RGB_MATRIX_USER,
201 } E_XC_ACE_EX_YUVTORGBTYPE;
202 
203 /*!
204    The Effect Settings of Multi Window
205 */
206 typedef enum
207 {
208     /// off
209     E_XC_ACE_EX_MWE_MODE_OFF,
210     /// H split, reference window at right side,default
211     E_XC_ACE_EX_MWE_MODE_H_SPLIT,
212     /// Move
213     E_XC_ACE_EX_MWE_MODE_MOVE,
214     /// Zoom
215     E_XC_ACE_EX_MWE_MODE_ZOOM,
216     /// H Scan
217     E_XC_ACE_EX_MWE_MODE_H_SCAN,
218     /// H split, reference window at left side
219     E_XC_ACE_EX_MWE_MODE_H_SPLIT_LEFT,
220     /// The number of Scaler ACE MWE functoin
221     E_XC_ACE_EX_MWE_MODE_NUMS,
222 } E_XC_ACE_EX_MWE_FUNC;
223 
224 /*!
225    The Result of XC_ACE function call.
226 */
227 typedef enum
228 {
229     /// fail
230     E_XC_ACE_EX_FAIL = 0,
231     /// ok
232     E_XC_ACE_EX_OK = 1,
233     /// get base address failed when initialize panel driver
234     E_XC_ACE_EX_GET_BASEADDR_FAIL,
235     /// obtain mutex timeout when calling this function
236     E_XC_ACE_EX_OBTAIN_MUTEX_FAIL,
237 } E_XC_ACE_EX_RESULT;
238 
239 
240 typedef enum
241 {
242     E_XC_ACE_EX_MWE_MIRROR_NORMAL,
243     E_XC_ACE_EX_MWE_MIRROR_H_ONLY,
244     E_XC_ACE_EX_MWE_MIRROR_V_ONLY,
245     E_XC_ACE_EX_MWE_MIRROR_HV,
246     E_XC_ACE_EX_MWE_MIRROR_MAX,
247 }E_XC_ACE_EX_MWE_MIRROR_TYPE;
248 
249 /*!
250    obosolte!! use XC_ACE_EX_color_temp_ex2 instead
251 */
252 typedef struct DLL_PACKED
253 {
254     /// red color offset
255     MS_U8 cRedOffset;
256     /// green color offset
257     MS_U8 cGreenOffset;
258     /// blue color offset
259     MS_U8 cBlueOffset;
260 
261     /// red color
262     MS_U8 cRedColor;
263     /// green color
264     MS_U8 cGreenColor;
265     /// blue color
266     MS_U8 cBlueColor;
267 
268     /// scale 100 value of red color
269     MS_U8 cRedScaleValue;
270     /// scale 100 value of green color
271     MS_U8 cGreenScaleValue;
272     /// scale 100 value of blue color
273     MS_U8 cBlueScaleValue;
274 } XC_ACE_EX_color_temp;
275 
276 /*!
277    obosolte!! use XC_ACE_EX_color_temp_ex2 instead
278 */
279 typedef struct DLL_PACKED
280 {
281     /// red color offset
282     MS_U16 cRedOffset;
283     /// green color offset
284     MS_U16 cGreenOffset;
285     /// blue color offset
286     MS_U16 cBlueOffset;
287 
288     /// red color
289     MS_U8 cRedColor;
290     /// green color
291     MS_U8 cGreenColor;
292     /// blue color
293     MS_U8 cBlueColor;
294 
295     /// scale 100 value of red color
296     MS_U8 cRedScaleValue;
297     /// scale 100 value of green color
298     MS_U8 cGreenScaleValue;
299     /// scale 100 value of blue color
300     MS_U8 cBlueScaleValue;
301 } XC_ACE_EX_color_temp_ex;
302 
303 /*!
304    The color temp settings ex2.
305 */
306 typedef struct DLL_PACKED
307 {
308     /// red color offset
309     MS_U16 cRedOffset;
310     /// green color offset
311     MS_U16 cGreenOffset;
312     /// blue color offset
313     MS_U16 cBlueOffset;
314 
315     /// red color
316     MS_U16 cRedColor;
317     /// green color
318     MS_U16 cGreenColor;
319     /// blue color
320     MS_U16 cBlueColor;
321 
322     /// scale 100 value of red color
323     MS_U16 cRedScaleValue;
324     /// scale 100 value of green color
325     MS_U16 cGreenScaleValue;
326     /// scale 100 value of blue color
327     MS_U16 cBlueScaleValue;
328 } XC_ACE_EX_color_temp_ex2;
329 
330 //----------------------------
331 // XC ACE initialize
332 //----------------------------
333 /*!
334    The ACE initialze DATA.
335 */
336 /// Define XC device ID
337 typedef struct
338 {
339     MS_U32 u32Version;
340     MS_U32 u32Id;
341 }XC_ACE_DeviceId;
342 
343 typedef struct __attribute__((packed))
344 {
345     MS_BOOL    eWindow;                  ///< initial eWindow
346 
347     MS_S16*    S16ColorCorrectionMatrix; ///< initial Color Correction Matrix
348 #if !defined (__aarch64__)
349     MS_U32 u32AlignmentDummy0;
350 #endif
351     MS_S16*    S16RGB;                   ///< initial RGB
352 #if !defined (__aarch64__)
353     MS_U32 u32AlignmentDummy1;
354 #endif
355     MS_U16     u16MWEHstart;             ///< initial Horizontal start
356 
357 
358     MS_U16     u16MWEVstart;             ///< initial Vertical start
359 
360     MS_U16     u16MWEWidth;              ///< initial MWE Width
361 
362     MS_U16     u16MWEHeight;             ///< initial MWE Height
363 
364     MS_U16     u16MWE_Disp_Hstart;       ///< initial MWE Display Horizontal start
365 
366     MS_U16     u16MWE_Disp_Vstart;       ///< initial MWE Display Vertical start
367 
368     MS_U16     u16MWE_Disp_Width;        ///< initial MWE Display width
369 
370     MS_U16     u16MWE_Disp_Height;       ///< initial MWE Display height
371 
372     MS_BOOL    bMWE_Enable;              ///< Enable or not
373 } XC_ACE_EX_InitData;
374 
375 /*!
376    The XC_ACE library infomation.
377 */
378 typedef struct
379 {
380 
381 } XC_ACE_EX_ApiInfo;
382 
383 /*!
384    The XC_ACE status infomation.
385 */
386 typedef struct DLL_PACKED
387 {
388     /// Scaler ACE API status
389     XC_ACE_EX_InitData ACEinit;
390 } XC_ACE_EX_ApiStatus;
391 
392 
393 /*!
394    The XC_ACE DNR parameters settings.
395 */
396 typedef enum
397 {
398     /// NR ONOFF
399     E_ACE_EX_DNR_NR_ONOFF,
400     /// SNR
401     E_ACE_EX_DNR_SNR,
402     /// Spike NR 0
403     E_ACE_EX_DNR_SPIKE_NR_0,
404     /// Spike NR 1
405     E_ACE_EX_DNR_SPIKE_NR_1,
406     /// Gray ground gain
407     E_ACE_EX_DNR_GRAY_GROUND_GAIN,
408     /// Gray ground EN
409     E_ACE_EX_DNR_GRAY_GROUND_EN,
410     /// Peaking bank coring
411     E_ACE_EX_DNR_PEAKING_BANK_CORING,
412     /// Guassin SNR threshold
413     E_ACE_EX_DNR_GUASSIN_SNR_THRESHOLD,
414     /// Motion
415     E_ACE_EX_DNR_MOTION,
416     /// Peaking coring threshold
417     E_ACE_EX_DNR_PEAKING_CORING_THRESHOLD,
418     /// Sharpness adjust
419     E_ACE_EX_DNR_SHARPNESS_ADJUST,
420     /// NM V
421     E_ACE_EX_DNR_NM_V,
422     /// GNR 0
423     E_ACE_EX_DNR_GNR_0,
424     /// GNR 1
425     E_ACE_EX_DNR_GNR_1,
426     /// CP
427     E_ACE_EX_DNR_CP,
428     /// DP
429     E_ACE_EX_DNR_DP,
430     /// NM H 0
431     E_ACE_EX_DNR_NM_H_0,
432     /// HM H 1
433     E_ACE_EX_DNR_NM_H_1,
434     /// SC coring
435     E_ACE_EX_DNR_SC_CORING,
436     /// NM
437     E_ACE_EX_DNR_SNR_NM,
438 }XC_ACE_EX_DNR_Param;
439 
440 typedef enum
441 {
442     E_ACE_EX_IHC_COLOR_R,
443     E_ACE_EX_IHC_COLOR_G,
444     E_ACE_EX_IHC_COLOR_B,
445     E_ACE_EX_IHC_COLOR_C,
446     E_ACE_EX_IHC_COLOR_M,
447     E_ACE_EX_IHC_COLOR_Y,
448     E_ACE_EX_IHC_COLOR_F,
449     E_ACE_EX_IHC_COLOR_MAX,
450 }XC_ACE_EX_IHC_COLOR_TYPE;
451 
452 #define ACE_EX_INFOEX_MODE_POST_RGB_GAIN           0x1
453 #define ACE_EX_INFOEX_MODE_POST_RGB_OFFSET         0x2
454 typedef struct
455 {
456     MS_U32 u32Mode;
457     MS_U32 u32Reserved;
458 }XC_ACE_EX_InfoEx;
459 
460 //--------------------------------------------------------------------------------------------------
461 // MWE Load Visual Effect Table related
462 //--------------------------------------------------------------------------------------------------
463 #define ACE_EX_TABINFO_VERSION                0
464 
465 #define ACE_EX_TABINFO_REG_ADDR_SIZE          (2)
466 #define ACE_EX_TABINFO_REG_MASK_SIZE          (1)
467 #define ACE_EX_TABINFO_REG_DATA_SIZE          (2)
468 
469 typedef struct
470 {
471     MS_U8 *pTable;
472     MS_U8 u8TabCols;
473     MS_U8 u8TabRows;
474     MS_U8 u8TabIdx;
475     MS_U32 u32ACE_TabInfo_version; //Version of current structure, including the content of pTable
476 }XC_ACE_EX_TAB_Info;
477 //--------------------------------------------------------------------------------------------------
478 
479 //------------------------------
480 // Weave Type: used for 3D
481 //------------------------------
482 typedef enum
483 {
484     E_ACE_EX_WEAVETYPE_NONE        = 0x00,
485     E_ACE_EX_WEAVETYPE_H          = 0x01,
486     E_ACE_EX_WEAVETYPE_V          = 0x02,
487     E_ACE_EX_WEAVETYPE_DUALVIEW    = 0x04,
488     E_ACE_EX_WEAVETYPE_NUM,
489 }XC_ACE_EX_WEAVETYPE;
490 
491 //-------------------------------------------------------------------------------------------------
492 //  Function and Variable
493 //-------------------------------------------------------------------------------------------------
494 #define XC_ACE_EX_BYPASS_COLOR_GAIN  128 //necessary for HW color tempture adjustment,
495                                       //used after T2, i.e: T3/T4/T7/T8/Janus..
496 
497 /********************************************************************************/
498 /*                   msAPI_ACE.c                   */
499 /********************************************************************************/
500 
501 //-------------------------------------------------------------------------------------------------
502 /// ACE Initiation
503 /// @param  pstXC_ACE_InitData                  \b IN: @ref XC_ACE_EX_InitData
504 /// @param  u32InitDataLen                      \b IN: The Length of pstXC_ACE_InitData.
505 /// @return @ref MS_BOOL
506 //-------------------------------------------------------------------------------------------------
507 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_Init(XC_ACE_DeviceId *pDeviceId, XC_ACE_EX_InitData *pstXC_ACE_InitData, MS_U32 u32InitDataLen);
508 
509 
510 //-------------------------------------------------------------------------------------------------
511 /// ACE Exit
512 /// @return @ref MS_BOOL
513 //-------------------------------------------------------------------------------------------------
514 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_Exit(XC_ACE_DeviceId *pDeviceId);
515 
516 //-------------------------------------------------------------------------------------------------
517 /// ACE DMS
518 /// @param  eWindow                 \b IN: Indicates the window where the ACE function applies to.
519 /// @param  bisATV                  \b IN: Whether the active input source is or not ATV.
520 //-------------------------------------------------------------------------------------------------
521 DLL_PUBLIC void    MApi_XC_ACE_EX_DMS(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bisATV);
522 
523 //-------------------------------------------------------------------------------------------------
524 /// Set PC YUV to RGB
525 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
526 /// @param  bEnable                  \b IN: Enable or Disalbe the function.
527 //-------------------------------------------------------------------------------------------------
528 DLL_PUBLIC void    MApi_XC_ACE_EX_SetPCYUV2RGB(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bEnable);
529 
530 //-------------------------------------------------------------------------------------------------
531 /// Select YUV to RGB Matrix, if the ucMatrix type is ACE_YUV_TO_RGB_MATRIX_USER, then apply the
532 /// psUserYUVtoRGBMatrix supplied by user.
533 // @param  eWindow                       \b IN: Indicates the window where the ACE function applies to.
534 // @param  ucMatrix                      \b IN: @ref E_ACE_YUVTORGBInfoType.
535 // @param  psUserYUVtoRGBMatrix          \b IN: User-Defined color transformed matrix.
536 //-------------------------------------------------------------------------------------------------
537 DLL_PUBLIC void    MApi_XC_ACE_EX_SelectYUVtoRGBMatrix(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_U8 ucMatrix, MS_S16* psUserYUVtoRGBMatrix);
538 
539 //-------------------------------------------------------------------------------------------------
540 /// Set color correction table
541 /// @param  bScalerWin                      \b IN: Indicates the window where the ACE function
542 ///                                                 applies to, 0: Main Window, 1: Sub Window.
543 //-------------------------------------------------------------------------------------------------
544 DLL_PUBLIC void    MApi_XC_ACE_EX_SetColorCorrectionTable( XC_ACE_DeviceId *pDeviceId, MS_BOOL bScalerWin);
545 
546 //-------------------------------------------------------------------------------------------------
547 /// Set PCs RGB table
548 /// @param  bScalerWin                      \b IN: Indicates the window where the ACE function
549 ///                                                 applies to, 0: Main Window, 1: Sub Window.
550 //-------------------------------------------------------------------------------------------------
551 DLL_PUBLIC void    MApi_XC_ACE_EX_SetPCsRGBTable( XC_ACE_DeviceId *pDeviceId, MS_BOOL bScalerWin);
552 
553 //-------------------------------------------------------------------------------------------------
554 /// Get color matrix
555 /// @param  eWindow                      \b IN: Indicates the window where the ACE function applies to.
556 /// @param  pu16Matrix                   \b OUT: a MS_U16 matrix represents current color matrix
557 //-------------------------------------------------------------------------------------------------
558 DLL_PUBLIC void    MApi_XC_ACE_EX_GetColorMatrix( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_U16* pu16Matrix);
559 
560 //-------------------------------------------------------------------------------------------------
561 /// Set color matrix
562 /// @param  eWindow                      \b IN: Indicates the window where the ACE function applies to.
563 /// @param  pu16Matrix                   \b IN: The Matrix given to set the color transformation.
564 //-------------------------------------------------------------------------------------------------
565 DLL_PUBLIC void    MApi_XC_ACE_EX_SetColorMatrix( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_U16* pu16Matrix);
566 
567 //-------------------------------------------------------------------------------------------------
568 /// Set Bypass Color Matrix
569 /// @param bEnable      \b IN:  Enable : Bypass Set Color Matrix
570 /// @return @ref E_XC_ACE_EX_RESULT
571 //-------------------------------------------------------------------------------------------------
572 DLL_PUBLIC E_XC_ACE_EX_RESULT MApi_XC_ACE_EX_SetBypassColorMatrix(XC_ACE_DeviceId *pDeviceId, MS_BOOL bEnable );
573 
574 //-------------------------------------------------------------------------------------------------
575 /// Set IHC value
576 /// @param  bScalerWin                   \b IN: Indicates the window where the ACE function applies to.
577 /// @param  eIHC                         \b IN: Indicates the color to be set.
578 /// @param  u8Val                        \b IN: The value set to the color(0 ~ 127).
579 //-------------------------------------------------------------------------------------------------
580 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_SetIHC(XC_ACE_DeviceId *pDeviceId, MS_BOOL bScalerWin, XC_ACE_EX_IHC_COLOR_TYPE eIHC, MS_U8 u8Val);
581 
582 //-------------------------------------------------------------------------------------------------
583 /// Patch DTG color checker
584 // @param  u8Mode                       \b IN: TBD
585 //-------------------------------------------------------------------------------------------------
586 DLL_PUBLIC void    MApi_XC_ACE_EX_PatchDTGColorChecker( XC_ACE_DeviceId *pDeviceId, MS_U8 u8Mode);
587 
588 //-------------------------------------------------------------------------------------------------
589 /// Get ACE information
590 /// @param  bWindow                      \b IN: Indicates the window where the ACE function
591 ///                                              applies to, 0: Main Window, 1: Sub Window.
592 /// @param  eXCACEInfoType                \b IN: Specify the information type users interested in.
593 /// @retval The information returned.
594 //-------------------------------------------------------------------------------------------------
595 DLL_PUBLIC MS_U16  MApi_XC_ACE_EX_GetACEInfo( XC_ACE_DeviceId *pDeviceId, MS_BOOL bWindow, E_XC_ACE_EX_INFOTYPE eXCACEInfoType );
596 
597 //-------------------------------------------------------------------------------------------------
598 /// Get ACE extra information
599 /// @param  bWindow                      \b IN: Indicates the window where the ACE function
600 ///                                              applies to, 0: Main Window, 1: Sub Window.
601 /// @param  XC_ACE_EX_InfoEx                \b OUT: Specify the extra information returned by driver.
602 //-------------------------------------------------------------------------------------------------
603 DLL_PUBLIC void MApi_XC_ACE_EX_GetACEInfoEx( XC_ACE_DeviceId *pDeviceId, MS_BOOL bWindow, XC_ACE_EX_InfoEx *pInfoEx);
604 
605 /********************************************************************************/
606 /*                   msAPI_ACE_Ext.c                   */
607 /********************************************************************************/
608 //-------------------------------------------------------------------------------------------------
609 /// Picture set contrast
610 /// @param  eWindow                       \b IN: Indicates the window where the ACE function applies to.
611 /// @param  bUseYUVSpace                  \b IN: Use YUV format or RGB format.
612 /// @param  u8Contrast                    \b IN: Contrase value given by user.
613 //-------------------------------------------------------------------------------------------------
614 DLL_PUBLIC void    MApi_XC_ACE_EX_PicSetContrast( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bUseYUVSpace, MS_U8 u8Contrast);
615 
616 //-------------------------------------------------------------------------------------------------
617 /// Picture set brightness
618 /// @param  u8Brightness_R                    \b IN: R value given by user.
619 /// @param  u8Brightness_G                    \b IN: G value given by user.
620 /// @param  u8Brightness_B                    \b IN: B value given by user.
621 //-------------------------------------------------------------------------------------------------
622 DLL_PUBLIC void    MApi_XC_ACE_EX_PicSetBrightness( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_U8 u8Brightness_R, MS_U8 u8Brightness_G, MS_U8 u8Brightness_B);
623 
624 //-------------------------------------------------------------------------------------------------
625 /// Picture set precise brightness
626 /// @param  u16Brightness_R                    \b IN: R value given by user.
627 /// @param  u16Brightness_G                    \b IN: G value given by user.
628 /// @param  u16Brightness_B                    \b IN: B value given by user.
629 //-------------------------------------------------------------------------------------------------
630 DLL_PUBLIC void MApi_XC_ACE_EX_PicSetBrightnessPrecise(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_U16 u16Brightness_R, MS_U16 u16Brightness_G, MS_U16 u16Brightness_B);
631 
632 //-------------------------------------------------------------------------------------------------
633 ///-This function will set Pre Y Offset
634 ///@param eWindow        \b IN: Window type
635 ///@param u8PreYOffset \b IN: Pre Y Offset value
636 //-------------------------------------------------------------------------------------------------
637 DLL_PUBLIC E_XC_ACE_EX_RESULT MApi_XC_ACE_EX_PicSetPreYOffset(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_U8 u8PreYOffset);
638 
639 //-------------------------------------------------------------------------------------------------
640 ///-This function will get Pre Y Offset
641 ///@param eWindow        \b IN: Window type
642 ///@param pu8PreYOffset \b OUT: Pre Y Offset value
643 //-------------------------------------------------------------------------------------------------
644 DLL_PUBLIC MS_U8 MApi_XC_ACE_EX_PicGetPreYOffset(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow);
645 
646 //-------------------------------------------------------------------------------------------------
647 /// Picture set Hue
648 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
649 /// @param  bUseYUVSpace             \b IN: Use YUV format or RGB format.
650 /// @param  u8Hue                    \b IN: Hue value given by user.
651 //-------------------------------------------------------------------------------------------------
652 DLL_PUBLIC void    MApi_XC_ACE_EX_PicSetHue( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bUseYUVSpace, MS_U8 u8Hue );
653 
654 //-------------------------------------------------------------------------------------------------
655 /// Skip Wait Vsync
656 /// @param eWindow               \b IN: Enable
657 /// @param Skip wait Vsync      \b IN: Disable wait Vsync
658 //-------------------------------------------------------------------------------------------------
659 DLL_PUBLIC E_XC_ACE_EX_RESULT MApi_XC_ACE_EX_SkipWaitVsync( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow,MS_BOOL bIsSkipWaitVsyn);
660 
661 //-------------------------------------------------------------------------------------------------
662 /// Picture set Saturation
663 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
664 /// @param  bUseYUVSpace             \b IN: Use YUV format or RGB format.
665 /// @param  u8Saturation             \b IN: Saturation value given by user.
666 //-------------------------------------------------------------------------------------------------
667 DLL_PUBLIC void    MApi_XC_ACE_EX_PicSetSaturation(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bUseYUVSpace, MS_U8 u8Saturation );
668 
669 //-------------------------------------------------------------------------------------------------
670 ///-Adjust sharpness
671 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
672 /// @param u8Sharpness                \b IN: sharpness value
673 ///- 0 -0x3f
674 //-------------------------------------------------------------------------------------------------
675 DLL_PUBLIC void    MApi_XC_ACE_EX_PicSetSharpness( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_U8 u8Sharpness );
676 
677 //-------------------------------------------------------------------------------------------------
678 /// Picture set color temp.
679 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
680 /// @param  bUseYUVSpace             \b IN: Use YUV format or RGB format.
681 /// @param  pstColorTemp             \b IN: Color temp info given by user.
682 //-------------------------------------------------------------------------------------------------
683 DLL_PUBLIC void    MApi_XC_ACE_EX_PicSetColorTemp( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bUseYUVSpace, XC_ACE_EX_color_temp* pstColorTemp);
684 //-------------------------------------------------------------------------------------------------
685 /// Picture set color temp ex.
686 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
687 /// @param  bUseYUVSpace             \b IN: Use YUV format or RGB format.
688 /// @param  pstColorTemp             \b IN: Color temp info given by user.
689 //-------------------------------------------------------------------------------------------------
690 DLL_PUBLIC void    MApi_XC_ACE_EX_PicSetColorTempEx( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bUseYUVSpace, XC_ACE_EX_color_temp_ex* pstColorTemp);
691 
692 //-------------------------------------------------------------------------------------------------
693 /// Picture set post color temp
694 /// V02. Change the fields in XC_ACE_EX_color_temp_ex structure to MS_U16
695 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
696 /// @param  pstColorTemp             \b IN: Color temp info given by user.
697 //-------------------------------------------------------------------------------------------------
698 DLL_PUBLIC void MApi_XC_ACE_EX_PicSetPostColorTemp_V02(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, XC_ACE_EX_color_temp_ex2* pstColorTemp);
699 
700 #ifndef _API_XC_ACE_EX_C_
701 // Projects without EX_ENABLE_NEW_COLORTEMP_METHOD defined will set EX_ENABLE_NEW_COLORTEMP_METHOD to 0
702 #ifndef EX_ENABLE_NEW_COLORTEMP_METHOD
703   #define EX_ENABLE_NEW_COLORTEMP_METHOD 0
704 #endif
705 
706 #ifndef EX_ENABLE_PRECISE_RGBBRIGHTNESS
707   #define EX_ENABLE_PRECISE_RGBBRIGHTNESS 0
708 #endif
709 
710 #if EX_ENABLE_NEW_COLORTEMP_METHOD
711     #if EX_ENABLE_PRECISE_RGBBRIGHTNESS
712         #define MApi_XC_ACE_EX_PicSetColorTemp(pDeviceId, x, y, z) MApi_XC_ACE_EX_PicSetPostColorTemp2Ex(pDeviceId, x, y, z)
713     #else
714         #define MApi_XC_ACE_EX_PicSetColorTemp(pDeviceId, x, y, z) MApi_XC_ACE_EX_PicSetPostColorTemp2(pDeviceId, x, y, z)
715     #endif
716 #else
717     #if EX_ENABLE_PRECISE_RGBBRIGHTNESS
718         #define MApi_XC_ACE_EX_PicSetColorTemp(pDeviceId, x, y, z) MApi_XC_ACE_EX_PicSetColorTempEx(pDeviceId, x, y, z)
719     #endif
720 #endif
721 
722 #define MApi_XC_ACE_EX_PicSetBrightnessInVsync(pDeviceId, bWin, x, y, z) {MApi_XC_EX_WaitOutputVSync(pDeviceId, 2, 100, bWin); MApi_XC_ACE_EX_PicSetBrightness(pDeviceId, bWin, x, y, z);}
723 #define MApi_XC_ACE_EX_PicSetBrightnessPreciseInVsync(pDeviceId, bWin, x, y, z) {MApi_XC_EX_WaitOutputVSync(pDeviceId, 2, 100, bWin); MApi_XC_ACE_EX_PicSetBrightnessPrecise(pDeviceId, bWin, x, y, z);}
724 
725 #endif
726 
727 //-------------------------------------------------------------------------------------------------
728 /// Set Flesh tone
729 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
730 /// @param  bEn                      \b IN: @ref MS_BOOL
731 /// @param  u8FleshTone              \b IN: Flesh Tone Value
732 //-------------------------------------------------------------------------------------------------
733 DLL_PUBLIC void    MApi_XC_ACE_EX_SetFleshTone(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bEn, MS_U8 u8FleshTone);
734 
735 //-------------------------------------------------------------------------------------------------
736 /// black adjsutment
737 /// @param  eWindow                           \b IN: window type.
738 /// @param  u8BlackAdjust                     \b IN: adjust value given.
739 //-------------------------------------------------------------------------------------------------
740 DLL_PUBLIC void    MApi_XC_ACE_EX_SetBlackAdjust(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_U8 u8BlackAdjust);
741 
742 //-------------------------------------------------------------------------------------------------
743 /// IHC sram
744 /// @param  pBuf                            \b IN: sram data
745 /// @param  u16ByteSize                     \b IN: size of sram
746 //-------------------------------------------------------------------------------------------------
747 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_Set_IHC_SRAM(XC_ACE_DeviceId *pDeviceId, MS_U16 *pBuf, MS_U16 u16ByteSize);
748 
749 //-------------------------------------------------------------------------------------------------
750 /// IHC sram
751 /// @param  pBuf                            \b IN: sram data
752 /// @param  u16ByteSize                     \b IN: size of sram
753 //-------------------------------------------------------------------------------------------------
754 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_Set_ICC_SRAM(XC_ACE_DeviceId *pDeviceId, MS_U16 *pBuf, MS_U16 u16ByteSize);
755 
756 /********************************************************************************/
757 /*                  MWE function                  */
758 /********************************************************************************/
759 
760 //-------------------------------------------------------------------------------------------------
761 /// Enable MWE
762 /// @param  bEnable                     \b IN: @ref MS_BOOL
763 //-------------------------------------------------------------------------------------------------
764 DLL_PUBLIC void    MApi_XC_ACE_EX_EnableMWE(XC_ACE_DeviceId *pDeviceId, MS_BOOL bEnable);
765 
766 //-------------------------------------------------------------------------------------------------
767 /// MWE Clone Main Window Visual Effect
768 //-------------------------------------------------------------------------------------------------
769 DLL_PUBLIC void MApi_XC_ACE_EX_MWECloneVisualEffect(XC_ACE_DeviceId *pDeviceId);
770 
771 //-------------------------------------------------------------------------------------------------
772 /// MWE Apply Visual Effect From Reg Table
773 //-------------------------------------------------------------------------------------------------
774 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_MWESetRegTable(XC_ACE_DeviceId *pDeviceId, XC_ACE_EX_TAB_Info *pMWETable);
775 
776 //-------------------------------------------------------------------------------------------------
777 /// Flag for MWE Visual Effect Coming From Reg Table
778 /// @param  bEnable                     \b IN: @ref MS_BOOL
779 //-------------------------------------------------------------------------------------------------
780 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_SetMWELoadFromPQ(XC_ACE_DeviceId *pDeviceId, MS_BOOL bEnable);
781 
782 //-------------------------------------------------------------------------------------------------
783 /// MWE status
784 /// @retval  @ref MS_BOOL
785 //-------------------------------------------------------------------------------------------------
786 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_MWEStatus(XC_ACE_DeviceId *pDeviceId);
787 
788 //-------------------------------------------------------------------------------------------------
789 /// MWE Handle
790 //-------------------------------------------------------------------------------------------------
791 DLL_PUBLIC void    MApi_XC_ACE_EX_MWEHandle( XC_ACE_DeviceId *pDeviceId );
792 
793 //-------------------------------------------------------------------------------------------------
794 /// MWE function selection
795 /// @param  eWindow                 \b IN: Indicates the window where the ACE function applies to.
796 /// @param  mwe_func                     \b IN: @ref E_XC_ACE_EX_MWE_FUNC
797 //-------------------------------------------------------------------------------------------------
798 DLL_PUBLIC void    MApi_XC_ACE_EX_MWEFuncSel( XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, E_XC_ACE_EX_MWE_FUNC  mwe_func);
799 
800 //-------------------------------------------------------------------------------------------------
801 /// MWE set display window
802 /// @param  u16MWE_Disp_Hstart             \b IN: Horizotal position of start point. 0:means leftest position.
803 /// @param  u16MWE_Disp_Vstart             \b IN: Vertical position of start point, 0: mean up most position.
804 /// @param  u16MWE_Disp_Width              \b IN: Width of display window.
805 /// @param  u16MWE_Disp_Height             \b IN: Height of display winodw.
806 //-------------------------------------------------------------------------------------------------
807 DLL_PUBLIC void    MApi_XC_ACE_EX_MWESetDispWin(XC_ACE_DeviceId *pDeviceId, MS_U16 u16MWE_Disp_Hstart, MS_U16 u16MWE_Disp_Vstart, MS_U16 u16MWE_Disp_Width, MS_U16 u16MWE_Disp_Height);
808 
809 //-------------------------------------------------------------------------------------------------
810 /// 3D clone main and sub window's PQmap
811 /// @param  enWeaveType             \b IN: Output WeaveType
812 //-------------------------------------------------------------------------------------------------
813 DLL_PUBLIC void MApi_XC_ACE_EX_3DClonePQMap(XC_ACE_DeviceId *pDeviceId, XC_ACE_EX_WEAVETYPE enWeaveType);
814 
815 /********************************************************************************/
816 /*                  DynamicNR function                                          */
817 /********************************************************************************/
818 
819 //-------------------------------------------------------------------------------------------------
820 /// DNR Blending NR table
821 /// @param  pu8NewNR              \b IN: new NR target values.
822 /// @param  u8Weight              \b IN: Blending weighting.
823 /// @param  u8Step                \b IN: maxmium step size.
824 /// @param  pu16PreY0             \b IN: previous NR value 0.
825 /// @param  pu16PreY1             \b IN: previous NR value 1.
826 /// @param  pu8NRTBL              \b OUT: The new NR Table.
827 //-------------------------------------------------------------------------------------------------
828 DLL_PUBLIC void   MApi_XC_ACE_EX_DNR_Blending_NRTbl(XC_ACE_DeviceId *pDeviceId, MS_U8 *pu8NewNR, MS_U8 u8Weight, MS_U8 u8Step, MS_U16 *pu16PreY0, MS_U16 *pu16PreY1, MS_U8 *pu8NRTBL);
829 
830 //-------------------------------------------------------------------------------------------------
831 /// DNR Blending MISC
832 /// @param  u8NewItem              \b IN: New DNR blending target value.
833 /// @param  u16PreItem             \b IN: previous value.
834 /// @param  u8Weight               \b IN: Blending weighting.
835 /// @param  u8Step                 \b IN: Maxmium step size.
836 /// @retval new DNR blending value.
837 //-------------------------------------------------------------------------------------------------
838 DLL_PUBLIC MS_U16 MApi_XC_ACE_EX_DNR_Blending_MISC(XC_ACE_DeviceId *pDeviceId, MS_U8 u8NewItem, MS_U16 u16PreItem, MS_U8 u8Weight, MS_U8 u8Step);
839 
840 //-------------------------------------------------------------------------------------------------
841 /// DNR Blending
842 /// @param  u8NewItem              \b IN: New DNR blending target value.
843 /// @param  u16PreItem             \b IN: previous value.
844 /// @param  u8Weight               \b IN: Blending weighting.
845 /// @retval new DNR blending value.
846 //-------------------------------------------------------------------------------------------------
847 DLL_PUBLIC MS_U8  MApi_XC_ACE_EX_DNR_Blending(XC_ACE_DeviceId *pDeviceId, MS_U8 u8NewItem, MS_U16 u16PreItem, MS_U8 u8Weight);
848 
849 //-------------------------------------------------------------------------------------------------
850 /// DNR get precision shift
851 /// @retval shift value.
852 //-------------------------------------------------------------------------------------------------
853 DLL_PUBLIC MS_U16 MApi_XC_ACE_EX_DNR_Get_PrecisionShift(XC_ACE_DeviceId *pDeviceId);
854 
855 //-------------------------------------------------------------------------------------------------
856 /// DNR get motion weight
857 /// @param  u8CurMotion                 \b IN: current motion value
858 /// @param  u8PreMotion                 \b IN: previous motion value
859 /// @param  u8CurMotionLvl              \b IN: current motion catalog-level
860 /// @param  u8PreMotionLvl              \b IN: previous motion catalog-level
861 /// @param  u8DeFlick_Thre              \b IN: de-flick threshold.
862 /// @param  u8DeFilick_Step             \b IN: de-flick step size.
863 /// @retval motion weight
864 //-------------------------------------------------------------------------------------------------
865 DLL_PUBLIC MS_U8  MApi_XC_ACE_EX_DNR_GetMotion_Weight(XC_ACE_DeviceId *pDeviceId, MS_U8 u8CurMotion, MS_U8 u8PreMotion, MS_U8 u8CurMotionLvl, MS_U8 u8PreMotionLvl, MS_U8 u8DeFlick_Thre, MS_U8 u8DeFilick_Step);
866 
867 //-------------------------------------------------------------------------------------------------
868 /// DNR get Luma weight
869 /// @param  u8CurAvgLuma                 \b IN: current avergae luma
870 /// @param  u8PreAvgLuam                 \b IN: previous average luma
871 /// @param  u8CurLumaLvl                 \b IN: current avergae luma catalog-level
872 /// @param  u8PreLumaLvl                 \b IN: previous avergae luma catalog-level
873 /// @param  u8DeFlick_Th                 \b IN: de-flick threshold.
874 /// @param  u8DeFlick_Step               \b IN: de-flick step size.
875 /// @retval luma weight
876 //-------------------------------------------------------------------------------------------------
877 DLL_PUBLIC MS_U8  MApi_XC_ACE_EX_DNR_GetLuma_Weight(XC_ACE_DeviceId *pDeviceId, MS_U8 u8CurAvgLuma, MS_U8 u8PreAvgLuam, MS_U8 u8CurLumaLvl, MS_U8 u8PreLumaLvl, MS_U8 u8DeFlick_Th,  MS_U8 u8DeFlick_Step);
878 
879 //-------------------------------------------------------------------------------------------------
880 /// DNR get noise weight
881 /// @param  u8CurNoise                 \b IN: current noise.
882 /// @param  u8PreNoise                 \b IN: previous noise.
883 /// @param  u8Range                    \b IN: noise threshold, if difference between PreNoise and
884 ///                                          CurNoise > this value, then the stable status is down
885 ///                                          -grade for 1 degree.
886 /// @param  u8DeFlick_Th              \b IN: de-flick threshold.
887 /// @param  u8DeFlick_Step            \b IN: de-flick step size.
888 /// @retval Noise weighting value.
889 //-------------------------------------------------------------------------------------------------
890 DLL_PUBLIC MS_U8  MApi_XC_ACE_EX_DNR_GetNoise_Weight(XC_ACE_DeviceId *pDeviceId, MS_U8 u8CurNoise, MS_U8 u8PreNoise, MS_U8 u8Range, MS_U8 u8DeFlick_Th, MS_U8 u8DeFlick_Step);
891 
892 //-------------------------------------------------------------------------------------------------
893 /// DNR get motion degree, lower one means its more like a still video.
894 /// @retval motion degree value.
895 //-------------------------------------------------------------------------------------------------
896 DLL_PUBLIC MS_U8  MApi_XC_ACE_EX_DNR_GetMotion(XC_ACE_DeviceId *pDeviceId);
897 
898 //-------------------------------------------------------------------------------------------------
899 /// DNR init motion
900 //-------------------------------------------------------------------------------------------------
901 DLL_PUBLIC void   MApi_XC_ACE_EX_DNR_Init_Motion(XC_ACE_DeviceId *pDeviceId);
902 
903 //-------------------------------------------------------------------------------------------------
904 /// DNR init luma
905 //-------------------------------------------------------------------------------------------------
906 DLL_PUBLIC void   MApi_XC_ACE_EX_DNR_Init_Luma(XC_ACE_DeviceId *pDeviceId);
907 
908 //-------------------------------------------------------------------------------------------------
909 /// DNR init noise
910 //-------------------------------------------------------------------------------------------------
911 DLL_PUBLIC void   MApi_XC_ACE_EX_DNR_Init_Noise(XC_ACE_DeviceId *pDeviceId);
912 
913 //-------------------------------------------------------------------------------------------------
914 /// Set parameter of a DNR item specified by user.
915 /// @param  eWindow                 \b IN: Indicates the window where the ACE function applies to.
916 /// @param  eParam                 \b IN: @ref XC_ACE_EX_DNR_Param
917 /// @param  u16val                 \b IN: Setting value of DNR item.
918 //-------------------------------------------------------------------------------------------------
919 DLL_PUBLIC void   MApi_XC_ACE_EX_DNR_SetParam(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, XC_ACE_EX_DNR_Param eParam, MS_U16 u16val);
920 
921 //-------------------------------------------------------------------------------------------------
922 /// Get parameter of a DNR item specified by user.
923 /// @param  eWindow                 \b IN: Indicates the window where the ACE function applies to.
924 /// @param  eParam                 \b IN: @ref XC_ACE_EX_DNR_Param
925 /// @return @ref MS_U8
926 //-------------------------------------------------------------------------------------------------
927 DLL_PUBLIC MS_U8  MApi_XC_ACE_EX_DNR_GetParam(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, XC_ACE_EX_DNR_Param eParam);
928 
929 //-------------------------------------------------------------------------------------------------
930 /// Set NR table
931 /// @param  pu8Tbl                 \b IN: NR table given by user.
932 //-------------------------------------------------------------------------------------------------
933 DLL_PUBLIC void   MApi_XC_ACE_EX_DNR_SetNRTbl(XC_ACE_DeviceId *pDeviceId, MS_U8 *pu8Tbl);
934 
935 // must have functions
936 //-------------------------------------------------------------------------------------------------
937 /// Get version (without Mutex protect)
938 /// @param  ppVersion                 \b OUT: Version information of ACE lib.
939 /// @return @ref E_XC_ACE_EX_RESULT
940 //-------------------------------------------------------------------------------------------------
941 DLL_PUBLIC E_XC_ACE_EX_RESULT MApi_XC_ACE_EX_GetLibVer(const MSIF_Version **ppVersion);
942 
943 //-------------------------------------------------------------------------------------------------
944 /// Get info from driver (without Mutex protect)
945 /// @return XC_ACE_EX_ApiInfo
946 //-------------------------------------------------------------------------------------------------
947 const XC_ACE_EX_ApiInfo * MApi_XC_ACE_EX_GetInfo(XC_ACE_DeviceId *pDeviceId);
948 
949 //-------------------------------------------------------------------------------------------------
950 /// Get panel current status
951 /// @param  pDrvStatus                 \b IN: @ref XC_ACE_EX_ApiStatus
952 /// @param  bWindow                    \b IN: Indicates the window where the ACE function
953 ///                                           applies to, 0: Main Window, 1: Sub Window.
954 /// @return @ref MS_BOOL
955 //-------------------------------------------------------------------------------------------------
956 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_GetStatus(XC_ACE_DeviceId *pDeviceId, XC_ACE_EX_ApiStatus *pDrvStatus, MS_BOOL bWindow);
957 
958 //-------------------------------------------------------------------------------------------------
959 /// Set debug level (without Mutex protect)
960 /// @param  u16DbgSwitch                 \b IN: debug switch value, use TRUE/FALSE to turn on/off.
961 /// @return @ref MS_BOOL
962 //-------------------------------------------------------------------------------------------------
963 DLL_PUBLIC MS_BOOL MApi_XC_ACE_EX_SetDbgLevel(MS_U16 u16DbgSwitch);
964 
965 
966 DLL_PUBLIC void MApi_XC_ACE_EX_ColorCorrectionTable( XC_ACE_DeviceId *pDeviceId, MS_BOOL bScalerWin, MS_S16 *psColorCorrectionTable );
967 
968 DLL_PUBLIC void MApi_XC_ACE_EX_SetColorMatrixControl( XC_ACE_DeviceId *pDeviceId, MS_BOOL bScalerWin, MS_BOOL bEnable );
969 DLL_PUBLIC void MApi_XC_ACE_EX_SetRBChannelRange( XC_ACE_DeviceId *pDeviceId, MS_BOOL bScalerWin, MS_BOOL bRange );
970 
971 
972 //////////////////////////////////////////////
973 // Below functions are obosolted ! Please do not use them if you do not use them yet.
974 //////////////////////////////////////////////
975 
976 //-------------------------------------------------------------------------------------------------
977 ///-obosolte!! use MApi_XC_ACE_EX_PicSetPostColorTemp_V02 instead
978 //-------------------------------------------------------------------------------------------------
979 DLL_PUBLIC void MApi_XC_ACE_EX_PicSetPostColorTemp(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, XC_ACE_EX_color_temp* pstColorTemp);
980 
981 //-------------------------------------------------------------------------------------------------
982 ///-obosolte!! use MApi_XC_ACE_EX_PicSetPostColorTemp_V02 instead
983 //-------------------------------------------------------------------------------------------------
984 DLL_PUBLIC void MApi_XC_ACE_EX_PicSetPostColorTempEx(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, XC_ACE_EX_color_temp_ex* pstColorTemp);
985 
986 //-------------------------------------------------------------------------------------------------
987 ///-obosolte!! use MApi_XC_ACE_EX_PicSetPostColorTempWithBypassACESetting instead
988 //-------------------------------------------------------------------------------------------------
989 DLL_PUBLIC void MApi_XC_ACE_EX_PicSetPostColorTemp2(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bUseYUVSpace, XC_ACE_EX_color_temp* pstColorTemp);
990 
991 //*************************************************************************
992 ///-obosolte!! Please bypass color temp by using MApi_XC_ACE_EX_PicSetColorTemp and then set post color temp by using MApi_XC_ACE_EX_PicSetPostColorTemp_V02
993 //*************************************************************************
994 DLL_PUBLIC void MApi_XC_ACE_EX_PicSetPostColorTemp2Ex(XC_ACE_DeviceId *pDeviceId, MS_BOOL eWindow, MS_BOOL bUseYUVSpace, XC_ACE_EX_color_temp_ex* pstColorTemp);
995 
996 
997 
998 #ifdef __cplusplus
999 }
1000 #endif
1001 
1002 #endif // _API_XC_ACE_EX_H_
1003 
1004