1:
13:
14:
18:
19:
#ifndef __JPGMGR_H__
20:
#define __JPGMGR_H__
21:
22:
23:
#ifdef __cplusplus
24:
extern "C" {
25:
#endif
26:
27:
28:
enum AG903_JPG_ENDEC_ENUM{
29: AG903_JPG_ENDEC_DECODE = 0 ,
30: AG903_JPG_ENDEC_ENCODE ,
31: };
32:
33:
34:
enum AG903_JPG_CCOMP_ENUM{
35: AG903_JPG_CCOMP_YUV420 = 0 ,
36: AG903_JPG_CCOMP_YUV422 ,
37: };
38:
39:
40:
enum AG903_JPG_HOOK_ENUM{
41: AG903_JPG_HOOK_CMP = 0 ,
42: AG903_JPG_HOOK_STRE ,
43: AG903_JPG_HOOK_IMGE ,
44: AG903_JPG_HOOK_CAPE ,
45: AG903_JPG_HOOK_ESTE ,
46: AG903_JPG_HOOK_EOI ,
47: AG903_JPG_HOOK_SOI ,
48: AG903_JPG_HOOK_EOP ,
49: AG903_JPG_HOOK_SOP ,
50: AG903_JPG_HOOK_NG ,
51: AG903_JPG_HOOK_SOS ,
52: AG903_JPG_HOOK_DCTRI ,
53: AG903_JPG_HOOK_INITF ,
54: AG903_JPG_HOOK_SRSTF ,
55:
56: AG903_JPG_HOOK_MAX
57: };
58:
59:
60:
typedef uint32_t
AG903_JPGHandle;
61:
62:
73: uint8_t operation;
74: uint8_t color_cmpnt;
75: uint8_t EOImarker;
76: uint8_t RSTmarker;
77: uint8_t SOImarker;
78: uint8_t marker;
79: uint8_t SOSstop;
80: uint8_t reserve[3];
81: }
AG903_JPGCtrlParam;
82:
83:
96:
void* out_buf;
97: uint32_t h_size;
98: uint32_t v_size;
99: uint32_t strm_size;
100: uint16_t stride;
101: uint8_t capture;
102: uint8_t buf_flow;
103: uint8_t flame_skip;
104: uint8_t reserve[3];
105: }
AG903_JPGCodecParam;
106:
107:
116: uint32_t param;
117: }
AG903_JPGHooks;
118:
119:
122:
123:
130: int32_t
AG903_JPGInit(
void);
131:
132:
146: int32_t
AG903_JPGGetHandle(
AG903_JPGHandle **handle);
147:
148:
158: int32_t
AG903_JPGReleaseHandle(
AG903_JPGHandle *handle);
159:
160:
169: int32_t
AG903_JPGGetStreamSize(
AG903_JPGHandle *handle, uint32_t *size);
170:
171:
181: int32_t
AG903_JPGGetImageSize(
AG903_JPGHandle *handle, uint32_t *xlen, uint32_t *ylen);
182:
183:
192: int32_t
AG903_JPGGetColorComponent(
AG903_JPGHandle *handle, uint8_t *ccomp);
193:
194:
208: int32_t
AG903_JPGInitCodec(
AG903_JPGHandle *handle,
AG903_JPGCtrlParam *param);
209:
210:
224: int32_t
AG903_JPGStartCodec(
AG903_JPGHandle *handle,
AG903_JPGCodecParam *param);
225:
226:
234: int32_t
AG903_JPGEndCodec(
AG903_JPGHandle *handle);
235:
236:
268: int32_t
AG903_JPGSetHooks(
AG903_JPGHandle *handle,
AG903_JPGHooks *hook);
269:
270:
280: int32_t
AG903_JPGSetQScale(uint8_t scale);
281:
282:
283:
#ifdef __cplusplus
284: }
285:
#endif
286:
287:
#endif