working together with FATFileSystem
Fork of TinyJpgDec by
Diff: TinyJpgDec.h
- Revision:
- 1:79e97662234d
- Parent:
- 0:b6f284347a66
--- a/TinyJpgDec.h Sat Mar 22 18:00:42 2014 +0000 +++ b/TinyJpgDec.h Sat Nov 14 02:43:21 2015 +0000 @@ -7,7 +7,7 @@ /* System Configurations */ #define JD_SZBUF 1024 /* Size of stream input buffer */ -#define JD_FORMAT 1 /* Output pixel format 0:RGB888 (3 BYTE/pix), 1:RGB565 (1 WORD/pix) */ +#define JD_FORMAT 0 /* Output pixel format 0:RGB888 (3 BYTE/pix), 1:RGB565 (1 WORD/pix) */ #define JD_USE_SCALE 1 /* Use descaling feature for output */ #define JD_TBLCLIP 1 /* Use table for saturation (might be a bit faster but increases 1K bytes of code size) */ @@ -46,7 +46,7 @@ /* Decompressor object structure */ typedef struct JDEC JDEC; struct JDEC { - UINT dctr; /* Number of bytes available in the input buffer */ + JPG_UINT dctr; /* Number of bytes available in the input buffer */ BYTE* dptr; /* Current data read ptr */ BYTE* inbuf; /* Bit stream input buffer */ BYTE dmsk; /* Current bit in the current read byte */ @@ -55,7 +55,7 @@ BYTE qtid[3]; /* Quantization table ID of each component */ SHORT dcv[3]; /* Previous DC element of each component */ WORD nrst; /* Restart inverval */ - UINT width, height; /* Size of the input image (pixel) */ + JPG_UINT width, height; /* Size of the input image (pixel) */ BYTE* huffbits[2][2]; /* Huffman bit distribution tables [id][dcac] */ WORD* huffcode[2][2]; /* Huffman code word tables [id][dcac] */ BYTE* huffdata[2][2]; /* Huffman decoded data tables [id][dcac] */ @@ -63,16 +63,16 @@ void* workbuf; /* Working buffer for IDCT and RGB output */ BYTE* mcubuf; /* Working buffer for the MCU */ void* pool; /* Pointer to available memory pool */ - UINT sz_pool; /* Size of momory pool (bytes available) */ - UINT (*infunc)(JDEC*, BYTE*, UINT);/* Pointer to jpeg stream input function */ + JPG_UINT sz_pool; /* Size of momory pool (bytes available) */ + JPG_UINT (*infunc)(JDEC*, BYTE*, JPG_UINT);/* Pointer to jpeg stream input function */ void* device; /* Pointer to I/O device identifiler for the session */ }; /* TJpgDec API functions */ - JRESULT jd_prepare (JDEC*, UINT(*)(JDEC*,BYTE*,UINT), void*, UINT, void*); - JRESULT jd_decomp (JDEC*, UINT(*)(JDEC*,void*,JRECT*), BYTE); + JRESULT jd_prepare (JDEC*, JPG_UINT(*)(JDEC*,BYTE*,JPG_UINT), void*, JPG_UINT, void*); + JRESULT jd_decomp (JDEC*, JPG_UINT(*)(JDEC*,void*,JRECT*), BYTE); #ifdef __cplusplus