xref: /utopia/UTPA2-700.0.x/projects/tmplib/include/apiXC_DWIN.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 /// @file   apiXC_DWIN.h
97 /// @brief  MStar XC_DWIN Driver Interface
98 /// @author MStar Semiconductor Inc.
99 /// @version 1.0
100 ///////////////////////////////////////////////////////////////////////////////
101 
102 //-------------------------------------------------
103 /*! \defgroup Video Video modules
104 
105     * \defgroup XC_DWIN XC_DWIN interface
106     * \ingroup Video
107 
108     DIP is a video capture function ,the whole function block separate four part,source select, clip window, HV scaling down , output window.\n
109 
110     <b> Fucntion block </b> \n
111     \image html apiXC_DWIN_pic1.png
112 
113     <b> Source select </b> \n
114     \image html apiXC_DWIN_pic3.png
115 
116     <b> Clip window , HV scaling down , output window</b> \n
117     \image html apiXC_DWIN_pic4.png
118 
119     <b> API call flow  </b> \n
120     \image html apiXC_DWIN_pic2.png
121 
122     * \defgroup DIP_INIT DIP init related functions
123     * \ingroup   XC_DWIN
124 
125     * \defgroup DIP_RESOURCE DIP resource related functions
126     * \ingroup   XC_DWIN
127 
128     * \defgroup DIP_SET_WINDOW DIP set window related functions
129     * \ingroup   XC_DWIN
130 
131     * \defgroup DIP_SET_PROPERTY DIP set properity related functions
132     * \ingroup   XC_DWIN
133 
134     * \defgroup DIP_SET_COLOR_TRANSFORM  DIP set color transform properity functions
135     * \ingroup   XC_DWIN
136 
137     * \defgroup DIP_SET_WINPROPERTY DIP set window properity related functions
138     * \ingroup   XC_DWIN
139 
140     * \defgroup DIP_INTERRUPT DIP interrupt related functions
141     * \ingroup   XC_DWIN
142 
143     * \defgroup DIP_TRIGGER DIP trigger related functions
144     * \ingroup   XC_DWIN
145 
146     * \defgroup DIP_GET_BUFINFO DIP get info related functions
147     * \ingroup   XC_DWIN
148 
149     * \defgroup DIP_POWER_STATE DIP suspend and resume related functions
150     * \ingroup   XC_DWIN
151 
152     * \defgroup DIP_ToBeRemove DIP api to be removed
153     * \ingroup   XC_DWIN
154 
155   */
156 //-------------------------------------------------
157 
158 
159 
160 
161 #ifndef APIXC_DWIN_H
162 #define APIXC_DWIN_H
163 #ifdef __cplusplus
164 extern "C"
165 {
166 #endif
167 #include "MsCommon.h"
168 //#include "mvideo_context.h"
169 //==============================================================================
170 
171 #include "ULog.h"
172 
173 // Debug Logs, level form low(INFO) to high(FATAL, always show)
174 // Function information, ex function entry
175 #define XC_INFO(x, args...) ULOGI("DIP API", x, ##args)
176 // Warning, illegal paramter but can be self fixed in functions
177 #define XC_WARN(x, args...) ULOGW("DIP API", x, ##args)
178 //  Need debug, illegal paramter.
179 #define XC_DBUG(x, args...) ULOGD("DIP API", x, ##args)
180 // Error, function will be terminated but system not crash
181 #define XC_ERR(x, args...) ULOGE("DIP API", x, ##args)
182 // Critical, system crash. (ex. assert)
183 #define XC_FATAL(x, args...) ULOGF("DIP API", x, ##args)
184 
185 //==============================================================================
186 #define MAX_BUFF_CNT 8UL
187 #define AUTO_BUFF_CNT 0UL
188 /// Define window type for DIP
189 typedef enum
190 {
191     DIP_WINDOW = 0,         ///< DIP window
192     DWIN0_WINDOW = 1,
193     DWIN1_WINDOW = 2,
194     MAX_DIP_WINDOW          /// The max support window
195 }SCALER_DIP_WIN;
196 
197 typedef enum
198 {
199     E_XC_DIP_RGB_SWAPTO_BGR = 0,         ///< RGB Swap to BGR
200     E_XC_DIP_RGB_SWAP_MAX                ///< The max support format
201 }EN_XC_DIP_RGB_SWAP_TYPE;
202 
203 /// DIP source data format
204 typedef enum
205 {
206     /// YCrYCb.
207     DIP_DATA_FMT_YUV422 = 0,
208     /// RGB domain
209     DIP_DATA_FMT_RGB565,
210     /// RGB domain
211     DIP_DATA_FMT_ARGB8888,
212     /// YUV420 HVD tile
213     DIP_DATA_FMT_YUV420,
214     /// YC separate 422
215     DIP_DATA_FMT_YC422,
216     /// YUV420 H265 tile
217     DIP_DATA_FMT_YUV420_H265,
218     /// YUV420 H265_10bits tile
219     DIP_DATA_FMT_YUV420_H265_10BITS,
220     /// YUV420 planer
221     DIP_DATA_FMT_YUV420_PLANER,
222     /// YUV420 semi planer
223     DIP_DATA_FMT_YUV420_SEMI_PLANER,
224     DIP_DATA_FMT_MAX
225 } EN_XC_DIP_DATA_FMT;
226 
227 /// DIP tile block
228 typedef enum
229 {
230     DIP_TILE_BLOCK_R_NONE  = 0x0,
231     DIP_TILE_BLOCK_W_NONE  = 0x1,
232     DIP_TILE_BLOCK_R_16_32 = 0x2,
233     DIP_TILE_BLOCK_W_16_32 = 0x3,
234     DIP_TILE_BLOCK_R_32_16 = 0x4,
235     DIP_TILE_BLOCK_W_32_16 = 0x5,
236     DIP_TILE_BLOCK_R_32_32 = 0x6,
237     DIP_TILE_BLOCK_W_32_32 = 0x7,
238 }EN_XC_DIP_TILE_BLOCK;
239 /// DIP scan mode
240 typedef enum
241 {
242     /// progessive.
243     DIP_SCAN_MODE_PROGRESSIVE,
244     /// interlace.
245     DIP_SCAN_MODE_extern,
246 } EN_XC_DIP_SCAN_MODE;
247 
248 typedef enum
249 {
250     DIP_CAP_NOT_EXIST = 0x0,
251     DIP_CAP_EXIST =     0x1,
252     DIP_CAP_420TILE =   0x2,
253     DIP_CAP_SCALING_DOWN =   0x4,
254     DIP_CAP_MIRROR =    0x8,
255     DIP_CAP_DIPR    =   0x10,
256     DIP_CAP_R2Y     =   0x20,
257     DIP_CAP_OP1_CAPTURE    = 0x40,
258     //not support OP1 capture when traveling main source with PIP mode
259     DIP_CAP_OP1_CAPTURE_V1 = 0x40,
260     //support OP1 capture in all case
261     DIP_CAP_OP1_CAPTURE_V2 = 0x80,
262     DIP_CAP_SCALING_UP = 0x100,
263     DIP_CAP_OSD_BLENDING = 0x200,
264     DIP_CAP_OC_CAPTURE = 0x400,
265     DIP_CAP_SC2_NON_SCALING = 0x800,
266 }EN_XC_DIP_CAP;
267 
268 typedef enum
269 {
270     E_XC_DIP_VOP2   =0x00,
271     E_XC_DIP_OP2    =0x01,
272     E_XC_DIP_VIP    =0x02,
273     E_XC_DIP_BRI    =0x03,
274     E_XC_DIP_NONE   ,
275 }EN_XC_DIP_OP_CAPTURE;
276 
277 typedef enum
278 {
279     E_XC_DIP_ROTATION_270   =0x00,
280     E_XC_DIP_ROTATION_90    =0x01,
281 }EN_XC_DIP_ROTATION;
282 
283 typedef struct
284 {
285     MS_U8               u8BufCnt;
286     MS_PHY              u32YBuf[MAX_BUFF_CNT];
287     MS_PHY              u32CBuf[MAX_BUFF_CNT];
288 } BUFFER_INFO;
289 
290 typedef struct
291 {
292     SCALER_DIP_WIN      eWindow;
293     MS_U32              u32DipChipCaps;
294 } ST_XC_DIP_CHIPCAPS;
295 
296 typedef struct
297 {
298     MS_U8  u8BufCnt;
299     MS_U16 u16Width;
300     MS_U16 u16Height;
301     MS_U16 u16Pitch;
302     MS_PHY u32BufStart;
303     MS_PHY u32BufEnd;
304     SCALER_DIP_SOURCE_TYPE enSource;
305 }ST_XC_DIP_WINPROPERTY;
306 
307 typedef struct
308 {
309     MS_U16 u16Width;
310     MS_U16 u16Height;
311     MS_U16 u16Pitch;
312     MS_PHY u32YBufAddr;
313     MS_PHY u32CBufAddr;
314     EN_XC_DIP_DATA_FMT enDataFmt;
315     MS_PHY u32YBufAddr10Bits;
316     MS_PHY u32CBufAddr10Bits;
317 }ST_XC_DIPR_PROPERTY;
318 
319 //-----------------
320 // DIP_RESOURCE
321 //-----------------
322 //-------------------------------------------------------------------------------------------------
323 /// Query DIP resource avaliable or not
324 /// @ingroup DIP_RESOURCE
325 /// @param  eWindow             \b IN: DIP number
326 /// @return E_APIXC_RET_OK      - Success
327 /// @return E_APIXC_RET_FAIL    - Failure
328 //-------------------------------------------------------------------------------------------------
329 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_QueryResource(SCALER_DIP_WIN eWindow);
330 
331 
332 //-------------------------------------------------------------------------------------------------
333 /// Get DIP resource
334 /// @ingroup DIP_RESOURCE
335 /// @param  eWindow             \b IN: DIP number
336 /// @return E_APIXC_RET_OK      - Success
337 /// @return E_APIXC_RET_FAIL    - Failure
338 //-------------------------------------------------------------------------------------------------
339 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_GetResource(SCALER_DIP_WIN eWindow);
340 
341 
342 //-------------------------------------------------------------------------------------------------
343 /// Release DIP resource
344 /// @ingroup DIP_RESOURCE
345 /// @param  eWindow             \b IN: DIP number
346 /// @return E_APIXC_RET_OK      - Success
347 /// @return E_APIXC_RET_FAIL    - Failure
348 //-------------------------------------------------------------------------------------------------
349 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_ReleaseResource(SCALER_DIP_WIN eWindow);
350 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_InitByDIP(SCALER_DIP_WIN eWindow);
351 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetFrameBufferAddress(MS_PHY u32FBAddress, MS_PHY u32FBSize, SCALER_DIP_WIN eWindow);
352 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetInputSource(INPUT_SOURCE_TYPE_t enInputSourceType, SCALER_DIP_WIN eWindow);
353 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_GetInputSource(INPUT_SOURCE_TYPE_t *enInputSourceType, SCALER_DIP_WIN eWindow);
354 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_DisableInputSource(MS_BOOL bDisable, SCALER_DIP_WIN eWindow);
355 //-----------------
356 // DIP_SET_WINDOW
357 //-----------------
358 //-------------------------------------------------------------------------------------------------
359 /// Set DIP Clip and Scaling window
360 /// @ingroup DIP_SET_WINDOW
361 /// @param  pstXC_SetWin_Info   \b IN: Clip and Scaling window
362 /// @param  u32InitDataLen      \b IN: size of XC_SETWIN_INFO
363 /// @param  eWindow             \b IN: DIP number
364 /// @return E_APIXC_RET_OK      - Success
365 /// @return E_APIXC_RET_FAIL    - Failure
366 //-------------------------------------------------------------------------------------------------
367 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetWindow(XC_SETWIN_INFO *pstXC_SetWin_Info, MS_U32 u32InitDataLen, SCALER_DIP_WIN eWindow);
368 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_GetDEWindow(MS_WINDOW_TYPE *psWin, SCALER_DIP_WIN eWindow);
369 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetCaptureWindowVstart(MS_U16 u16Vstart, SCALER_DIP_WIN eWindow);
370 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetCaptureWindowHstart(MS_U16 u16Hstart, SCALER_DIP_WIN eWindow);
371 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetCaptureWindowVsize(MS_U16 u16Vsize, SCALER_DIP_WIN eWindow);
372 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetCaptureWindowHsize(MS_U16 u16Hsize, SCALER_DIP_WIN eWindow);
373 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_GetCaptureWindow(MS_WINDOW_TYPE* capture_win, SCALER_DIP_WIN eWindow);
374 //-----------------
375 // DIP_SET_COLOR_TRANSFORM
376 //-----------------
377 //-------------------------------------------------------------------------------------------------
378 /// Emable DIP RGB->YUV
379 /// @ingroup DIP_SET_COLOR_TRANSFORM
380 /// @param  benable             \b IN: Enable/Disable
381 /// @param  eWindow             \b IN: DIP number
382 /// @return E_APIXC_RET_OK      - Success
383 /// @return E_APIXC_RET_FAIL    - Failure
384 //-------------------------------------------------------------------------------------------------
385 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_EnableR2Y(MS_BOOL benable, SCALER_DIP_WIN eWindow);
386 
387 //==============Set===================
388 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SWReset(SCALER_DIP_WIN eWindow);
389 //-----------------
390 // DIP_SET_PROPERTY
391 //-----------------
392 //-------------------------------------------------------------------------------------------------
393 /// Set DIP frame rate control
394 /// @ingroup DIP_SET_PROPERTY
395 /// @param  benable             \b IN: Enable/Disable
396 /// @param  u16In               \b IN: input frame
397 /// @param  u16Out              \b IN: output frame
398 /// @param  eWindow             \b IN: DIP number
399 /// @return E_APIXC_RET_OK      - Success
400 /// @return E_APIXC_RET_FAIL    - Failure
401 //-------------------------------------------------------------------------------------------------
402 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_FrameRateCtrl(MS_BOOL bEnable,MS_U16 u16In,MS_U16 u16Out, SCALER_DIP_WIN eWindow);
403 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_CapOneFrame(SCALER_DIP_WIN eWindow);
404 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_CapOneFrameFast(SCALER_DIP_WIN eWindow);
405 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_ClearInt(MS_U16 u8mask, SCALER_DIP_WIN eWindow);
406 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_Ena(MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
407 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_EnaInt(MS_U16 u8mask, MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
408 //-------------------------------------------------------------------------------------------------
409 /// Tell DIP source is interlace or progressive
410 /// @ingroup DIP_SET_PROPERTY
411 /// @param  enScanMode          \b IN: interlace or progressive
412 /// @param  eWindow             \b IN: DIP number
413 /// @return E_APIXC_RET_OK      - Success
414 /// @return E_APIXC_RET_FAIL    - Failure
415 //-------------------------------------------------------------------------------------------------
416 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetSourceScanType(EN_XC_DIP_SCAN_MODE enScanMode, SCALER_DIP_WIN eWindow);
417 
418 
419 //-------------------------------------------------------------------------------------------------
420 /// Enable DIP write from interlace to progressive
421 /// @ingroup DIP_SET_PROPERTY
422 /// @param  bEnable             \b IN: Enable/Disable
423 /// @param  eWindow             \b IN: DIP number
424 /// @return E_APIXC_RET_OK      - Success
425 /// @return E_APIXC_RET_FAIL    - Failure
426 //-------------------------------------------------------------------------------------------------
427 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_EnaInterlaceWrite(MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
428 
429 
430 //-------------------------------------------------------------------------------------------------
431 /// Set DIP output format
432 /// @ingroup DIP_SET_PROPERTY
433 /// @param  fmt                 \b IN: output format
434 /// @param  eWindow             \b IN: DIP number
435 /// @return E_APIXC_RET_OK      - Success
436 /// @return E_APIXC_RET_FAIL    - Failure
437 //-------------------------------------------------------------------------------------------------
438 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetOutputDataFmt(EN_XC_DIP_DATA_FMT fmt, SCALER_DIP_WIN eWindow);
439 //-----------------
440 // DIP_SET_WINPROPERTY
441 //-----------------
442 //-------------------------------------------------------------------------------------------------
443 /// Set DIP input and output infomation
444 /// @ingroup DIP_SET_WINPROPERTY
445 /// @param  pstDIPWinProperty   \b IN: input and output infomation
446 /// @param  eWindow             \b IN: DIP number
447 /// @return E_APIXC_RET_OK      - Success
448 /// @return E_APIXC_RET_FAIL    - Failure
449 //-------------------------------------------------------------------------------------------------
450 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetDIPWinProperty(ST_XC_DIP_WINPROPERTY *pstDIPWinProperty, SCALER_DIP_WIN eWindow);
451 //-------------------------------------------------------------------------------------------------
452 /// Emable DIP YUV->RGB
453 /// @ingroup DIP_SET_COLOR_TRANSFORM
454 /// @param  benable             \b IN: Enable/Disable
455 /// @param  eWindow             \b IN: DIP number
456 /// @return E_APIXC_RET_OK      - Success
457 /// @return E_APIXC_RET_FAIL    - Failure
458 //-------------------------------------------------------------------------------------------------
459 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_EnableY2R(MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
460 //-------------------------------------------------------------------------------------------------
461 /// Set DIP alpha value
462 /// @ingroup DIP_SET_PROPERTY_COLOR_TRANSFORM
463 /// @param  u8AlphaVal          \b IN: alpha value
464 /// @param  eWindow             \b IN: DIP number
465 /// @return E_APIXC_RET_OK      - Success
466 /// @return E_APIXC_RET_FAIL    - Failure
467 //-------------------------------------------------------------------------------------------------
468 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetAlpha(MS_U8 u8AlphaVal, SCALER_DIP_WIN eWindow);
469 //-------------------------------------------------------------------------------------------------
470 /// Emable DIP UV swap
471 /// @ingroup DIP_SET_COLOR_TRANSFORM
472 /// @param  benable             \b IN: Enable/Disable
473 /// @param  eWindow             \b IN: DIP number
474 /// @return E_APIXC_RET_OK      - Success
475 /// @return E_APIXC_RET_FAIL    - Failure
476 //-------------------------------------------------------------------------------------------------
477 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SwapUV(MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
478 
479 
480 //-------------------------------------------------------------------------------------------------
481 /// Emable DIP YC swap
482 /// @ingroup DIP_SET_COLOR_TRANSFORM
483 /// @param  benable             \b IN: Enable/Disable
484 /// @param  eWindow             \b IN: DIP number
485 /// @return E_APIXC_RET_OK      - Success
486 /// @return E_APIXC_RET_FAIL    - Failure
487 //-------------------------------------------------------------------------------------------------
488 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SwapYC(MS_BOOL bEnable, SCALER_DIP_WIN eWindow);
489 
490 
491 //-------------------------------------------------------------------------------------------------
492 /// Emable DIP RGB swap
493 /// @ingroup DIP_SET_PROPERTY_COLOR_TRANSFORM
494 /// @param  benable             \b IN: Enable/Disable
495 /// @param  enSwapType          \b IN: RGB swap type
496 /// @param  eWindow             \b IN: DIP number
497 /// @return E_APIXC_RET_OK      - Success
498 /// @return E_APIXC_RET_FAIL    - Failure
499 //-------------------------------------------------------------------------------------------------
500 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SwapRGB(MS_BOOL bEnable, EN_XC_DIP_RGB_SWAP_TYPE enSwapType, SCALER_DIP_WIN eWindow);
501 //-------------------------------------------------------------------------------------------------
502 /// MApi_XC_DIP_SetWinProperty_Ex
503 /// @ingroup DIP_ToBeRemove
504 //-------------------------------------------------------------------------------------------------
505 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetWinProperty_Ex(MS_U8 u8BufCnt ,MS_U16 u16Width, MS_U16 u16Height, MS_PHY u32BufStart ,MS_PHY u32BufEnd, SCALER_DIP_SOURCE_TYPE eSource,SCALER_DIP_WIN eWindow);
506 //-------------------------------------------------------------------------------------------------
507 /// Set DIP capture mux when capture from OP
508 /// @ingroup DIP_SET_PROPERTY
509 /// @param  bEnable             \b IN: Enable/Disable
510 /// @param  eOpCapture          \b IN: capture mux when capture from OP
511 /// @param  eWindow             \b IN: DIP number
512 /// @return E_APIXC_RET_OK      - Success
513 /// @return E_APIXC_RET_FAIL    - Failure
514 //-------------------------------------------------------------------------------------------------
515 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetOutputCapture(MS_BOOL bEnable,EN_XC_DIP_OP_CAPTURE eOpCapture,SCALER_DIP_WIN eWindow);
516 
517 
518 //-------------------------------------------------------------------------------------------------
519 /// Set DIP HV mirror
520 /// @ingroup DIP_SET_PROPERTY
521 /// @param  bHMirror            \b IN: Enable/Disable
522 /// @param  bVMirror            \b IN: Enable/Disable
523 /// @param  eWindow             \b IN: DIP number
524 /// @return E_APIXC_RET_OK      - Success
525 /// @return E_APIXC_RET_FAIL    - Failure
526 //-------------------------------------------------------------------------------------------------
527 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetMirror(MS_BOOL bHMirror,MS_BOOL bVMirror,SCALER_DIP_WIN eWindow);
528 //-------------------------------------------------------------------------------------------------
529 /// Set DIP input from DRAM information
530 /// @ingroup DIP_SET_WINPROPERTY
531 /// @param  pstDIPRProperty     \b IN: input from DRAM information
532 /// @param  eWindow             \b IN: DIP number
533 /// @return E_APIXC_RET_OK      - Success
534 /// @return E_APIXC_RET_FAIL    - Failure
535 //-------------------------------------------------------------------------------------------------
536 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetDIPRProperty(ST_XC_DIPR_PROPERTY *pstDIPRProperty,SCALER_DIP_WIN eWindow);
537 //-------------------------------------------------------------------------------------------------
538 /// Attch interrupt call back function
539 /// @ingroup DIP_INTERRUPT
540 /// @param  pIntCb              \b IN: interrupt callback function
541 /// @param  eWindow             \b IN: DIP number
542 /// @return E_APIXC_RET_OK      - Success
543 /// @return E_APIXC_RET_FAIL    - Failure
544 //-------------------------------------------------------------------------------------------------
545 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_InterruptAttach(InterruptCb pIntCb,SCALER_DIP_WIN eWindow);
546 //-------------------------------------------------------------------------------------------------
547 /// De-attch interrupt call back function
548 /// @ingroup DIP_INTERRUPT
549 /// @param  eWindow             \b IN: DIP number
550 /// @return E_APIXC_RET_OK      - Success
551 /// @return E_APIXC_RET_FAIL    - Failure
552 //-------------------------------------------------------------------------------------------------
553 DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_InterruptDetach(SCALER_DIP_WIN eWindow);
554 //-----------------
555 // DIP_POWER_STATE
556 //-----------------
557 //-------------------------------------------------------------------------------------------------
558 /// Set DIP suspend or resume status
559 /// @ingroup DIP_POWER_STATE
560 /// @param  u16PowerState       \b IN: Suspend/Resume
561 /// @return 0                   - Success
562 //-------------------------------------------------------------------------------------------------
563 DLL_PUBLIC MS_U32 MApi_XC_DIP_SetPowerState(EN_POWER_MODE u16PowerState);
564 //-------------------------------------------------------------------------------------------------
565 /// Set DIP rotate
566 /// @ingroup DIP_SET_PROPERTY
567 /// @param  bRotation           \b IN: Enable/Disable
568 /// @param  eRoDirection        \b IN: rotate type
569 /// @param  eTmpWindow          \b IN: DIP number
570 /// @return E_APIXC_RET_OK      - Success
571 /// @return E_APIXC_RET_FAIL    - Failure
572 //-------------------------------------------------------------------------------------------------
573 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_Rotation(MS_BOOL bRotation,EN_XC_DIP_ROTATION eRoDirection,SCALER_DIP_WIN eTmpWindow);
574 //-------------------------------------------------------------------------------------------------
575 /// Set DIP pinpon with GOP
576 /// @ingroup DIP_SET_PROPERTY
577 /// @param  bPinpon             \b IN: Enable/Disable
578 /// @param  u32PinponAddr       \b IN: pinpon address
579 /// @param  eTmpWindow          \b IN: DIP number
580 /// @return E_APIXC_RET_OK      - Success
581 /// @return E_APIXC_RET_FAIL    - Failure
582 //-------------------------------------------------------------------------------------------------
583 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetPinpon(MS_BOOL bPinpon,MS_PHY u32PinponAddr,SCALER_DIP_WIN eWindow);
584 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_SetHVSP(MS_BOOL bSelect,SCALER_DIP_WIN eWindow);
585 // DLL_PUBLIC E_APIXC_ReturnValue MApi_XC_DIP_Set420TileBlock(EN_XC_DIP_TILE_BLOCK eTileBlock,SCALER_DIP_WIN eWindow);
586 //==============Get===================
587 //-------------------------------------------------------------------------------------------------
588 /// Get interrpt frame bit-mask status
589 /// @ingroup DIP_INTERRUPT
590 /// @param  eWindow             \b IN: DIP number
591 /// @return MS_U16              - interrpt frame bit-mask status
592 //-------------------------------------------------------------------------------------------------
593 DLL_PUBLIC MS_U16 MApi_XC_DIP_GetIntStatus(SCALER_DIP_WIN eWindow);
594 //-----------------
595 // DIP_GET_BUFINFO
596 //-----------------
597 //-------------------------------------------------------------------------------------------------
598 /// Get DIP buffer address and size info
599 /// @ingroup DIP_GET_BUFINFO
600 /// @param  eWindow             \b IN: DIP number
601 /// @return BUFFER_INFO         - DIP buffer address and size info
602 //-------------------------------------------------------------------------------------------------
603 DLL_PUBLIC BUFFER_INFO MApi_XC_DIP_GetBufInfo(SCALER_DIP_WIN eWindow);
604 #ifdef __cplusplus
605 }
606 #endif
607 #endif /* APIXC_DWIN_H */
608 
609