Any changes are to allow conversion to BMP
Dependents: Color_Targeting_Catapult
Fork of BaseJpegDecode by
BaseJpegDecode.h@7:5010d93af0b6, 2014-04-30 (annotated)
- Committer:
- kylepost3
- Date:
- Wed Apr 30 14:17:05 2014 +0000
- Revision:
- 7:5010d93af0b6
- Parent:
- 5:85e99ec2e7b5
Any changes are to allow conversion to BMP
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 5:85e99ec2e7b5 | 1 | // BaseJpegDecode.h 2013/1/27 |
va009039 | 0:417b7ae90eff | 2 | #ifndef BASE_JPEG_DECODE_H |
va009039 | 0:417b7ae90eff | 3 | #define BASE_JPEG_DECODE_H |
va009039 | 0:417b7ae90eff | 4 | #include "bjd_config.h" |
va009039 | 0:417b7ae90eff | 5 | #include "HuffmanDecode.h" |
va009039 | 0:417b7ae90eff | 6 | #include "BitPattern.h" |
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 | 1:bfbc18000cca | 17 | uint8_t* qt[2]; |
va009039 | 1:bfbc18000cca | 18 | int width; |
va009039 | 1:bfbc18000cca | 19 | int height; |
va009039 | 3:a7547692071d | 20 | int yblock; |
va009039 | 1:bfbc18000cca | 21 | #ifdef JPEG_USE_REPORT_CODE |
va009039 | 1:bfbc18000cca | 22 | int report_scan_count; |
va009039 | 1:bfbc18000cca | 23 | int report_scan_dc_count; |
va009039 | 1:bfbc18000cca | 24 | int report_scan_ac_count; |
va009039 | 1:bfbc18000cca | 25 | #endif //JPEG_USE_REPORT |
va009039 | 0:417b7ae90eff | 26 | private: |
va009039 | 1:bfbc18000cca | 27 | void inputDQT(uint8_t c, int pos, int len); |
va009039 | 1:bfbc18000cca | 28 | void inputSOF(uint8_t c, int pos, int len); |
va009039 | 0:417b7ae90eff | 29 | void inputScan(uint8_t c); |
va009039 | 0:417b7ae90eff | 30 | void restart(); |
va009039 | 5:85e99ec2e7b5 | 31 | uint8_t m_seq; |
va009039 | 0:417b7ae90eff | 32 | int m_mcu; |
va009039 | 0:417b7ae90eff | 33 | int m_block; |
va009039 | 0:417b7ae90eff | 34 | int m_scan; |
va009039 | 0:417b7ae90eff | 35 | Huff* m_huff; |
va009039 | 2:5b1dd4e34857 | 36 | int m_pre_DC_value[3]; |
va009039 | 0:417b7ae90eff | 37 | BitPattern m_bitpat; |
va009039 | 0:417b7ae90eff | 38 | uint8_t m_mark; |
va009039 | 0:417b7ae90eff | 39 | HuffmanDecode* pHD; |
va009039 | 1:bfbc18000cca | 40 | int m_seg_pos; |
va009039 | 1:bfbc18000cca | 41 | int m_seg_len; |
va009039 | 1:bfbc18000cca | 42 | int m_param1; |
va009039 | 0:417b7ae90eff | 43 | }; |
va009039 | 0:417b7ae90eff | 44 | #endif // BASE_JPEG_DECODE_H |