test
Dependencies: Nanopb iSerial mbed BaseJpegDecode FatFileSystem SDFileSystem RingBuffer Camera_LS_Y201
extlib/BaseJpegDecode/BaseJpegDecode.h@0:d69efd0ee139, 2014-09-18 (annotated)
- Committer:
- cgraham
- Date:
- Thu Sep 18 15:21:47 2014 +0000
- Revision:
- 0:d69efd0ee139
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cgraham | 0:d69efd0ee139 | 1 | // BaseJpegDecode.h 2013/1/27 |
cgraham | 0:d69efd0ee139 | 2 | #ifndef BASE_JPEG_DECODE_H |
cgraham | 0:d69efd0ee139 | 3 | #define BASE_JPEG_DECODE_H |
cgraham | 0:d69efd0ee139 | 4 | #include "bjd_config.h" |
cgraham | 0:d69efd0ee139 | 5 | #include "HuffmanDecode.h" |
cgraham | 0:d69efd0ee139 | 6 | #include "BitPattern.h" |
cgraham | 0:d69efd0ee139 | 7 | |
cgraham | 0:d69efd0ee139 | 8 | class BaseJpegDecode { |
cgraham | 0:d69efd0ee139 | 9 | public: |
cgraham | 0:d69efd0ee139 | 10 | BaseJpegDecode(); |
cgraham | 0:d69efd0ee139 | 11 | void clear(); |
cgraham | 0:d69efd0ee139 | 12 | void input(uint8_t c); |
cgraham | 0:d69efd0ee139 | 13 | void input(uint8_t* buf, int len); |
cgraham | 0:d69efd0ee139 | 14 | virtual void outputDC(int mcu, int block, int value) = 0; |
cgraham | 0:d69efd0ee139 | 15 | virtual void outputAC(int mcu, int block, int scan, int value) = 0; |
cgraham | 0:d69efd0ee139 | 16 | virtual void outputMARK(uint8_t c) = 0; |
cgraham | 0:d69efd0ee139 | 17 | uint8_t* qt[2]; |
cgraham | 0:d69efd0ee139 | 18 | int width; |
cgraham | 0:d69efd0ee139 | 19 | int height; |
cgraham | 0:d69efd0ee139 | 20 | int yblock; |
cgraham | 0:d69efd0ee139 | 21 | #ifdef JPEG_USE_REPORT_CODE |
cgraham | 0:d69efd0ee139 | 22 | int report_scan_count; |
cgraham | 0:d69efd0ee139 | 23 | int report_scan_dc_count; |
cgraham | 0:d69efd0ee139 | 24 | int report_scan_ac_count; |
cgraham | 0:d69efd0ee139 | 25 | #endif //JPEG_USE_REPORT |
cgraham | 0:d69efd0ee139 | 26 | private: |
cgraham | 0:d69efd0ee139 | 27 | void inputDQT(uint8_t c, int pos, int len); |
cgraham | 0:d69efd0ee139 | 28 | void inputSOF(uint8_t c, int pos, int len); |
cgraham | 0:d69efd0ee139 | 29 | void inputScan(uint8_t c); |
cgraham | 0:d69efd0ee139 | 30 | void restart(); |
cgraham | 0:d69efd0ee139 | 31 | uint8_t m_seq; |
cgraham | 0:d69efd0ee139 | 32 | int m_mcu; |
cgraham | 0:d69efd0ee139 | 33 | int m_block; |
cgraham | 0:d69efd0ee139 | 34 | int m_scan; |
cgraham | 0:d69efd0ee139 | 35 | Huff* m_huff; |
cgraham | 0:d69efd0ee139 | 36 | int m_pre_DC_value[3]; |
cgraham | 0:d69efd0ee139 | 37 | BitPattern m_bitpat; |
cgraham | 0:d69efd0ee139 | 38 | uint8_t m_mark; |
cgraham | 0:d69efd0ee139 | 39 | HuffmanDecode* pHD; |
cgraham | 0:d69efd0ee139 | 40 | int m_seg_pos; |
cgraham | 0:d69efd0ee139 | 41 | int m_seg_len; |
cgraham | 0:d69efd0ee139 | 42 | int m_param1; |
cgraham | 0:d69efd0ee139 | 43 | }; |
cgraham | 0:d69efd0ee139 | 44 | #endif // BASE_JPEG_DECODE_H |