123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- #ifndef _TJPGDEC
- #define _TJPGDEC
- #define JD_SZBUF 512
- #define JD_FORMAT 0
- #define JD_USE_SCALE 1
- #define JD_TBLCLIP 1
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef int INT;
- typedef unsigned int UINT;
- typedef char CHAR;
- typedef unsigned char UCHAR;
- typedef unsigned char BYTE;
- typedef short SHORT;
- typedef unsigned short USHORT;
- typedef unsigned short WORD;
- typedef unsigned short WCHAR;
- typedef long LONG;
- typedef unsigned long ULONG;
- typedef unsigned long DWORD;
- typedef enum {
- JDR_OK = 0,
- JDR_INTR,
- JDR_INP,
- JDR_MEM1,
- JDR_MEM2,
- JDR_PAR,
- JDR_FMT1,
- JDR_FMT2,
- JDR_FMT3
- } JRESULT;
- typedef struct {
- WORD left, right, top, bottom;
- } JRECT;
- typedef struct JDEC JDEC;
- struct JDEC {
- UINT dctr;
- BYTE* dptr;
- BYTE* inbuf;
- BYTE dmsk;
- BYTE scale;
- BYTE msx, msy;
- BYTE qtid[3];
- SHORT dcv[3];
- WORD nrst;
- UINT width, height;
- BYTE* huffbits[2][2];
- WORD* huffcode[2][2];
- BYTE* huffdata[2][2];
- LONG* qttbl[4];
- void* workbuf;
- BYTE* mcubuf;
- void* pool;
- UINT sz_pool;
- UINT (*infunc)(JDEC*, BYTE*, UINT);
- void* device;
- };
- JRESULT jd_prepare (JDEC*, UINT(*)(JDEC*,BYTE*,UINT), void*, UINT, void*);
- JRESULT jd_decomp (JDEC*, UINT(*)(JDEC*,void*,JRECT*), BYTE);
- #ifdef __cplusplus
- }
- #endif
- #endif
|