xref: /utopia/UTPA2-700.0.x/mxlib/include/apiXC_Ace.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.h
98 /// @brief  ACE API layer Interface
99 /// @author MStar Semiconductor Inc.
100 /// CL 227231+:In box case, there is no need to do YUV2RGB transform.
101 ///////////////////////////////////////////////////////////////////////////////////////////////////
102 
103 /*! \defgroup Video Video modules
104 
105  *  \defgroup XC_BE XC_BE modules
106  *  \ingroup Video
107 
108 	ACE is used for	\n
109 	1. control the picture quality,include brightness, contrast, CSC ,etc.\n
110 	2. MWE function.\n
111 	For more information,see \link ACE ACE interface (apiXC_ACE.h) \endlink
112 
113  *  \defgroup ACE ACE interface (apiXC_ACE.h)
114  *  \ingroup XC_BE
115 
116     ACE is used for
117 
118     1.control the picture quality,include brightness, contrast, CSC ,etc.
119     2.MWE function.
120 
121  *  \defgroup ACE_INIT ACE init control
122  *  \ingroup ACE
123 
124  *! \defgroup ACE_FEATURE ACE feature operation
125  *  \ingroup ACE
126 
127  *! \defgroup ACE_INFO ACE Infomation pool
128  *  \ingroup ACE
129 
130  *! \defgroup ACE_ToBeModified ACE api to be modified
131  *  \ingroup ACE
132 
133  *! \defgroup ACE_ToBeRemove ACE api to be removed
134  *  \ingroup ACE
135  */
136 
137 #ifndef _API_XC_ACE_H_
138 #define _API_XC_ACE_H_
139 
140 #include "MsDevice.h"
141 #include "MsCommon.h"
142 #include "UFO.h"
143 
144 #ifdef __cplusplus
145 extern "C"
146 {
147 #endif
148 
149 //-------------------------------------------------------------------------------------------------
150 //  Macro and Define
151 //-------------------------------------------------------------------------------------------------
152 
153 //-------------------------------------------------------------------------------------------------
154 //  Type and Structure
155 //-------------------------------------------------------------------------------------------------
156 #define MSIF_ACE_LIB_CODE               {'A','C','E','_'}
157 #define MSIF_ACE_LIBVER                 {'0','0'}
158 #define MSIF_ACE_BUILDNUM               {'5','9'}
159 #define MSIF_ACE_CHANGELIST             {'0','0','6','2','1','0','5','3'}
160 #define XC_ACE_API_VERSION              /* Character String for DRV/API version             */  \
161     MSIF_TAG,                           /* 'MSIF'                                           */  \
162     MSIF_CLASS,                         /* '00'                                             */  \
163     MSIF_CUS,                           /* 0x0000                                           */  \
164     MSIF_MOD,                           /* 0x0000                                           */  \
165     MSIF_CHIP,                                                                                  \
166     MSIF_CPU,                                                                                   \
167     MSIF_ACE_LIB_CODE,                  /* IP__                                             */  \
168     MSIF_ACE_LIBVER,                    /* 0.0 ~ Z.Z                                        */  \
169     MSIF_ACE_BUILDNUM,                  /* 00 ~ 99                                          */  \
170     MSIF_ACE_CHANGELIST,                /* CL#                                              */  \
171     MSIF_OS
172 
173 #if defined(UFO_PUBLIC_HEADER_500_3)
174 #define XC_ACE_HDR_VERSION  1
175 #else
176 #define XC_ACE_HDR_VERSION  3
177 #endif
178 
179 /*!
180    The color information setting.
181 */
182 typedef enum
183 {
184     /// Version
185     E_XC_ACE_INFO_TYPE_VERSION,
186     /// Contrast
187     E_XC_ACE_INFO_TYPE_CONTRAST,
188     /// R Gain
189     E_XC_ACE_INFO_TYPE_R_GAIN,
190     /// G Gain
191     E_XC_ACE_INFO_TYPE_G_GAIN,
192     /// B Gain
193     E_XC_ACE_INFO_TYPE_B_GAIN,
194     /// Saturation
195     E_XC_ACE_INFO_TYPE_SATURATION,
196     /// Hue
197     E_XC_ACE_INFO_TYPE_HUE,
198     /// Color correction XY R
199     E_XC_ACE_INFO_TYPE_COLOR_CORRECTION_XY_R,
200     /// Color correction XY G
201     E_XC_ACE_INFO_TYPE_COLOR_CORRECTION_XY_G,
202     /// Color correction XY B
203     E_XC_ACE_INFO_TYPE_COLOR_CORRECTION_XY_B,
204     /// Color correction Offset R
205     E_XC_ACE_INFO_TYPE_COLOR_CORRECTION_OFFSET_R,
206     /// Color correction Offset G
207     E_XC_ACE_INFO_TYPE_COLOR_CORRECTION_OFFSET_G,
208     /// Color correction Offset B
209     E_XC_ACE_INFO_TYPE_COLOR_CORRECTION_OFFSET_B,
210     /// R Brightness
211     E_XC_ACE_INFO_TYPE_BRIGHTNESS_R,
212     /// G Brightness
213     E_XC_ACE_INFO_TYPE_BRIGHTNESS_G,
214     /// B Brightness
215     E_XC_ACE_INFO_TYPE_BRIGHTNESS_B,
216 
217     /// for C51 CPU only, other type CPU will always return 0
218     E_XC_ACE_INFO_TYPE_COMPILER_VERSION,
219     /// for C51 CPU only, will return the YUV to RGB matrix
220     E_XC_ACE_INFO_TYPE_YUV_TO_RGB_MATRIX_SEL,
221 
222     /// IHC related
223     // Users can define color, inorder to match previous settings,
224     // R,G,B,C,M,Y,F can also mapping USER_COLOR0 ~ 6
225     E_XC_ACE_INFO_TYPE_IHC_COLOR_R,
226     E_XC_ACE_INFO_TYPE_IHC_COLOR_G,
227     E_XC_ACE_INFO_TYPE_IHC_COLOR_B,
228     E_XC_ACE_INFO_TYPE_IHC_COLOR_C,
229     E_XC_ACE_INFO_TYPE_IHC_COLOR_M,
230     E_XC_ACE_INFO_TYPE_IHC_COLOR_Y,
231     E_XC_ACE_INFO_TYPE_IHC_COLOR_F,
232 
233     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR1 = E_XC_ACE_INFO_TYPE_IHC_COLOR_R,
234     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR2 = E_XC_ACE_INFO_TYPE_IHC_COLOR_G,
235     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR3 = E_XC_ACE_INFO_TYPE_IHC_COLOR_B,
236     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR4 = E_XC_ACE_INFO_TYPE_IHC_COLOR_C,
237     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR5 = E_XC_ACE_INFO_TYPE_IHC_COLOR_M,
238     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR6 = E_XC_ACE_INFO_TYPE_IHC_COLOR_Y,
239     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR7 = E_XC_ACE_INFO_TYPE_IHC_COLOR_F,
240     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR8,
241     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR9,
242     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR10,
243     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR11,
244     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR12,
245     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR13,
246     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR14,
247     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR15,
248     E_XC_ACE_INFO_TYPE_IHC_USER_COLOR0,
249 
250     /// ICC related
251     // Users can define color, inorder to match previous settings,
252     // R,G,B,C,M,Y,F can also mapping USER_COLOR0 ~ 6
253     E_XC_ACE_INFO_TYPE_ICC_COLOR_R,
254     E_XC_ACE_INFO_TYPE_ICC_COLOR_G,
255     E_XC_ACE_INFO_TYPE_ICC_COLOR_B,
256     E_XC_ACE_INFO_TYPE_ICC_COLOR_C,
257     E_XC_ACE_INFO_TYPE_ICC_COLOR_M,
258     E_XC_ACE_INFO_TYPE_ICC_COLOR_Y,
259     E_XC_ACE_INFO_TYPE_ICC_COLOR_F,
260 
261     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR1 = E_XC_ACE_INFO_TYPE_ICC_COLOR_R,
262     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR2 = E_XC_ACE_INFO_TYPE_ICC_COLOR_G,
263     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR3 = E_XC_ACE_INFO_TYPE_ICC_COLOR_B,
264     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR4 = E_XC_ACE_INFO_TYPE_ICC_COLOR_C,
265     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR5 = E_XC_ACE_INFO_TYPE_ICC_COLOR_M,
266     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR6 = E_XC_ACE_INFO_TYPE_ICC_COLOR_Y,
267     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR7 = E_XC_ACE_INFO_TYPE_ICC_COLOR_F,
268     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR8,
269     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR9,
270     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR10,
271     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR11,
272     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR12,
273     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR13,
274     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR14,
275     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR15,
276     E_XC_ACE_INFO_TYPE_ICC_USER_COLOR0,
277 
278     /// IBC related
279     // Users can define color, inorder to match previous settings,
280     // R,G,B,C,M,Y,F can also mapping USER_COLOR0 ~ 6
281     E_XC_ACE_INFO_TYPE_IBC_COLOR_R,
282     E_XC_ACE_INFO_TYPE_IBC_COLOR_G,
283     E_XC_ACE_INFO_TYPE_IBC_COLOR_B,
284     E_XC_ACE_INFO_TYPE_IBC_COLOR_C,
285     E_XC_ACE_INFO_TYPE_IBC_COLOR_M,
286     E_XC_ACE_INFO_TYPE_IBC_COLOR_Y,
287     E_XC_ACE_INFO_TYPE_IBC_COLOR_F,
288 
289     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR1 = E_XC_ACE_INFO_TYPE_IBC_COLOR_R,
290     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR2 = E_XC_ACE_INFO_TYPE_IBC_COLOR_G,
291     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR3 = E_XC_ACE_INFO_TYPE_IBC_COLOR_B,
292     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR4 = E_XC_ACE_INFO_TYPE_IBC_COLOR_C,
293     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR5 = E_XC_ACE_INFO_TYPE_IBC_COLOR_M,
294     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR6 = E_XC_ACE_INFO_TYPE_IBC_COLOR_Y,
295     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR7 = E_XC_ACE_INFO_TYPE_IBC_COLOR_F,
296     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR8,
297     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR9,
298     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR10,
299     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR11,
300     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR12,
301     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR13,
302     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR14,
303     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR15,
304     E_XC_ACE_INFO_TYPE_IBC_USER_COLOR0,
305     //max,min contrast
306     E_XC_ACE_INFO_TYPE_CONTRAST_MIN_VALUE,
307     E_XC_ACE_INFO_TYPE_CONTRAST_MAX_VALUE,
308     /// Dummy
309     E_XC_ACE_INFO_TYPE_DUMMY
310 } E_XC_ACE_INFOTYPE;
311 
312 /*!
313     The convert method of YUV to RGB
314 */
315 typedef enum
316 {
317     /// YUV to RGB matrix - Use Std CSCM for SDTV
318     E_XC_ACE_YUV_TO_RGB_MATRIX_SDTV,
319     /// YUV to RGB matrix - Use Std CSCM for HDTV
320     E_XC_ACE_YUV_TO_RGB_MATRIX_HDTV,
321     /// Use user define CSCM, specified by tUserYVUtoRGBMatrix
322     E_XC_ACE_YUV_TO_RGB_MATRIX_USER,
323 } E_XC_ACE_YUVTORGBTYPE;
324 
325 /*!
326    The Effect Settings of Multi Window
327 */
328 typedef enum
329 {
330     /// off
331     E_XC_ACE_MWE_MODE_OFF,
332     /// H split, reference window at right side,default
333     E_XC_ACE_MWE_MODE_H_SPLIT,
334     /// Move
335     E_XC_ACE_MWE_MODE_MOVE,
336     /// Zoom
337     E_XC_ACE_MWE_MODE_ZOOM,
338     /// H Scan
339     E_XC_ACE_MWE_MODE_H_SCAN,
340     /// H split, reference window at left side
341     E_XC_ACE_MWE_MODE_H_SPLIT_LEFT,
342     /// The number of Scaler ACE MWE functoin
343     E_XC_ACE_MWE_MODE_NUMS,
344 } E_XC_ACE_MWE_FUNC;
345 
346 /*!
347    The Result of XC_ACE function call.
348 */
349 typedef enum
350 {
351     /// fail
352     E_XC_ACE_FAIL = 0,
353     /// ok
354     E_XC_ACE_OK = 1,
355     /// get base address failed when initialize panel driver
356     E_XC_ACE_GET_BASEADDR_FAIL,
357     /// obtain mutex timeout when calling this function
358     E_XC_ACE_OBTAIN_RESOURCE_FAIL,
359 } E_XC_ACE_RESULT;
360 
361 
362 typedef enum
363 {
364     E_XC_ACE_MWE_MIRROR_NORMAL,
365     E_XC_ACE_MWE_MIRROR_H_ONLY,
366     E_XC_ACE_MWE_MIRROR_V_ONLY,
367     E_XC_ACE_MWE_MIRROR_HV,
368     E_XC_ACE_MWE_MIRROR_MAX,
369 }E_XC_ACE_MWE_MIRROR_TYPE;
370 
371 /*!
372    obosolte!! use XC_ACE_color_temp_ex2 instead
373 */
374 typedef struct DLL_PACKED
375 {
376     /// red color offset
377     MS_U8 cRedOffset;
378     /// green color offset
379     MS_U8 cGreenOffset;
380     /// blue color offset
381     MS_U8 cBlueOffset;
382 
383     /// red color
384     MS_U8 cRedColor;
385     /// green color
386     MS_U8 cGreenColor;
387     /// blue color
388     MS_U8 cBlueColor;
389 
390     /// scale 100 value of red color
391     MS_U8 cRedScaleValue;
392     /// scale 100 value of green color
393     MS_U8 cGreenScaleValue;
394     /// scale 100 value of blue color
395     MS_U8 cBlueScaleValue;
396 } XC_ACE_color_temp;
397 
398 /*!
399    obosolte!! use XC_ACE_color_temp_ex2 instead
400 */
401 typedef struct DLL_PACKED
402 {
403     /// red color offset
404     MS_U16 cRedOffset;
405     /// green color offset
406     MS_U16 cGreenOffset;
407     /// blue color offset
408     MS_U16 cBlueOffset;
409 
410     /// red color
411     MS_U8 cRedColor;
412     /// green color
413     MS_U8 cGreenColor;
414     /// blue color
415     MS_U8 cBlueColor;
416 
417     /// scale 100 value of red color
418     MS_U8 cRedScaleValue;
419     /// scale 100 value of green color
420     MS_U8 cGreenScaleValue;
421     /// scale 100 value of blue color
422     MS_U8 cBlueScaleValue;
423 } XC_ACE_color_temp_ex;
424 
425 /*!
426    The color temp settings ex2.
427 */
428 typedef struct DLL_PACKED
429 {
430     /// red color offset
431     MS_U16 cRedOffset;
432     /// green color offset
433     MS_U16 cGreenOffset;
434     /// blue color offset
435     MS_U16 cBlueOffset;
436 
437     /// red color
438     MS_U16 cRedColor;
439     /// green color
440     MS_U16 cGreenColor;
441     /// blue color
442     MS_U16 cBlueColor;
443 
444     /// scale 100 value of red color
445     MS_U16 cRedScaleValue;
446     /// scale 100 value of green color
447     MS_U16 cGreenScaleValue;
448     /// scale 100 value of blue color
449     MS_U16 cBlueScaleValue;
450 } XC_ACE_color_temp_ex2;
451 
452 //----------------------------
453 // XC ACE initialize
454 //----------------------------
455 /*!
456    The ACE initialze DATA.
457 */
458 typedef struct __attribute__((packed))
459 {
460     MS_BOOL    eWindow;                  ///< initial eWindow
461 
462     MS_S16*    S16ColorCorrectionMatrix; ///< initial Color Correction Matrix
463 #if defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_700)
464 #if !defined (__aarch64__)
465     MS_U32 u32AlignmentDummy0;
466 #endif
467 #endif
468     MS_S16*    S16RGB;                   ///< initial RGB
469 #if defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_700)
470 #if !defined (__aarch64__)
471     MS_U32 u32AlignmentDummy1;
472 #endif
473 #endif
474     MS_U16     u16MWEHstart;             ///< initial Horizontal start
475 
476 
477     MS_U16     u16MWEVstart;             ///< initial Vertical start
478 
479     MS_U16     u16MWEWidth;              ///< initial MWE Width
480 
481     MS_U16     u16MWEHeight;             ///< initial MWE Height
482 
483     MS_U16     u16MWE_Disp_Hstart;       ///< initial MWE Display Horizontal start
484 
485     MS_U16     u16MWE_Disp_Vstart;       ///< initial MWE Display Vertical start
486 
487     MS_U16     u16MWE_Disp_Width;        ///< initial MWE Display width
488 
489     MS_U16     u16MWE_Disp_Height;       ///< initial MWE Display height
490 
491     MS_BOOL    bMWE_Enable;              ///< Enable or not
492 } XC_ACE_InitData;
493 
494 /*!
495    The XC_ACE library infomation.
496 */
497 typedef struct
498 {
499 
500 } XC_ACE_ApiInfo;
501 
502 /*!
503    The XC_ACE status infomation.
504 */
505 typedef struct DLL_PACKED
506 {
507     /// Scaler ACE API status
508     XC_ACE_InitData ACEinit;
509 } XC_ACE_ApiStatus;
510 
511 
512 /*!
513    The XC_ACE DNR parameters settings.
514 */
515 typedef enum
516 {
517     /// NR ONOFF
518     E_ACE_DNR_NR_ONOFF,
519     /// SNR
520     E_ACE_DNR_SNR,
521     /// Spike NR 0
522     E_ACE_DNR_SPIKE_NR_0,
523     /// Spike NR 1
524     E_ACE_DNR_SPIKE_NR_1,
525     /// Gray ground gain
526     E_ACE_DNR_GRAY_GROUND_GAIN,
527     /// Gray ground EN
528     E_ACE_DNR_GRAY_GROUND_EN,
529     /// Peaking bank coring
530     E_ACE_DNR_PEAKING_BANK_CORING,
531     /// Guassin SNR threshold
532     E_ACE_DNR_GUASSIN_SNR_THRESHOLD,
533     /// Motion
534     E_ACE_DNR_MOTION,
535     /// Peaking coring threshold
536     E_ACE_DNR_PEAKING_CORING_THRESHOLD,
537     /// Sharpness adjust
538     E_ACE_DNR_SHARPNESS_ADJUST,
539     /// NM V
540     E_ACE_DNR_NM_V,
541     /// GNR 0
542     E_ACE_DNR_GNR_0,
543     /// GNR 1
544     E_ACE_DNR_GNR_1,
545     /// CP
546     E_ACE_DNR_CP,
547     /// DP
548     E_ACE_DNR_DP,
549     /// NM H 0
550     E_ACE_DNR_NM_H_0,
551     /// HM H 1
552     E_ACE_DNR_NM_H_1,
553     /// SC coring
554     E_ACE_DNR_SC_CORING,
555     /// NM
556     E_ACE_DNR_SNR_NM,
557 }XC_ACE_DNR_Param;
558 
559 typedef enum
560 {
561     // Users can define color, inorder to match previous settings,
562     // R,G,B,C,M,Y,F can also mapping USER_COLOR0 ~ 6
563 
564     E_ACE_IHC_COLOR_R,
565     E_ACE_IHC_COLOR_G,
566     E_ACE_IHC_COLOR_B,
567     E_ACE_IHC_COLOR_C,
568     E_ACE_IHC_COLOR_M,
569     E_ACE_IHC_COLOR_Y,
570     E_ACE_IHC_COLOR_F,
571 
572     E_ACE_IHC_USER_COLOR1 = E_ACE_IHC_COLOR_R,
573     E_ACE_IHC_USER_COLOR2 = E_ACE_IHC_COLOR_G,
574     E_ACE_IHC_USER_COLOR3 = E_ACE_IHC_COLOR_B,
575     E_ACE_IHC_USER_COLOR4 = E_ACE_IHC_COLOR_C,
576     E_ACE_IHC_USER_COLOR5 = E_ACE_IHC_COLOR_M,
577     E_ACE_IHC_USER_COLOR6 = E_ACE_IHC_COLOR_Y,
578     E_ACE_IHC_USER_COLOR7 = E_ACE_IHC_COLOR_F,
579     E_ACE_IHC_USER_COLOR8,
580     E_ACE_IHC_USER_COLOR9,
581     E_ACE_IHC_USER_COLOR10,
582     E_ACE_IHC_USER_COLOR11,
583     E_ACE_IHC_USER_COLOR12,
584     E_ACE_IHC_USER_COLOR13,
585     E_ACE_IHC_USER_COLOR14,
586     E_ACE_IHC_USER_COLOR15,
587     E_ACE_IHC_USER_COLOR0,
588     E_ACE_IHC_COLOR_MAX,
589 }XC_ACE_IHC_COLOR_TYPE;
590 
591 typedef enum
592 {
593     // Users can define color, inorder to match previous settings,
594     // R,G,B,C,M,Y,F can also mapping USER_COLOR0 ~ 6
595 
596     E_ACE_ICC_COLOR_R,
597     E_ACE_ICC_COLOR_G,
598     E_ACE_ICC_COLOR_B,
599     E_ACE_ICC_COLOR_C,
600     E_ACE_ICC_COLOR_M,
601     E_ACE_ICC_COLOR_Y,
602     E_ACE_ICC_COLOR_F,
603 
604     E_ACE_ICC_USER_COLOR1 = E_ACE_ICC_COLOR_R,
605     E_ACE_ICC_USER_COLOR2 = E_ACE_ICC_COLOR_G,
606     E_ACE_ICC_USER_COLOR3 = E_ACE_ICC_COLOR_B,
607     E_ACE_ICC_USER_COLOR4 = E_ACE_ICC_COLOR_C,
608     E_ACE_ICC_USER_COLOR5 = E_ACE_ICC_COLOR_M,
609     E_ACE_ICC_USER_COLOR6 = E_ACE_ICC_COLOR_Y,
610     E_ACE_ICC_USER_COLOR7 = E_ACE_ICC_COLOR_F,
611     E_ACE_ICC_USER_COLOR8,
612     E_ACE_ICC_USER_COLOR9,
613     E_ACE_ICC_USER_COLOR10,
614     E_ACE_ICC_USER_COLOR11,
615     E_ACE_ICC_USER_COLOR12,
616     E_ACE_ICC_USER_COLOR13,
617     E_ACE_ICC_USER_COLOR14,
618     E_ACE_ICC_USER_COLOR15,
619     E_ACE_ICC_USER_COLOR0,
620     E_ACE_ICC_COLOR_MAX,
621 }XC_ACE_ICC_COLOR_TYPE;
622 
623 typedef enum
624 {
625     // Users can define color, inorder to match previous settings,
626     // R,G,B,C,M,Y,F can also mapping USER_COLOR0 ~ 6
627 
628     E_ACE_IBC_COLOR_R,
629     E_ACE_IBC_COLOR_G,
630     E_ACE_IBC_COLOR_B,
631     E_ACE_IBC_COLOR_C,
632     E_ACE_IBC_COLOR_M,
633     E_ACE_IBC_COLOR_Y,
634     E_ACE_IBC_COLOR_F,
635 
636     E_ACE_IBC_USER_COLOR1 = E_ACE_IBC_COLOR_R,
637     E_ACE_IBC_USER_COLOR2 = E_ACE_IBC_COLOR_G,
638     E_ACE_IBC_USER_COLOR3 = E_ACE_IBC_COLOR_B,
639     E_ACE_IBC_USER_COLOR4 = E_ACE_IBC_COLOR_C,
640     E_ACE_IBC_USER_COLOR5 = E_ACE_IBC_COLOR_M,
641     E_ACE_IBC_USER_COLOR6 = E_ACE_IBC_COLOR_Y,
642     E_ACE_IBC_USER_COLOR7 = E_ACE_IBC_COLOR_F,
643     E_ACE_IBC_USER_COLOR8,
644     E_ACE_IBC_USER_COLOR9,
645     E_ACE_IBC_USER_COLOR10,
646     E_ACE_IBC_USER_COLOR11,
647     E_ACE_IBC_USER_COLOR12,
648     E_ACE_IBC_USER_COLOR13,
649     E_ACE_IBC_USER_COLOR14,
650     E_ACE_IBC_USER_COLOR15,
651     E_ACE_IBC_USER_COLOR0,
652     E_ACE_IBC_COLOR_MAX,
653 }XC_ACE_IBC_COLOR_TYPE;
654 
655 #define ACE_INFOEX_MODE_POST_RGB_GAIN           0x1
656 #define ACE_INFOEX_MODE_POST_RGB_OFFSET         0x2
657 typedef struct DLL_PACKED
658 {
659     MS_U32 u32Mode;
660     MS_U32 u32Reserved;
661 }XC_ACE_InfoEx;
662 
663 //--------------------------------------------------------------------------------------------------
664 // MWE Load Visual Effect Table related
665 //--------------------------------------------------------------------------------------------------
666 #define ACE_TABINFO_VERSION                0
667 
668 #define ACE_TABINFO_REG_ADDR_SIZE          (2)
669 #define ACE_TABINFO_REG_MASK_SIZE          (1)
670 #define ACE_TABINFO_REG_DATA_SIZE          (2)
671 
672 typedef struct DLL_PACKED
673 {
674     MS_U8 *pTable;
675     MS_U8 u8TabCols;
676     MS_U8 u8TabRows;
677     MS_U8 u8TabIdx;
678     MS_U32 u32ACE_TabInfo_version; //Version of current structure, including the content of pTable
679 }XC_ACE_TAB_Info;
680 //--------------------------------------------------------------------------------------------------
681 
682 //------------------------------
683 // Weave Type: used for 3D
684 //------------------------------
685 typedef enum
686 {
687     E_ACE_WEAVETYPE_NONE        = 0x00,
688     E_ACE_WEAVETYPE_H          = 0x01,
689     E_ACE_WEAVETYPE_V          = 0x02,
690     E_ACE_WEAVETYPE_DUALVIEW    = 0x04,
691     E_ACE_WEAVETYPE_NUM,
692 }XC_ACE_WEAVETYPE;
693 
694 typedef struct __attribute__((packed))
695 {
696     MS_U8      u8ColorPrimaries;
697     MS_U8      u8TransferCharacteristics;
698     MS_U8      u8MatrixCoefficients;
699 } XC_ACE_HDRMetadataMpegVUI;
700 
701 ///HDR Code////
702 typedef struct __attribute__((packed))
703 {
704     MS_U16 u16Smin; // 0.10
705     MS_U16 u16Smed; // 0.10
706     MS_U16 u16Smax; // 0.10
707     MS_U16 u16Tmin; // 0.10
708     MS_U16 u16Tmed; // 0.10
709     MS_U16 u16Tmax; // 0.10
710     MS_U16 u16MidSourceOffset;
711     MS_U16 u16MidTargetOffset;
712     MS_U16 u16MidSourceRatio;
713     MS_U16 u16MidTargetRatio;
714 } XC_ACE_HDRToneMappingData;
715 
716 typedef struct __attribute__((packed))
717 {
718     MS_U16 u16tRx; // target Rx
719     MS_U16 u16tRy; // target Ry
720     MS_U16 u16tGx; // target Gx
721     MS_U16 u16tGy; // target Gy
722     MS_U16 u16tBx; // target Bx
723     MS_U16 u16tBy; // target By
724     MS_U16 u16tWx; // target Wx
725     MS_U16 u16tWy; // target Wy
726 } XC_ACE_HDRGamutMappingData;
727 
728 typedef struct __attribute__((packed))
729 {
730     MS_U8      u8EOTF; // 0:SDR gamma, 1:HDR gamma, 2:SMPTE ST2084, 3:Future EOTF, 4-7:Reserved
731     MS_U16     u16Rx; // display primaries Rx
732     MS_U16     u16Ry; // display primaries Ry
733     MS_U16     u16Gx; // display primaries Gx
734     MS_U16     u16Gy; // display primaries Gy
735     MS_U16     u16Bx; // display primaries Bx
736     MS_U16     u16By; // display primaries By
737     MS_U16     u16Wx; // display primaries Wx
738     MS_U16     u16Wy; // display primaries Wy
739     MS_U16     u16Lmax; // max display mastering luminance
740     MS_U16     u16Lmin; // min display mastering luminance
741     MS_U16     u16MaxCLL; // maximum content light level
742     MS_U16     u16MaxFALL; // maximum frame-average light level
743 } XC_ACE_HDRMetadataHdmiTxInfoFrame;
744 
745 typedef struct  __attribute__((packed))
746 {
747     MS_U8 PixelFormat;              // Pixel Format
748     MS_U8 Colorimetry;              // Color imetry
749     MS_U8 ExtendedColorimetry;      // Extended Color imetry
750     MS_U8 RgbQuantizationRange;     // Rgb Quantization Range
751     MS_U8 YccQuantizationRange;     // Ycc Quantization Range
752     MS_U8 StaticMetadataDescriptorID; //Static Metadata Descriptor ID
753 } XC_ACE_HDRHdmiTxAviInfoFrame;
754 
755 /*!
756  *  Initial  HDR   Settings
757  */
758 typedef struct __attribute__((packed))
759 {
760     /// HDR Version Info
761     MS_U16 u16HDRVerInfo;
762     /// HDR init Length
763     MS_U16 u16HDRInitLength;
764     /// HDR Enable
765     MS_BOOL bHDREnable;
766     /// HDR Function Select
767     MS_U16 u16HDRFunctionSelect;
768     /// HDR Metadata Mpeg VUI
769     XC_ACE_HDRMetadataMpegVUI ACE_HDRMetadataMpegVUI;
770     //HDR Tone Mapping Data
771     XC_ACE_HDRToneMappingData ACE_HDRToneMappingData;
772     //HDR Gamut Mapping Data
773     XC_ACE_HDRGamutMappingData ACE_HDRGamutMappingData;
774     //HDR Metadata Hdmi Tx Info Frame
775     XC_ACE_HDRMetadataHdmiTxInfoFrame ACE_HDRMetadataHdmiTxInfoFrame;
776 #if defined(UFO_PUBLIC_HEADER_700) || defined(UFO_PUBLIC_HEADER_300) || defined(UFO_PUBLIC_HEADER_212)
777     //HDR Hdmi Tx Avi Info Frame
778     XC_ACE_HDRHdmiTxAviInfoFrame ACE_HDRHdmiTxAviInfoFrame;
779 #endif
780 } XC_ACE_HDRinit;
781 
782 
783 //-------------------------------------------------------------------------------------------------
784 //  Function and Variable
785 //-------------------------------------------------------------------------------------------------
786 #define XC_ACE_BYPASS_COLOR_GAIN  128 //necessary for HW color tempture adjustment,
787                                       //used after T2, i.e: T3/T4/T7/T8/Janus..
788 
789 /********************************************************************************/
790 /*                   msAPI_ACE.c                   */
791 /********************************************************************************/
792 
793 //-------------------------------------------------------------------------------------------------
794 /// ACE Initiation
795 /// @ingroup ACE_INIT
796 /// @param  pstXC_ACE_InitData                  \b IN: @ref XC_ACE_InitData
797 /// @param  u32InitDataLen                      \b IN: The Length of pstXC_ACE_InitData.
798 /// @return @ref MS_BOOL
799 //-------------------------------------------------------------------------------------------------
800 MS_BOOL MApi_XC_ACE_Init(XC_ACE_InitData *pstXC_ACE_InitData, MS_U32 u32InitDataLen);
801 
802 
803 //-------------------------------------------------------------------------------------------------
804 /// ACE Exit
805 /// @ingroup ACE_INIT
806 /// @return @ref MS_BOOL
807 //-------------------------------------------------------------------------------------------------
808 MS_BOOL MApi_XC_ACE_Exit(void);
809 
810 //-------------------------------------------------------------------------------------------------
811 /// ACE DMS
812 /// @ingroup ACE_FEATURE
813 /// @param  eWindow                 \b IN: Indicates the window where the ACE function applies to.
814 /// @param  bisATV                  \b IN: Whether the active input source is or not ATV.
815 //-------------------------------------------------------------------------------------------------
816 void    MApi_XC_ACE_DMS(MS_BOOL eWindow, MS_BOOL bisATV);
817 
818 //-------------------------------------------------------------------------------------------------
819 /// Set PC YUV to RGB
820 /// @ingroup ACE_FEATURE
821 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
822 /// @param  bEnable                  \b IN: Enable or Disalbe the function.
823 //-------------------------------------------------------------------------------------------------
824 void    MApi_XC_ACE_SetPCYUV2RGB(MS_BOOL eWindow, MS_BOOL bEnable);
825 
826 //-------------------------------------------------------------------------------------------------
827 /// Select YUV to RGB Matrix, if the ucMatrix type is ACE_YUV_TO_RGB_MATRIX_USER, then apply the
828 /// psUserYUVtoRGBMatrix supplied by user.
829 /// @ingroup ACE_FEATURE
830 /// @param  eWindow                       \b IN: Indicates the window where the ACE function applies to.
831 /// @param  ucMatrix                      \b IN: @ref E_ACE_YUVTORGBInfoType.
832 /// @param  psUserYUVtoRGBMatrix          \b IN: User-Defined color transformed matrix.
833 //-------------------------------------------------------------------------------------------------
834 void    MApi_XC_ACE_SelectYUVtoRGBMatrix(MS_BOOL eWindow, MS_U8 ucMatrix, MS_S16* psUserYUVtoRGBMatrix);
835 
836 //-------------------------------------------------------------------------------------------------
837 /// Set color correction table
838 /// @ingroup ACE_FEATURE
839 /// @param  bScalerWin                      \b IN: Indicates the window where the ACE function
840 ///                                                 applies to, 0: Main Window, 1: Sub Window.
841 //-------------------------------------------------------------------------------------------------
842 void    MApi_XC_ACE_SetColorCorrectionTable( MS_BOOL bScalerWin);
843 
844 //-------------------------------------------------------------------------------------------------
845 /// Set PCs RGB table
846 /// @ingroup ACE_FEATURE
847 /// @param  bScalerWin                      \b IN: Indicates the window where the ACE function
848 ///                                                 applies to, 0: Main Window, 1: Sub Window.
849 //-------------------------------------------------------------------------------------------------
850 void    MApi_XC_ACE_SetPCsRGBTable( MS_BOOL bScalerWin);
851 
852 //-------------------------------------------------------------------------------------------------
853 /// Get color matrix
854 /// @ingroup ACE_FEATURE
855 /// @param  eWindow                      \b IN: Indicates the window where the ACE function applies to.
856 /// @param  pu16Matrix                   \b OUT: a MS_U16 matrix represents current color matrix
857 //-------------------------------------------------------------------------------------------------
858 void    MApi_XC_ACE_GetColorMatrix(MS_BOOL eWindow, MS_U16* pu16Matrix);
859 
860 //-------------------------------------------------------------------------------------------------
861 /// Set color matrix
862 /// @ingroup ACE_FEATURE
863 /// @param  eWindow                      \b IN: Indicates the window where the ACE function applies to.
864 /// @param  pu16Matrix                   \b IN: The Matrix given to set the color transformation.
865 //-------------------------------------------------------------------------------------------------
866 void    MApi_XC_ACE_SetColorMatrix( MS_BOOL eWindow, MS_U16* pu16Matrix);
867 
868 //-------------------------------------------------------------------------------------------------
869 /// Set Bypass Color Matrix
870 /// @ingroup ACE_FEATURE
871 /// @param bEnable      \b IN:  Enable : Bypass Set Color Matrix
872 /// @return @ref E_XC_ACE_RESULT
873 //-------------------------------------------------------------------------------------------------
874 E_XC_ACE_RESULT MApi_XC_ACE_SetBypassColorMatrix(MS_BOOL bEnable );
875 
876 //-------------------------------------------------------------------------------------------------
877 /// Set IHC value
878 /// @ingroup ACE_FEATURE
879 /// @param  bScalerWin                   \b IN: Indicates the window where the ACE function applies to.
880 /// @param  eIHC                         \b IN: Indicates the color to be set.
881 /// @param  u8Val                        \b IN: The value set to the color(0 ~ 127). (middle value is 64)
882 /// @return @ref MS_BOOL
883 //-------------------------------------------------------------------------------------------------
884 MS_BOOL MApi_XC_ACE_SetIHC(MS_BOOL bScalerWin, XC_ACE_IHC_COLOR_TYPE eIHC, MS_U8 u8Val);
885 
886 //-------------------------------------------------------------------------------------------------
887 /// Set ICC value
888 /// @ingroup ACE_FEATURE
889 /// @param  bScalerWin                   \b IN: Indicates the window where the ACE function applies to.
890 /// @param  eICC                         \b IN: Indicates the color to be set.
891 /// @param  u8Val                        \b IN: The value set to the color(0 ~ 31). (middle value is 16)
892 /// @return @ref MS_BOOL
893 //-------------------------------------------------------------------------------------------------
894 MS_BOOL SYMBOL_WEAK MApi_XC_ACE_SetICC(MS_BOOL bScalerWin, XC_ACE_ICC_COLOR_TYPE eICC, MS_U8 u8Val);
895 
896 //-------------------------------------------------------------------------------------------------
897 /// Set IBC value
898 /// @ingroup ACE_FEATURE
899 /// @param  bScalerWin                   \b IN: Indicates the window where the ACE function applies to.
900 /// @param  eIBC                         \b IN: Indicates the color to be set.
901 /// @param  u8Val                        \b IN: The value set to the color(0 ~ 63). (middle value is 32)
902 /// @return @ref MS_BOOL
903 //-------------------------------------------------------------------------------------------------
904 MS_BOOL SYMBOL_WEAK MApi_XC_ACE_SetIBC(MS_BOOL bScalerWin, XC_ACE_IBC_COLOR_TYPE eIBC, MS_U8 u8Val);
905 
906 //-------------------------------------------------------------------------------------------------
907 /// Patch DTG color checker
908 /// @ingroup ACE_FEATURE
909 // @param  u8Mode                       \b IN: TBD
910 //-------------------------------------------------------------------------------------------------
911 void    MApi_XC_ACE_PatchDTGColorChecker( MS_U8 u8Mode);
912 
913 //-------------------------------------------------------------------------------------------------
914 /// Get ACE information
915 /// @ingroup ACE_Tobemodified
916 /// @param  bWindow                      \b IN: Indicates the window where the ACE function
917 ///                                              applies to, 0: Main Window, 1: Sub Window.
918 /// @param  eXCACEInfoType                \b IN: Specify the information type users interested in.
919 /// @return @ref MS_U16
920 //-------------------------------------------------------------------------------------------------
921 MS_U16  MApi_XC_ACE_GetACEInfo( MS_BOOL bWindow, E_XC_ACE_INFOTYPE eXCACEInfoType );
922 
923 //-------------------------------------------------------------------------------------------------
924 /// Get ACE extra information
925 /// @ingroup ACE_Tobemodified
926 /// @param  bWindow                      \b IN: Indicates the window where the ACE function
927 ///                                              applies to, 0: Main Window, 1: Sub Window.
928 /// @param  XC_ACE_InfoEx                \b OUT: Specify the extra information returned by driver.
929 //-------------------------------------------------------------------------------------------------
930 void MApi_XC_ACE_GetACEInfoEx( MS_BOOL bWindow, XC_ACE_InfoEx *pInfoEx);
931 
932 /********************************************************************************/
933 /*                   msAPI_ACE_Ext.c                   */
934 /********************************************************************************/
935 //-------------------------------------------------------------------------------------------------
936 /// Picture set contrast
937 /// @ingroup ACE_FEATURE
938 /// @param  eWindow                       \b IN: Indicates the window where the ACE function applies to.
939 /// @param  bUseYUVSpace                  \b IN: Use YUV format or RGB format.
940 /// @param  u8Contrast                    \b IN: Contrase value given by user.
941 //-------------------------------------------------------------------------------------------------
942 void    MApi_XC_ACE_PicSetContrast( MS_BOOL eWindow, MS_BOOL bUseYUVSpace, MS_U8 u8Contrast);
943 
944 //-------------------------------------------------------------------------------------------------
945 /// Picture set brightness
946 /// @ingroup ACE_Tobemodified
947 /// @param  u8Brightness_R                    \b IN: R value given by user.
948 /// @param  u8Brightness_G                    \b IN: G value given by user.
949 /// @param  u8Brightness_B                    \b IN: B value given by user.
950 //-------------------------------------------------------------------------------------------------
951 void    MApi_XC_ACE_PicSetBrightness( MS_BOOL eWindow, MS_U8 u8Brightness_R, MS_U8 u8Brightness_G, MS_U8 u8Brightness_B);
952 
953 //-------------------------------------------------------------------------------------------------
954 /// Picture set precise brightness
955 /// @ingroup ACE_Tobemodified
956 /// @param  u16Brightness_R                    \b IN: R value given by user.
957 /// @param  u16Brightness_G                    \b IN: G value given by user.
958 /// @param  u16Brightness_B                    \b IN: B value given by user.
959 //-------------------------------------------------------------------------------------------------
960 void MApi_XC_ACE_PicSetBrightnessPrecise(MS_BOOL eWindow, MS_U16 u16Brightness_R, MS_U16 u16Brightness_G, MS_U16 u16Brightness_B);
961 
962 //-------------------------------------------------------------------------------------------------
963 /// This function will set Pre Y Offset
964 /// @ingroup ACE_FEATURE
965 ///@param eWindow           \b IN: Window type
966 ///@param u8PreYOffset      \b IN: Pre Y Offset value
967 /// @return @ref E_XC_ACE_RESULT
968 //-------------------------------------------------------------------------------------------------
969 E_XC_ACE_RESULT MApi_XC_ACE_PicSetPreYOffset(MS_BOOL eWindow, MS_U8 u8PreYOffset);
970 
971 //-------------------------------------------------------------------------------------------------
972 /// This function will get Pre Y Offset
973 /// @ingroup ACE_FEATURE
974 ///@param eWindow           \b IN: Window type
975 /// @return @ref MS_U8
976 //-------------------------------------------------------------------------------------------------
977 MS_U8 MApi_XC_ACE_PicGetPreYOffset(MS_BOOL eWindow);
978 
979 //-------------------------------------------------------------------------------------------------
980 /// Picture set Hue
981 /// @ingroup ACE_FEATURE
982 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
983 /// @param  bUseYUVSpace             \b IN: Use YUV format or RGB format.
984 /// @param  u8Hue                    \b IN: Hue value given by user.
985 //-------------------------------------------------------------------------------------------------
986 void    MApi_XC_ACE_PicSetHue( MS_BOOL eWindow, MS_BOOL bUseYUVSpace, MS_U8 u8Hue );
987 
988 //-------------------------------------------------------------------------------------------------
989 /// Skip Wait Vsync
990 /// @ingroup ACE_FEATURE
991 /// @param eWindow               \b IN: Enable
992 /// @param Skip wait Vsync      \b IN: Disable wait Vsync
993 /// @return @ref E_XC_ACE_RESULT
994 //-------------------------------------------------------------------------------------------------
995 E_XC_ACE_RESULT MApi_XC_ACE_SkipWaitVsync( MS_BOOL eWindow,MS_BOOL bIsSkipWaitVsyn);
996 
997 //-------------------------------------------------------------------------------------------------
998 /// Picture set Saturation
999 /// @ingroup ACE_FEATURE
1000 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
1001 /// @param  bUseYUVSpace             \b IN: Use YUV format or RGB format.
1002 /// @param  u8Saturation             \b IN: Saturation value given by user.
1003 //-------------------------------------------------------------------------------------------------
1004 void    MApi_XC_ACE_PicSetSaturation(MS_BOOL eWindow, MS_BOOL bUseYUVSpace, MS_U8 u8Saturation );
1005 
1006 //-------------------------------------------------------------------------------------------------
1007 /// Adjust sharpness
1008 /// @ingroup ACE_FEATURE
1009 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
1010 /// @param u8Sharpness                \b IN: sharpness value : 0~0x3f
1011 //-------------------------------------------------------------------------------------------------
1012 void    MApi_XC_ACE_PicSetSharpness(  MS_BOOL eWindow, MS_U8 u8Sharpness );
1013 
1014 //-------------------------------------------------------------------------------------------------
1015 /// Picture set color temp.
1016 /// @ingroup ACE_ToBeModified
1017 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
1018 /// @param  bUseYUVSpace             \b IN: Use YUV format or RGB format.
1019 /// @param  pstColorTemp             \b IN: Color temp info given by user.
1020 //-------------------------------------------------------------------------------------------------
1021 void    MApi_XC_ACE_PicSetColorTemp( MS_BOOL eWindow, MS_BOOL bUseYUVSpace, XC_ACE_color_temp* pstColorTemp);
1022 
1023 //-------------------------------------------------------------------------------------------------
1024 /// Picture set color temp ex.
1025 /// @ingroup ACE_ToBeModified
1026 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
1027 /// @param  bUseYUVSpace             \b IN: Use YUV format or RGB format.
1028 /// @param  pstColorTemp             \b IN: Color temp info given by user.
1029 //-------------------------------------------------------------------------------------------------
1030 void    MApi_XC_ACE_PicSetColorTempEx( MS_BOOL eWindow, MS_BOOL bUseYUVSpace, XC_ACE_color_temp_ex* pstColorTemp);
1031 
1032 //-------------------------------------------------------------------------------------------------
1033 /// Picture set post color temp
1034 /// @ingroup ACE_ToBeModified
1035 /// V02. Change the fields in XC_ACE_color_temp_ex structure to MS_U16
1036 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
1037 /// @param  pstColorTemp             \b IN: Color temp info given by user.
1038 //-------------------------------------------------------------------------------------------------
1039 void MApi_XC_ACE_PicSetPostColorTemp_V02(MS_BOOL eWindow, XC_ACE_color_temp_ex2* pstColorTemp);
1040 
1041 #ifndef _API_XC_ACE_C_
1042 // Projects without ENABLE_NEW_COLORTEMP_METHOD defined will set ENABLE_NEW_COLORTEMP_METHOD to 0
1043 #ifndef ENABLE_NEW_COLORTEMP_METHOD
1044   #define ENABLE_NEW_COLORTEMP_METHOD 0
1045 #endif
1046 
1047 #ifndef ENABLE_PRECISE_RGBBRIGHTNESS
1048   #define ENABLE_PRECISE_RGBBRIGHTNESS 0
1049 #endif
1050 
1051 #if ENABLE_NEW_COLORTEMP_METHOD
1052     #if ENABLE_PRECISE_RGBBRIGHTNESS
1053         #define MApi_XC_ACE_PicSetColorTemp(x, y, z) MApi_XC_ACE_PicSetPostColorTemp2Ex(x, y, z)
1054     #else
1055         #define MApi_XC_ACE_PicSetColorTemp(x, y, z) MApi_XC_ACE_PicSetPostColorTemp2(x, y, z)
1056     #endif
1057 #else
1058     #if ENABLE_PRECISE_RGBBRIGHTNESS
1059         #define MApi_XC_ACE_PicSetColorTemp(x, y, z) MApi_XC_ACE_PicSetColorTempEx(x, y, z)
1060     #endif
1061 #endif
1062 
1063 #define MApi_XC_ACE_PicSetBrightnessInVsync(bWin, x, y, z) {MApi_XC_WaitOutputVSync(2, 100, bWin); MApi_XC_ACE_PicSetBrightness(bWin, x, y, z);}
1064 #define MApi_XC_ACE_PicSetBrightnessPreciseInVsync(bWin, x, y, z) {MApi_XC_WaitOutputVSync(2, 100, bWin); MApi_XC_ACE_PicSetBrightnessPrecise(bWin, x, y, z);}
1065 
1066 #endif
1067 
1068 //-------------------------------------------------------------------------------------------------
1069 /// Set Flesh tone
1070 /// @ingroup ACE_FEATURE
1071 /// @param  eWindow                  \b IN: Indicates the window where the ACE function applies to.
1072 /// @param  bEn                      \b IN: @ref MS_BOOL
1073 /// @param  u8FleshTone              \b IN: Flesh Tone Value
1074 //-------------------------------------------------------------------------------------------------
1075 void    MApi_XC_ACE_SetFleshTone(MS_BOOL eWindow, MS_BOOL bEn, MS_U8 u8FleshTone);
1076 
1077 //-------------------------------------------------------------------------------------------------
1078 /// black adjsutment
1079 /// @ingroup ACE_FEATURE
1080 /// @param  eWindow                           \b IN: window type.
1081 /// @param  u8BlackAdjust                     \b IN: adjust value given.
1082 //-------------------------------------------------------------------------------------------------
1083 void    MApi_XC_ACE_SetBlackAdjust(MS_BOOL eWindow, MS_U8 u8BlackAdjust);
1084 
1085 //-------------------------------------------------------------------------------------------------
1086 /// Set the IHC sram
1087 /// @ingroup ACE_FEATURE
1088 /// @param  pBuf                            \b IN: sram data
1089 /// @param  u16ByteSize                     \b IN: size of sram
1090 /// @return @ref MS_BOOL
1091 //-------------------------------------------------------------------------------------------------
1092 MS_BOOL MApi_XC_ACE_Set_IHC_SRAM(MS_U16 *pBuf, MS_U16 u16ByteSize);
1093 
1094 //-------------------------------------------------------------------------------------------------
1095 /// Set the ICC sram
1096 /// @ingroup ACE_FEATURE
1097 /// @param  pBuf                            \b IN: sram data
1098 /// @param  u16ByteSize                     \b IN: size of sram
1099 /// @return @ref MS_BOOL
1100 //-------------------------------------------------------------------------------------------------
1101 MS_BOOL MApi_XC_ACE_Set_ICC_SRAM(MS_U16 *pBuf, MS_U16 u16ByteSize);
1102 
1103 /********************************************************************************/
1104 /*                  MWE function                  */
1105 /********************************************************************************/
1106 
1107 //-------------------------------------------------------------------------------------------------
1108 /// Enable MWE
1109 /// @ingroup ACE_FEATURE
1110 /// @param  bEnable                     \b IN: @ref MS_BOOL
1111 //-------------------------------------------------------------------------------------------------
1112 void    MApi_XC_ACE_EnableMWE(MS_BOOL bEnable);
1113 
1114 //-------------------------------------------------------------------------------------------------
1115 /// MWE Clone Main Window Visual Effect
1116 /// @ingroup ACE_FEATURE
1117 //-------------------------------------------------------------------------------------------------
1118 void MApi_XC_ACE_MWECloneVisualEffect(void);
1119 
1120 //-------------------------------------------------------------------------------------------------
1121 /// MWE Apply Visual Effect From Reg Table
1122 /// @ingroup ACE_FEATURE
1123 /// @param  pMWETable                 \b IN: MWE table
1124 /// @return @ref MS_BOOL
1125 //-------------------------------------------------------------------------------------------------
1126 MS_BOOL MApi_XC_ACE_MWESetRegTable(XC_ACE_TAB_Info *pMWETable);
1127 
1128 //-------------------------------------------------------------------------------------------------
1129 /// Flag for MWE Visual Effect Coming From Reg Table
1130 /// @ingroup ACE_FEATURE
1131 /// @param  bEnable                     \b IN: @ref MS_BOOL
1132 /// @return @ref MS_BOOL
1133 //-------------------------------------------------------------------------------------------------
1134 MS_BOOL MApi_XC_ACE_SetMWELoadFromPQ(MS_BOOL bEnable);
1135 
1136 //-------------------------------------------------------------------------------------------------
1137 /// MWE status
1138 /// @ingroup ACE_INFO
1139 /// @return @ref MS_BOOL
1140 //-------------------------------------------------------------------------------------------------
1141 MS_BOOL MApi_XC_ACE_MWEStatus(void);
1142 
1143 //-------------------------------------------------------------------------------------------------
1144 /// MWE Handle
1145 /// @ingroup ACE_FEATURE
1146 //-------------------------------------------------------------------------------------------------
1147 void    MApi_XC_ACE_MWEHandle( void );
1148 
1149 //-------------------------------------------------------------------------------------------------
1150 /// MWE function selection
1151 /// @ingroup ACE_FEATURE
1152 /// @param  eWindow                 \b IN: Indicates the window where the ACE function applies to.
1153 /// @param  mwe_func                     \b IN: @ref E_XC_ACE_MWE_FUNC
1154 //-------------------------------------------------------------------------------------------------
1155 void    MApi_XC_ACE_MWEFuncSel( MS_BOOL eWindow, E_XC_ACE_MWE_FUNC  mwe_func);
1156 
1157 //-------------------------------------------------------------------------------------------------
1158 /// MWE set display window
1159 /// @ingroup ACE_FEATURE
1160 /// @param  u16MWE_Disp_Hstart             \b IN: Horizotal position of start point. 0:means leftest position.
1161 /// @param  u16MWE_Disp_Vstart             \b IN: Vertical position of start point, 0: mean up most position.
1162 /// @param  u16MWE_Disp_Width              \b IN: Width of display window.
1163 /// @param  u16MWE_Disp_Height             \b IN: Height of display winodw.
1164 //-------------------------------------------------------------------------------------------------
1165 void    MApi_XC_ACE_MWESetDispWin(MS_U16 u16MWE_Disp_Hstart, MS_U16 u16MWE_Disp_Vstart, MS_U16 u16MWE_Disp_Width, MS_U16 u16MWE_Disp_Height);
1166 
1167 //-------------------------------------------------------------------------------------------------
1168 /// 3D clone main and sub window's PQmap
1169 /// @ingroup ACE_FEATURE
1170 /// @param  enWeaveType             \b IN: Output WeaveType
1171 //-------------------------------------------------------------------------------------------------
1172 void MApi_XC_ACE_3DClonePQMap(XC_ACE_WEAVETYPE enWeaveType);
1173 
1174 /********************************************************************************/
1175 /*                  DynamicNR function                                          */
1176 /********************************************************************************/
1177 
1178 //-------------------------------------------------------------------------------------------------
1179 /// DNR Blending NR table
1180 /// @ingroup ACE_ToBeModified
1181 /// @param  pu8NewNR              \b IN: new NR target values.
1182 /// @param  u8Weight              \b IN: Blending weighting.
1183 /// @param  u8Step                \b IN: maxmium step size.
1184 /// @param  pu16PreY0             \b IN: previous NR value 0.
1185 /// @param  pu16PreY1             \b IN: previous NR value 1.
1186 /// @param  pu8NRTBL              \b OUT: The new NR Table.
1187 //-------------------------------------------------------------------------------------------------
1188 void   MApi_XC_ACE_DNR_Blending_NRTbl(MS_U8 *pu8NewNR, MS_U8 u8Weight, MS_U8 u8Step, MS_U16 *pu16PreY0, MS_U16 *pu16PreY1, MS_U8 *pu8NRTBL);
1189 
1190 //-------------------------------------------------------------------------------------------------
1191 /// DNR Blending MISC
1192 /// @ingroup ACE_ToBeModified
1193 /// @param  u8NewItem              \b IN: New DNR blending target value.
1194 /// @param  u16PreItem             \b IN: previous value.
1195 /// @param  u8Weight               \b IN: Blending weighting.
1196 /// @param  u8Step                 \b IN: Maxmium step size.
1197 /// @return @ref MS_U16           \b return new DNR blending value.
1198 //-------------------------------------------------------------------------------------------------
1199 MS_U16 MApi_XC_ACE_DNR_Blending_MISC(MS_U8 u8NewItem, MS_U16 u16PreItem, MS_U8 u8Weight, MS_U8 u8Step);
1200 
1201 //-------------------------------------------------------------------------------------------------
1202 /// DNR Blending
1203 /// @ingroup ACE_ToBeModified
1204 /// @param  u8NewItem              \b IN: New DNR blending target value.
1205 /// @param  u16PreItem             \b IN: previous value.
1206 /// @param  u8Weight               \b IN: Blending weighting.
1207 /// @return @ref MS_U8           \b return new DNR blending value.
1208 //-------------------------------------------------------------------------------------------------
1209 MS_U8  MApi_XC_ACE_DNR_Blending(MS_U8 u8NewItem, MS_U16 u16PreItem, MS_U8 u8Weight);
1210 
1211 //-------------------------------------------------------------------------------------------------
1212 /// DNR get precision shift
1213 /// @ingroup ACE_FEATURE
1214 /// @return @ref MS_U16           \b return shift value.
1215 //-------------------------------------------------------------------------------------------------
1216 MS_U16 MApi_XC_ACE_DNR_Get_PrecisionShift(void);
1217 
1218 //-------------------------------------------------------------------------------------------------
1219 /// DNR get motion weight
1220 /// @ingroup ACE_FEATURE
1221 /// @param  u8CurMotion                 \b IN: current motion value
1222 /// @param  u8PreMotion                 \b IN: previous motion value
1223 /// @param  u8CurMotionLvl              \b IN: current motion catalog-level
1224 /// @param  u8PreMotionLvl              \b IN: previous motion catalog-level
1225 /// @param  u8DeFlick_Thre              \b IN: de-flick threshold.
1226 /// @param  u8DeFilick_Step             \b IN: de-flick step size.
1227 /// @return @ref MS_U8                    \b Return motion weight
1228 //-------------------------------------------------------------------------------------------------
1229 MS_U8  MApi_XC_ACE_DNR_GetMotion_Weight(MS_U8 u8CurMotion, MS_U8 u8PreMotion, MS_U8 u8CurMotionLvl, MS_U8 u8PreMotionLvl, MS_U8 u8DeFlick_Thre, MS_U8 u8DeFilick_Step);
1230 
1231 //-------------------------------------------------------------------------------------------------
1232 /// DNR get Luma weight
1233 /// @ingroup ACE_FEATURE
1234 /// @param  u8CurAvgLuma                 \b IN: current avergae luma
1235 /// @param  u8PreAvgLuam                 \b IN: previous average luma
1236 /// @param  u8CurLumaLvl                 \b IN: current avergae luma catalog-level
1237 /// @param  u8PreLumaLvl                 \b IN: previous avergae luma catalog-level
1238 /// @param  u8DeFlick_Th                 \b IN: de-flick threshold.
1239 /// @param  u8DeFlick_Step               \b IN: de-flick step size.
1240 /// @return @ref MS_U8                    \b Return luma weight
1241 //-------------------------------------------------------------------------------------------------
1242 MS_U8  MApi_XC_ACE_DNR_GetLuma_Weight(MS_U8 u8CurAvgLuma, MS_U8 u8PreAvgLuam, MS_U8 u8CurLumaLvl, MS_U8 u8PreLumaLvl, MS_U8 u8DeFlick_Th,  MS_U8 u8DeFlick_Step);
1243 
1244 //-------------------------------------------------------------------------------------------------
1245 /// DNR get noise weight
1246 /// @ingroup ACE_FEATURE
1247 /// @param  u8CurNoise                 \b IN: current noise.
1248 /// @param  u8PreNoise                 \b IN: previous noise.
1249 /// @param  u8Range                    \b IN: noise threshold, if difference between PreNoise and
1250 ///                                          CurNoise > this value, then the stable status is down
1251 ///                                          -grade for 1 degree.
1252 /// @param  u8DeFlick_Th              \b IN: de-flick threshold.
1253 /// @param  u8DeFlick_Step            \b IN: de-flick step size.
1254 /// @return @ref MS_U8                 \b Return  Noise weighting value.
1255 //-------------------------------------------------------------------------------------------------
1256 MS_U8  MApi_XC_ACE_DNR_GetNoise_Weight(MS_U8 u8CurNoise, MS_U8 u8PreNoise, MS_U8 u8Range, MS_U8 u8DeFlick_Th, MS_U8 u8DeFlick_Step);
1257 
1258 //-------------------------------------------------------------------------------------------------
1259 /// DNR get motion degree, lower one means its more like a still video.
1260 /// @ingroup ACE_FEATURE
1261 /// @return @ref MS_U8                    \b Return motion degree value.
1262 //-------------------------------------------------------------------------------------------------
1263 MS_U8  MApi_XC_ACE_DNR_GetMotion(void);
1264 
1265 //-------------------------------------------------------------------------------------------------
1266 /// DNR init motion
1267 /// @ingroup ACE_INIT
1268 //-------------------------------------------------------------------------------------------------
1269 void   MApi_XC_ACE_DNR_Init_Motion(void);
1270 
1271 //-------------------------------------------------------------------------------------------------
1272 /// DNR init luma
1273 /// @ingroup ACE_INIT
1274 //-------------------------------------------------------------------------------------------------
1275 void   MApi_XC_ACE_DNR_Init_Luma(void);
1276 
1277 //-------------------------------------------------------------------------------------------------
1278 /// DNR init noise
1279 /// @ingroup ACE_INIT
1280 //-------------------------------------------------------------------------------------------------
1281 void   MApi_XC_ACE_DNR_Init_Noise(void);
1282 
1283 //-------------------------------------------------------------------------------------------------
1284 /// Set parameter of a DNR item specified by user.
1285 /// @ingroup ACE_FEATURE
1286 /// @param  eWindow                 \b IN: Indicates the window where the ACE function applies to.
1287 /// @param  eParam                 \b IN: @ref XC_ACE_DNR_Param
1288 /// @param  u16val                 \b IN: Setting value of DNR item.
1289 //-------------------------------------------------------------------------------------------------
1290 void   MApi_XC_ACE_DNR_SetParam(MS_BOOL eWindow, XC_ACE_DNR_Param eParam, MS_U16 u16val);
1291 
1292 //-------------------------------------------------------------------------------------------------
1293 /// Set Set HDR Init
1294 /// @ingroup ACE_FEATURE
1295 // @param  pstACE_HDRInitData             \b IN: HDR Init Info
1296 //-------------------------------------------------------------------------------------------------
1297 MS_BOOL SYMBOL_WEAK MApi_XC_ACE_SetHDRInit(XC_ACE_HDRinit *pstACE_HDRInitData);
1298 
1299 //-------------------------------------------------------------------------------------------------
1300 /// Set Contrast by Gamma Table
1301 // @param  bEnable             \b IN: enable contrast by gamma table or not
1302 // @param  u8Contrast             \b IN: contrast value
1303 // @param  u8BaseValue             \b IN: base value for the slope of luma mapping table, defualt value is 128
1304 //-------------------------------------------------------------------------------------------------
1305 void SYMBOL_WEAK MApi_XC_ACE_SetContrastByGammaTable(MS_BOOL bScalerWin, MS_BOOL bEnable, MS_U8 u8Contrast, MS_U8 u8BaseValue);
1306 
1307 //-------------------------------------------------------------------------------------------------
1308 /// Get parameter of a DNR item specified by user.
1309 /// @ingroup ACE_FEATURE
1310 /// @param  eWindow                 \b IN: Indicates the window where the ACE function applies to.
1311 /// @param  eParam                 \b IN: @ref XC_ACE_DNR_Param
1312 /// @return @ref MS_U8
1313 //-------------------------------------------------------------------------------------------------
1314 MS_U8  MApi_XC_ACE_DNR_GetParam(MS_BOOL eWindow, XC_ACE_DNR_Param eParam);
1315 
1316 //-------------------------------------------------------------------------------------------------
1317 /// Set NR table
1318 /// @ingroup ACE_FEATURE
1319 /// @param  pu8Tbl                 \b IN: NR table given by user.
1320 //-------------------------------------------------------------------------------------------------
1321 void   MApi_XC_ACE_DNR_SetNRTbl(MS_U8 *pu8Tbl);
1322 
1323 // must have functions
1324 //-------------------------------------------------------------------------------------------------
1325 /// Get version (without Mutex protect)
1326 /// @ingroup ACE_INFO
1327 /// @param  ppVersion                 \b OUT: Version information of ACE lib.
1328 /// @return @ref E_XC_ACE_RESULT
1329 //-------------------------------------------------------------------------------------------------
1330 E_XC_ACE_RESULT MApi_XC_ACE_GetLibVer(const MSIF_Version **ppVersion);
1331 
1332 //-------------------------------------------------------------------------------------------------
1333 /// Get info from driver (without Mutex protect)
1334 /// @ingroup ACE_INFO
1335 /// @return XC_ACE_ApiInfo
1336 //-------------------------------------------------------------------------------------------------
1337 const XC_ACE_ApiInfo * MApi_XC_ACE_GetInfo(void);
1338 
1339 //-------------------------------------------------------------------------------------------------
1340 /// Get panel current status
1341 /// @ingroup ACE_INFO
1342 /// @param  pDrvStatus                 \b IN: @ref XC_ACE_ApiStatus
1343 /// @param  bWindow                    \b IN: Indicates the window where the ACE function
1344 ///                                           applies to, 0: Main Window, 1: Sub Window.
1345 /// @return @ref MS_BOOL
1346 //-------------------------------------------------------------------------------------------------
1347 MS_BOOL MApi_XC_ACE_GetStatus(XC_ACE_ApiStatus *pDrvStatus, MS_BOOL bWindow);
1348 
1349 //-------------------------------------------------------------------------------------------------
1350 /// Set debug level (without Mutex protect)
1351 /// @ingroup ACE_INFO
1352 /// @param  u16DbgSwitch                 \b IN: debug switch value, use TRUE/FALSE to turn on/off.
1353 /// @return @ref MS_BOOL
1354 //-------------------------------------------------------------------------------------------------
1355 MS_BOOL MApi_XC_ACE_SetDbgLevel(MS_U16 u16DbgSwitch);
1356 
1357 //-------------------------------------------------------------------------------------------------
1358 /// Set Color correction table
1359 /// @ingroup ACE_FEATURE
1360 /// @param  u16DbgSwitch                 \b IN: debug switch value, use TRUE/FALSE to turn on/off.
1361 //-------------------------------------------------------------------------------------------------
1362 void MApi_XC_ACE_ColorCorrectionTable( MS_BOOL bScalerWin, MS_S16 *psColorCorrectionTable );
1363 
1364 //-------------------------------------------------------------------------------------------------
1365 /// Set Color Matrix
1366 /// @ingroup ACE_FEATURE
1367 /// @param  u16DbgSwitch                 \b IN: debug switch value, use TRUE/FALSE to turn on/off.
1368 //-------------------------------------------------------------------------------------------------
1369 void MApi_XC_ACE_SetColorMatrixControl( MS_BOOL bScalerWin, MS_BOOL bEnable );
1370 
1371 //-------------------------------------------------------------------------------------------------
1372 /// Set RG channel range
1373 /// @ingroup ACE_FEATURE
1374 /// @param  u16DbgSwitch                 \b IN: debug switch value, use TRUE/FALSE to turn on/off.
1375 //-------------------------------------------------------------------------------------------------
1376 void MApi_XC_ACE_SetRBChannelRange( MS_BOOL bScalerWin, MS_BOOL bRange );
1377 
1378 //-------------------------------------------------------------------------------------------------
1379 /// Ace power state control for fastboot
1380 /// @ingroup ACE_INIT
1381 /// @param  u16PowerState                 \b IN: power state
1382 /// @return @ref MS_U32                    \b Return  result of power state control.
1383 //-------------------------------------------------------------------------------------------------
1384 MS_U32 MApi_XC_ACE_SetPowerState(EN_POWER_MODE enPowerState);
1385 
1386 //////////////////////////////////////////////
1387 // Below functions are obosolted ! Please do not use them if you do not use them yet.
1388 //////////////////////////////////////////////
1389 
1390 //-------------------------------------------------------------------------------------------------
1391 ///-obosolte!! use MApi_XC_ACE_PicSetPostColorTemp_V02 instead
1392 /// @ingroup ACE_ToBeRemove
1393 //-------------------------------------------------------------------------------------------------
1394 void MApi_XC_ACE_PicSetPostColorTemp(MS_BOOL eWindow, XC_ACE_color_temp* pstColorTemp);
1395 
1396 //-------------------------------------------------------------------------------------------------
1397 ///-obosolte!! use MApi_XC_ACE_PicSetPostColorTemp_V02 instead
1398 /// @ingroup ACE_ToBeRemove
1399 //-------------------------------------------------------------------------------------------------
1400 void MApi_XC_ACE_PicSetPostColorTempEx(MS_BOOL eWindow, XC_ACE_color_temp_ex* pstColorTemp);
1401 
1402 //-------------------------------------------------------------------------------------------------
1403 ///-obosolte!! use MApi_XC_ACE_PicSetPostColorTempWithBypassACESetting instead
1404 /// @ingroup ACE_ToBeRemove
1405 //-------------------------------------------------------------------------------------------------
1406 void MApi_XC_ACE_PicSetPostColorTemp2(MS_BOOL eWindow, MS_BOOL bUseYUVSpace, XC_ACE_color_temp* pstColorTemp);
1407 
1408 //*************************************************************************
1409 ///-obosolte!! Please bypass color temp by using MApi_XC_ACE_PicSetColorTemp and then set post color temp by using MApi_XC_ACE_PicSetPostColorTemp_V02
1410 /// @ingroup ACE_ToBeRemove
1411 //*************************************************************************
1412 void MApi_XC_ACE_PicSetPostColorTemp2Ex(MS_BOOL eWindow, MS_BOOL bUseYUVSpace, XC_ACE_color_temp_ex* pstColorTemp);
1413 
1414 
1415 
1416 #ifdef __cplusplus
1417 }
1418 #endif
1419 
1420 #endif // _API_XC_ACE_H_
1421 
1422