Any changes are to allow conversion to BMP
Dependents: Color_Targeting_Catapult
Fork of BaseJpegDecode by
BaseJpegDecode.h@0:417b7ae90eff, 2012-10-22 (annotated)
- Committer:
- va009039
- Date:
- Mon Oct 22 13:55:09 2012 +0000
- Revision:
- 0:417b7ae90eff
- Child:
- 1:bfbc18000cca
convert to library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:417b7ae90eff | 1 | #ifndef BASE_JPEG_DECODE_H |
va009039 | 0:417b7ae90eff | 2 | #define BASE_JPEG_DECODE_H |
va009039 | 0:417b7ae90eff | 3 | #include "bjd_config.h" |
va009039 | 0:417b7ae90eff | 4 | #include "HuffmanDecode.h" |
va009039 | 0:417b7ae90eff | 5 | #include "BitPattern.h" |
va009039 | 0:417b7ae90eff | 6 | |
va009039 | 0:417b7ae90eff | 7 | |
va009039 | 0:417b7ae90eff | 8 | class BaseJpegDecode { |
va009039 | 0:417b7ae90eff | 9 | public: |
va009039 | 0:417b7ae90eff | 10 | BaseJpegDecode(); |
va009039 | 0:417b7ae90eff | 11 | void clear(); |
va009039 | 0:417b7ae90eff | 12 | void input(uint8_t c); |
va009039 | 0:417b7ae90eff | 13 | void input(uint8_t* buf, int len); |
va009039 | 0:417b7ae90eff | 14 | virtual void outputDC(int mcu, int block, int value) = 0; |
va009039 | 0:417b7ae90eff | 15 | virtual void outputAC(int mcu, int block, int scan, int value) = 0; |
va009039 | 0:417b7ae90eff | 16 | virtual void outputMARK(uint8_t c) = 0; |
va009039 | 0:417b7ae90eff | 17 | private: |
va009039 | 0:417b7ae90eff | 18 | void inputScan(uint8_t c); |
va009039 | 0:417b7ae90eff | 19 | void restart(); |
va009039 | 0:417b7ae90eff | 20 | protected: |
va009039 | 0:417b7ae90eff | 21 | int m_seq; |
va009039 | 0:417b7ae90eff | 22 | int m_mcu; |
va009039 | 0:417b7ae90eff | 23 | int m_block; |
va009039 | 0:417b7ae90eff | 24 | int m_scan; |
va009039 | 0:417b7ae90eff | 25 | Huff* m_huff; |
va009039 | 0:417b7ae90eff | 26 | int m_old_DC_value[2]; |
va009039 | 0:417b7ae90eff | 27 | BitPattern m_bitpat; |
va009039 | 0:417b7ae90eff | 28 | int m_skip; |
va009039 | 0:417b7ae90eff | 29 | uint8_t m_mark; |
va009039 | 0:417b7ae90eff | 30 | HuffmanDecode* pHD; |
va009039 | 0:417b7ae90eff | 31 | int m_yblocks; |
va009039 | 0:417b7ae90eff | 32 | }; |
va009039 | 0:417b7ae90eff | 33 | #endif // BASE_JPEG_DECODE_H |