xref: /utopia/UTPA2-700.0.x/projects/tmplib/include/apiJPEG_v2.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi //<MStar Software>
2*53ee8cc1Swenshuai.xi //******************************************************************************
3*53ee8cc1Swenshuai.xi // MStar Software
4*53ee8cc1Swenshuai.xi // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5*53ee8cc1Swenshuai.xi // All software, firmware and related documentation herein ("MStar Software") are
6*53ee8cc1Swenshuai.xi // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7*53ee8cc1Swenshuai.xi // law, including, but not limited to, copyright law and international treaties.
8*53ee8cc1Swenshuai.xi // Any use, modification, reproduction, retransmission, or republication of all
9*53ee8cc1Swenshuai.xi // or part of MStar Software is expressly prohibited, unless prior written
10*53ee8cc1Swenshuai.xi // permission has been granted by MStar.
11*53ee8cc1Swenshuai.xi //
12*53ee8cc1Swenshuai.xi // By accessing, browsing and/or using MStar Software, you acknowledge that you
13*53ee8cc1Swenshuai.xi // have read, understood, and agree, to be bound by below terms ("Terms") and to
14*53ee8cc1Swenshuai.xi // comply with all applicable laws and regulations:
15*53ee8cc1Swenshuai.xi //
16*53ee8cc1Swenshuai.xi // 1. MStar shall retain any and all right, ownership and interest to MStar
17*53ee8cc1Swenshuai.xi //    Software and any modification/derivatives thereof.
18*53ee8cc1Swenshuai.xi //    No right, ownership, or interest to MStar Software and any
19*53ee8cc1Swenshuai.xi //    modification/derivatives thereof is transferred to you under Terms.
20*53ee8cc1Swenshuai.xi //
21*53ee8cc1Swenshuai.xi // 2. You understand that MStar Software might include, incorporate or be
22*53ee8cc1Swenshuai.xi //    supplied together with third party`s software and the use of MStar
23*53ee8cc1Swenshuai.xi //    Software may require additional licenses from third parties.
24*53ee8cc1Swenshuai.xi //    Therefore, you hereby agree it is your sole responsibility to separately
25*53ee8cc1Swenshuai.xi //    obtain any and all third party right and license necessary for your use of
26*53ee8cc1Swenshuai.xi //    such third party`s software.
27*53ee8cc1Swenshuai.xi //
28*53ee8cc1Swenshuai.xi // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29*53ee8cc1Swenshuai.xi //    MStar`s confidential information and you agree to keep MStar`s
30*53ee8cc1Swenshuai.xi //    confidential information in strictest confidence and not disclose to any
31*53ee8cc1Swenshuai.xi //    third party.
32*53ee8cc1Swenshuai.xi //
33*53ee8cc1Swenshuai.xi // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34*53ee8cc1Swenshuai.xi //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35*53ee8cc1Swenshuai.xi //    without limitation, any warranties of merchantability, non-infringement of
36*53ee8cc1Swenshuai.xi //    intellectual property rights, fitness for a particular purpose, error free
37*53ee8cc1Swenshuai.xi //    and in conformity with any international standard.  You agree to waive any
38*53ee8cc1Swenshuai.xi //    claim against MStar for any loss, damage, cost or expense that you may
39*53ee8cc1Swenshuai.xi //    incur related to your use of MStar Software.
40*53ee8cc1Swenshuai.xi //    In no event shall MStar be liable for any direct, indirect, incidental or
41*53ee8cc1Swenshuai.xi //    consequential damages, including without limitation, lost of profit or
42*53ee8cc1Swenshuai.xi //    revenues, lost or damage of data, and unauthorized system use.
43*53ee8cc1Swenshuai.xi //    You agree that this Section 4 shall still apply without being affected
44*53ee8cc1Swenshuai.xi //    even if MStar Software has been modified by MStar in accordance with your
45*53ee8cc1Swenshuai.xi //    request or instruction for your use, except otherwise agreed by both
46*53ee8cc1Swenshuai.xi //    parties in writing.
47*53ee8cc1Swenshuai.xi //
48*53ee8cc1Swenshuai.xi // 5. If requested, MStar may from time to time provide technical supports or
49*53ee8cc1Swenshuai.xi //    services in relation with MStar Software to you for your use of
50*53ee8cc1Swenshuai.xi //    MStar Software in conjunction with your or your customer`s product
51*53ee8cc1Swenshuai.xi //    ("Services").
52*53ee8cc1Swenshuai.xi //    You understand and agree that, except otherwise agreed by both parties in
53*53ee8cc1Swenshuai.xi //    writing, Services are provided on an "AS IS" basis and the warranty
54*53ee8cc1Swenshuai.xi //    disclaimer set forth in Section 4 above shall apply.
55*53ee8cc1Swenshuai.xi //
56*53ee8cc1Swenshuai.xi // 6. Nothing contained herein shall be construed as by implication, estoppels
57*53ee8cc1Swenshuai.xi //    or otherwise:
58*53ee8cc1Swenshuai.xi //    (a) conferring any license or right to use MStar name, trademark, service
59*53ee8cc1Swenshuai.xi //        mark, symbol or any other identification;
60*53ee8cc1Swenshuai.xi //    (b) obligating MStar or any of its affiliates to furnish any person,
61*53ee8cc1Swenshuai.xi //        including without limitation, you and your customers, any assistance
62*53ee8cc1Swenshuai.xi //        of any kind whatsoever, or any information; or
63*53ee8cc1Swenshuai.xi //    (c) conferring any license or right under any intellectual property right.
64*53ee8cc1Swenshuai.xi //
65*53ee8cc1Swenshuai.xi // 7. These terms shall be governed by and construed in accordance with the laws
66*53ee8cc1Swenshuai.xi //    of Taiwan, R.O.C., excluding its conflict of law rules.
67*53ee8cc1Swenshuai.xi //    Any and all dispute arising out hereof or related hereto shall be finally
68*53ee8cc1Swenshuai.xi //    settled by arbitration referred to the Chinese Arbitration Association,
69*53ee8cc1Swenshuai.xi //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70*53ee8cc1Swenshuai.xi //    Rules of the Association by three (3) arbitrators appointed in accordance
71*53ee8cc1Swenshuai.xi //    with the said Rules.
72*53ee8cc1Swenshuai.xi //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73*53ee8cc1Swenshuai.xi //    be English.
74*53ee8cc1Swenshuai.xi //    The arbitration award shall be final and binding to both parties.
75*53ee8cc1Swenshuai.xi //
76*53ee8cc1Swenshuai.xi //******************************************************************************
77*53ee8cc1Swenshuai.xi //<MStar Software>
78*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////
79*53ee8cc1Swenshuai.xi //
80*53ee8cc1Swenshuai.xi // Copyright (c) 2006-2007 MStar Semiconductor, Inc.
81*53ee8cc1Swenshuai.xi // All rights reserved.
82*53ee8cc1Swenshuai.xi //
83*53ee8cc1Swenshuai.xi // Unless otherwise stipulated in writing, any and all information contained
84*53ee8cc1Swenshuai.xi // herein regardless in any format shall remain the sole proprietary of
85*53ee8cc1Swenshuai.xi // MStar Semiconductor Inc. and be kept in strict confidence
86*53ee8cc1Swenshuai.xi // (��MStar Confidential Information��) by the recipient.
87*53ee8cc1Swenshuai.xi // Any unauthorized act including without limitation unauthorized disclosure,
88*53ee8cc1Swenshuai.xi // copying, use, reproduction, sale, distribution, modification, disassembling,
89*53ee8cc1Swenshuai.xi // reverse engineering and compiling of the contents of MStar Confidential
90*53ee8cc1Swenshuai.xi // Information is unlawful and strictly prohibited. MStar hereby reserves the
91*53ee8cc1Swenshuai.xi // rights to any and all damages, losses, costs and expenses resulting therefrom.
92*53ee8cc1Swenshuai.xi //
93*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////
94*53ee8cc1Swenshuai.xi 
95*53ee8cc1Swenshuai.xi //////////////////////////////////////////////////////////////////////////////////////////////////
96*53ee8cc1Swenshuai.xi ///
97*53ee8cc1Swenshuai.xi /// @file   apiJPEG_v2.h
98*53ee8cc1Swenshuai.xi /// @brief  JPEG Driver Interface
99*53ee8cc1Swenshuai.xi /// @author MStar Semiconductor Inc.
100*53ee8cc1Swenshuai.xi ///////////////////////////////////////////////////////////////////////////////////////////////////
101*53ee8cc1Swenshuai.xi 
102*53ee8cc1Swenshuai.xi #ifndef _API_JPEG_V2_H_
103*53ee8cc1Swenshuai.xi #define _API_JPEG_V2_H_
104*53ee8cc1Swenshuai.xi 
105*53ee8cc1Swenshuai.xi #ifdef __cplusplus
106*53ee8cc1Swenshuai.xi extern "C"
107*53ee8cc1Swenshuai.xi {
108*53ee8cc1Swenshuai.xi #endif
109*53ee8cc1Swenshuai.xi 
110*53ee8cc1Swenshuai.xi #include "MsTypes.h"
111*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
112*53ee8cc1Swenshuai.xi // Defines
113*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
114*53ee8cc1Swenshuai.xi // below for utopia20 structure
115*53ee8cc1Swenshuai.xi 
116*53ee8cc1Swenshuai.xi typedef enum {
117*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_EnableOJPD,
118*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_Init_UsingOJPD,
119*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_get_APP0_info,
120*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_Init,
121*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_DecodeHdr,
122*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_Decode,
123*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_Exit,
124*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetErrorCode,
125*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetJPDEventFlag,
126*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetJPDEventFlag,
127*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_Rst,
128*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_PowerOn,
129*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_PowerOff,
130*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetCurVidx,
131*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_IsProgressive,
132*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_ThumbnailFound,
133*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetWidth,
134*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetHeight,
135*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetOriginalWidth,
136*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetOriginalHeight,
137*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetNonAlignmentWidth,
138*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetNonAlignmentHeight,
139*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetAlignedPitch,
140*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetAlignedPitch_H,
141*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetAlignedWidth,
142*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetAlignedHeight,
143*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetScaleDownFactor,
144*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetMaxDecodeResolution,
145*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetProMaxDecodeResolution,
146*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetMRBufferValid,
147*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_UpdateReadInfo,
148*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_ProcessEOF,
149*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetErrCode,
150*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetDbgLevel,
151*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetDbgLevel,
152*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetInfo,
153*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetStatus,
154*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetLibVer,
155*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_HdlVidxChk,
156*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetBuffLoadType,
157*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_EnableISR,
158*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_DisableISR,
159*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_WaitDone,
160*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFDateTime,
161*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFOrientation,
162*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFManufacturer,
163*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFModel,
164*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFFlash,
165*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFISOSpeedRatings,
166*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFShutterSpeedValue,
167*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFApertureValue,
168*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFExposureBiasValue,
169*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFFocalLength,
170*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFImageWidth,
171*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFImageHeight,
172*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFExposureTime,
173*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetEXIFFNumber,
174*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetFreeMemory,
175*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetDataOffset,
176*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetSOFOffset,
177*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetNJPDInstance,
178*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SupportCMYK,
179*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SupportRGB,
180*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetMHEG5,
181*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_IsMPOFormat,
182*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetMPOIndex,
183*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetMPOAttr,
184*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_DumpMPO,
185*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetMPOBuffer,
186*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetMPOMaxDecodeResolution,
187*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetMPOProMaxDecodeResolution,
188*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetVerificationMode,
189*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetVerificationMode,
190*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_Debug,
191*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetControl,
192*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_GetCbEvent,
193*53ee8cc1Swenshuai.xi     MApi_CMD_JPEG_SetCbEvent
194*53ee8cc1Swenshuai.xi } E_JPEG_V2_IOCTL_CMD;
195*53ee8cc1Swenshuai.xi 
196*53ee8cc1Swenshuai.xi 
197*53ee8cc1Swenshuai.xi // For MApi_JPEG_EnableOJPD(), MApi_JPEG_IsProgressive(), MApi_JPEG_ThumbnailFound(),
198*53ee8cc1Swenshuai.xi // For MApi_JPEG_SetMHEG5(), MApi_JPEG_IsMPOFormat()
199*53ee8cc1Swenshuai.xi typedef struct _JPEG_BOOL_PARAM
200*53ee8cc1Swenshuai.xi {
201*53ee8cc1Swenshuai.xi     MS_BOOL bValue;
202*53ee8cc1Swenshuai.xi }JPEG_BOOL_PARAM, *PJPEG_BOOL_PARAM;
203*53ee8cc1Swenshuai.xi 
204*53ee8cc1Swenshuai.xi typedef struct _JPEG_INIT_PARAM
205*53ee8cc1Swenshuai.xi {
206*53ee8cc1Swenshuai.xi     JPEG_InitParam *pInitParam;
207*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
208*53ee8cc1Swenshuai.xi }JPEG_INIT_PARAM, *PJPEG_INIT_PARAM;
209*53ee8cc1Swenshuai.xi 
210*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETAPP0INFO_PARAM
211*53ee8cc1Swenshuai.xi {
212*53ee8cc1Swenshuai.xi     MS_U8 *unit;
213*53ee8cc1Swenshuai.xi     MS_U16 *x;
214*53ee8cc1Swenshuai.xi     MS_U16 *y;
215*53ee8cc1Swenshuai.xi }JPEG_GETAPP0INFO_PARAM, *PJPEG_GETAPP0INFO_PARAM;
216*53ee8cc1Swenshuai.xi 
217*53ee8cc1Swenshuai.xi // For MApi_JPEG_DecodeHdr(), MApi_JPEG_Decode()
218*53ee8cc1Swenshuai.xi // For MApi_JPEG_HdlVidxChk(), MApi_JPEG_DisableISR()
219*53ee8cc1Swenshuai.xi typedef struct _JPEG_RESULT_PARAM
220*53ee8cc1Swenshuai.xi {
221*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
222*53ee8cc1Swenshuai.xi }JPEG_RESULT_PARAM, *PJPEG_RESULT_PARAM;
223*53ee8cc1Swenshuai.xi 
224*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETERRORCODE_PARAM
225*53ee8cc1Swenshuai.xi {
226*53ee8cc1Swenshuai.xi     JPEG_ErrCode ErrCode;
227*53ee8cc1Swenshuai.xi }JPEG_GETERRORCODE_PARAM, *PJPEG_GETERRORCODE_PARAM;
228*53ee8cc1Swenshuai.xi 
229*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetJPDEventFlag() and MApi_JPEG_SetJPDEventFlag()
230*53ee8cc1Swenshuai.xi typedef struct _JPEG_JPEGEVENT_PARAM
231*53ee8cc1Swenshuai.xi {
232*53ee8cc1Swenshuai.xi     JPEG_Event eEvtVal;
233*53ee8cc1Swenshuai.xi }JPEG_JPEGEVENT_PARAM, *PJPEG_JPEGEVENT_PARAM;
234*53ee8cc1Swenshuai.xi 
235*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetCurVidx()
236*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetWidth(), MApi_JPEG_GetHeight()
237*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetOriginalWidth(), MApi_JPEG_GetOriginalHeight()
238*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetNonAlignmentWidth(), MApi_JPEG_GetNonAlignmentHeight()
239*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetAlignedPitch(), MApi_JPEG_GetAlignedPitch_H()
240*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetAlignedWidth(), MApi_JPEG_GetAlignedHeight()
241*53ee8cc1Swenshuai.xi typedef struct _JPEG_U16_PARAM
242*53ee8cc1Swenshuai.xi {
243*53ee8cc1Swenshuai.xi     MS_U16 u16Value;
244*53ee8cc1Swenshuai.xi }JPEG_U16_PARAM, *PJPEG_U16_PARAM;
245*53ee8cc1Swenshuai.xi 
246*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetScaleDownFactor(), MApi_JPEG_SetDbgLevel(), MApi_JPEG_GetDbgLevel()
247*53ee8cc1Swenshuai.xi // For MApi_JPEG_SetNJPDInstance()
248*53ee8cc1Swenshuai.xi typedef struct _JPEG_U8_PARAM
249*53ee8cc1Swenshuai.xi {
250*53ee8cc1Swenshuai.xi     MS_U8 u8Value;
251*53ee8cc1Swenshuai.xi }JPEG_U8_PARAM, *PJPEG_U8_PARAM;
252*53ee8cc1Swenshuai.xi 
253*53ee8cc1Swenshuai.xi 
254*53ee8cc1Swenshuai.xi // For MApi_JPEG_SetMaxDecodeResolution(), MApi_JPEG_SetProMaxDecodeResolution()
255*53ee8cc1Swenshuai.xi // For MApi_JPEG_SetMPOMaxDecodeResolution(), MApi_JPEG_SetMPOProMaxDecodeResolution()
256*53ee8cc1Swenshuai.xi typedef struct _JPEG_RESOLUTION_PARAM
257*53ee8cc1Swenshuai.xi {
258*53ee8cc1Swenshuai.xi     MS_U16 u16Width;
259*53ee8cc1Swenshuai.xi     MS_U16 u16Height;
260*53ee8cc1Swenshuai.xi }JPEG_RESOLUTION_PARAM, *PJPEG_RESOLUTION_PARAM;
261*53ee8cc1Swenshuai.xi 
262*53ee8cc1Swenshuai.xi typedef struct _JPEG_SETMBUFFERVALID_PARAM
263*53ee8cc1Swenshuai.xi {
264*53ee8cc1Swenshuai.xi     JPEG_BuffLoadType u8MRBuffType;
265*53ee8cc1Swenshuai.xi }JPEG_SETMBUFFERVALID_PARAM, *PJPEG_SETMBUFFERVALID_PARAM;
266*53ee8cc1Swenshuai.xi 
267*53ee8cc1Swenshuai.xi typedef struct _JPEG_UPDATEREADINFO_PARAM
268*53ee8cc1Swenshuai.xi {
269*53ee8cc1Swenshuai.xi     MS_U32 u32DataRead;
270*53ee8cc1Swenshuai.xi     MS_BOOL bEOFflag;
271*53ee8cc1Swenshuai.xi }JPEG_UPDATEREADINFO_PARAM, *PJPEG_UPDATEREADINFO_PARAM;
272*53ee8cc1Swenshuai.xi 
273*53ee8cc1Swenshuai.xi typedef struct _JPEG_PROCESSEOF_PARAM
274*53ee8cc1Swenshuai.xi {
275*53ee8cc1Swenshuai.xi     JPEG_BuffLoadType u8MRBuffType;
276*53ee8cc1Swenshuai.xi }JPEG_PROCESSEOF_PARAM, *PJPEG_PROCESSEOF_PARAM;
277*53ee8cc1Swenshuai.xi 
278*53ee8cc1Swenshuai.xi typedef struct _JPEG_SETERRORCODE_PARAM
279*53ee8cc1Swenshuai.xi {
280*53ee8cc1Swenshuai.xi     JPEG_ErrCode ErrStatus;
281*53ee8cc1Swenshuai.xi }JPEG_SETERRORCODE_PARAM, *PJPEG_SETERRORCODE_PARAM;
282*53ee8cc1Swenshuai.xi 
283*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETINFO_PARAM
284*53ee8cc1Swenshuai.xi {
285*53ee8cc1Swenshuai.xi     JPEG_Info *pJPEG_Info;
286*53ee8cc1Swenshuai.xi }JPEG_GETINFO_PARAM, *PJPEG_GETINFO_PARAM;
287*53ee8cc1Swenshuai.xi 
288*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETSTATUS_PARAM
289*53ee8cc1Swenshuai.xi {
290*53ee8cc1Swenshuai.xi     JPEG_Status *pJPEG_Status;
291*53ee8cc1Swenshuai.xi }JPEG_GETSTATUS_PARAM, *PJPEG_GETSTATUS_PARAM;
292*53ee8cc1Swenshuai.xi 
293*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETLIBVER_PARAM
294*53ee8cc1Swenshuai.xi {
295*53ee8cc1Swenshuai.xi     const MSIF_Version **ppVersion;
296*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
297*53ee8cc1Swenshuai.xi }JPEG_GETLIBVER_PARAM, *PJPEG_GETLIBVER_PARAM;
298*53ee8cc1Swenshuai.xi 
299*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETBUFFLOADTYPE_PARAM
300*53ee8cc1Swenshuai.xi {
301*53ee8cc1Swenshuai.xi     JPEG_BuffLoadType *pBuffLoadType;
302*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
303*53ee8cc1Swenshuai.xi }JPEG_GETBUFFLOADTYPE_PARAM, *PJPEG_GETBUFFLOADTYPE_PARAM;
304*53ee8cc1Swenshuai.xi 
305*53ee8cc1Swenshuai.xi typedef struct _JPEG_ENABLEISR_PARAM
306*53ee8cc1Swenshuai.xi {
307*53ee8cc1Swenshuai.xi     JPEG_IsrFuncCb IsrCb;
308*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
309*53ee8cc1Swenshuai.xi }JPEG_ENABLEISR_PARAM, *PJPEG_ENABLEISR_PARAM;
310*53ee8cc1Swenshuai.xi 
311*53ee8cc1Swenshuai.xi typedef struct _JPEG_WAITDONE_PARAM
312*53ee8cc1Swenshuai.xi {
313*53ee8cc1Swenshuai.xi     JPEG_DecodeStatus retVal;
314*53ee8cc1Swenshuai.xi }JPEG_WAITDONE_PARAM, *PJPEG_WAITDONE_PARAM;
315*53ee8cc1Swenshuai.xi 
316*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETEXIFDATETIME_PARAM
317*53ee8cc1Swenshuai.xi {
318*53ee8cc1Swenshuai.xi     JPEG_EXIF_DateTime *DateTime;
319*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
320*53ee8cc1Swenshuai.xi }JPEG_GETEXIFDATETIME_PARAM, *PJPEG_GETEXIFDATETIME_PARAM;
321*53ee8cc1Swenshuai.xi 
322*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETEXIFORIENTATION_PARAM
323*53ee8cc1Swenshuai.xi {
324*53ee8cc1Swenshuai.xi     JPEG_EXIF_Orientation *eOrientation;
325*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
326*53ee8cc1Swenshuai.xi }JPEG_GETEXIFORIENTATION_PARAM, *PJPEG_GETEXIFORIENTATION_PARAM;
327*53ee8cc1Swenshuai.xi 
328*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetEXIFManufacturer(), MApi_JPEG_GetEXIFManufacturer()
329*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETEXIFSTRING_PARAM
330*53ee8cc1Swenshuai.xi {
331*53ee8cc1Swenshuai.xi     MS_U8 *pu8String;
332*53ee8cc1Swenshuai.xi     MS_U8 u8size;
333*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
334*53ee8cc1Swenshuai.xi }JPEG_GETEXIFSTRING_PARAM, *PJPEG_GETEXIFSTRING_PARAM;
335*53ee8cc1Swenshuai.xi 
336*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetEXIFFlash()
337*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETEXIFU16_PARAM
338*53ee8cc1Swenshuai.xi {
339*53ee8cc1Swenshuai.xi     MS_U16 *pu16Value;
340*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
341*53ee8cc1Swenshuai.xi }JPEG_GETEXIFU16_PARAM, *PJPEG_GETEXIFU16_PARAM;
342*53ee8cc1Swenshuai.xi 
343*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetEXIFISOSpeedRatings()
344*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetEXIFImageWidth(), MApi_JPEG_GetEXIFImageHeight()
345*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETEXIFU32_PARAM
346*53ee8cc1Swenshuai.xi {
347*53ee8cc1Swenshuai.xi     MS_U32 *pu32Value;
348*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
349*53ee8cc1Swenshuai.xi }JPEG_GETEXIFU32_PARAM, *PJPEG_GETEXIFU32_PARAM;
350*53ee8cc1Swenshuai.xi 
351*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetEXIFShutterSpeedValue(), MApi_JPEG_GetEXIFApertureValue()
352*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetEXIFExposureBiasValue(), MApi_JPEG_GetEXIFFocalLength()
353*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetEXIFExposureTime(), MApi_JPEG_GetEXIFFNumber()
354*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETEXIFRATIONAL_PARAM
355*53ee8cc1Swenshuai.xi {
356*53ee8cc1Swenshuai.xi     JPEG_RATIONAL *pRational;
357*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
358*53ee8cc1Swenshuai.xi }JPEG_GETEXIFRATIONAL_PARAM, *PJPEG_GETEXIFRATIONAL_PARAM;
359*53ee8cc1Swenshuai.xi 
360*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETFREEMEMORY_PARAM
361*53ee8cc1Swenshuai.xi {
362*53ee8cc1Swenshuai.xi     MS_U32 size;
363*53ee8cc1Swenshuai.xi     MS_PHY addr;
364*53ee8cc1Swenshuai.xi }JPEG_GETFREEMEMORY_PARAM, *PJPEG_GETFREEMEMORY_PARAM;
365*53ee8cc1Swenshuai.xi 
366*53ee8cc1Swenshuai.xi // For MApi_JPEG_GetDataOffset(), MApi_JPEG_GetSOFOffset()
367*53ee8cc1Swenshuai.xi typedef struct _JPEG_U32_PARAM
368*53ee8cc1Swenshuai.xi {
369*53ee8cc1Swenshuai.xi     MS_U32 u32Value;
370*53ee8cc1Swenshuai.xi }JPEG_U32_PARAM, *PJPEG_U32_PARAM;
371*53ee8cc1Swenshuai.xi 
372*53ee8cc1Swenshuai.xi // For MApi_JPEG_SupportCMYK(), MApi_JPEG_SupportRGB()
373*53ee8cc1Swenshuai.xi typedef struct _JPEG_SUPPORTCMYK_PARAM
374*53ee8cc1Swenshuai.xi {
375*53ee8cc1Swenshuai.xi     MS_BOOL bEnable;
376*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
377*53ee8cc1Swenshuai.xi }JPEG_SUPPORTCMYK_PARAM, *PJPEG_SUPPORTCMYK_PARAM;
378*53ee8cc1Swenshuai.xi 
379*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETMPOINDEX_PARAM
380*53ee8cc1Swenshuai.xi {
381*53ee8cc1Swenshuai.xi     JPEG_MPO_INDEX_INFO **ppMPOIndex;
382*53ee8cc1Swenshuai.xi     MS_BOOL bretVal;
383*53ee8cc1Swenshuai.xi }JPEG_GETMPOINDEX_PARAM, *PJPEG_GETMPOINDEX_PARAM;
384*53ee8cc1Swenshuai.xi 
385*53ee8cc1Swenshuai.xi typedef struct _JPEG_GETMPOATTR_PARAM
386*53ee8cc1Swenshuai.xi {
387*53ee8cc1Swenshuai.xi     MS_U32 image_no;
388*53ee8cc1Swenshuai.xi     JPEG_MPO_ATTRIBUTE_INFO **ppMPOAttr;
389*53ee8cc1Swenshuai.xi     MS_BOOL bretVal;
390*53ee8cc1Swenshuai.xi }JPEG_GETMPOATTR_PARAM, *PJPEG_GETMPOATTR_PARAM;
391*53ee8cc1Swenshuai.xi 
392*53ee8cc1Swenshuai.xi typedef struct _JPEG_SETMPOBUFFER_PARAM
393*53ee8cc1Swenshuai.xi {
394*53ee8cc1Swenshuai.xi     MS_U32 read_offset;
395*53ee8cc1Swenshuai.xi     MS_U32 output_start;
396*53ee8cc1Swenshuai.xi     MS_BOOL bretVal;
397*53ee8cc1Swenshuai.xi }JPEG_SETMPOBUFFER_PARAM, *PJPEG_SETMPOBUFFER_PARAM;
398*53ee8cc1Swenshuai.xi 
399*53ee8cc1Swenshuai.xi // For MApi_JPEG_SetVerificationMode(), MApi_JPEG_GetVerificationMode()
400*53ee8cc1Swenshuai.xi typedef struct _JPEG_VERIFICATION_PARAM
401*53ee8cc1Swenshuai.xi {
402*53ee8cc1Swenshuai.xi     NJPEG_VerificationMode VerificationMode;
403*53ee8cc1Swenshuai.xi }JPEG_VERIFICATION_PARAM, *PJPEG_VERIFICATION_PARAM;
404*53ee8cc1Swenshuai.xi 
405*53ee8cc1Swenshuai.xi typedef struct _JPEG_GET_CTRL_PARAM
406*53ee8cc1Swenshuai.xi {
407*53ee8cc1Swenshuai.xi     EN_JPEG_GET_CTRL_ID eGetID;
408*53ee8cc1Swenshuai.xi     MS_U32 *param;
409*53ee8cc1Swenshuai.xi     MS_U32 u32size;
410*53ee8cc1Swenshuai.xi     JPEG_Result retVal;
411*53ee8cc1Swenshuai.xi }JPEG_GET_CTRL_PARAM, *PJPEG_GET_CTRL_PARAM;
412*53ee8cc1Swenshuai.xi 
413*53ee8cc1Swenshuai.xi void NJPEG_EXRegisterToUtopia(FUtopiaOpen ModuleType);
414*53ee8cc1Swenshuai.xi MS_U32 JPEG_Open(void** ppInstance, MS_U32 u32ModuleVersion, void* pAttribute);
415*53ee8cc1Swenshuai.xi MS_U32 JPEG_Close(void* pInstance);
416*53ee8cc1Swenshuai.xi MS_U32 JPEG_Ioctl(void* pInstance, MS_U32 u32Cmd, void* pArgs);
417*53ee8cc1Swenshuai.xi void JPEG_SetDbgLevel_V2(MS_U8 u8DbgLevel);
418*53ee8cc1Swenshuai.xi 
419*53ee8cc1Swenshuai.xi 
420*53ee8cc1Swenshuai.xi #ifdef __cplusplus
421*53ee8cc1Swenshuai.xi }
422*53ee8cc1Swenshuai.xi #endif
423*53ee8cc1Swenshuai.xi 
424*53ee8cc1Swenshuai.xi #endif // _API_JPEG_V2_H_
425*53ee8cc1Swenshuai.xi 
426*53ee8cc1Swenshuai.xi 
427