huffmancode to decode in real-time for motion-jpeg
Dependents: BaseJpegDecode_example SimpleJpegDecode_example Dumb_box_rev2
example code:
Import programBaseJpegDecode_example
BaseJpegDeocde exampe program
Import programSimpleJpegDecode_example
convert JPEG stream data to bitmap, BaseJpegDecode example program
BitPattern.h@0:417b7ae90eff, 2012-10-22 (annotated)
- Committer:
- va009039
- Date:
- Mon Oct 22 13:55:09 2012 +0000
- Revision:
- 0:417b7ae90eff
convert to library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:417b7ae90eff | 1 | #ifndef BIT_PATTERN_H |
va009039 | 0:417b7ae90eff | 2 | #define BIT_PATTERN_H |
va009039 | 0:417b7ae90eff | 3 | #include "mbed.h" |
va009039 | 0:417b7ae90eff | 4 | |
va009039 | 0:417b7ae90eff | 5 | class BitPattern { |
va009039 | 0:417b7ae90eff | 6 | public: |
va009039 | 0:417b7ae90eff | 7 | BitPattern(); |
va009039 | 0:417b7ae90eff | 8 | BitPattern(uint32_t value, int size); |
va009039 | 0:417b7ae90eff | 9 | BitPattern(const char* s); |
va009039 | 0:417b7ae90eff | 10 | void clear(); |
va009039 | 0:417b7ae90eff | 11 | void operator +=(uint8_t c); |
va009039 | 0:417b7ae90eff | 12 | int operator [](int index); |
va009039 | 0:417b7ae90eff | 13 | void put(uint32_t value, int size = 8); |
va009039 | 0:417b7ae90eff | 14 | uint32_t peek(int size = 8); |
va009039 | 0:417b7ae90eff | 15 | uint32_t get(int size = 8); |
va009039 | 0:417b7ae90eff | 16 | int size(); |
va009039 | 0:417b7ae90eff | 17 | bool match(BitPattern& b); |
va009039 | 0:417b7ae90eff | 18 | bool match(const char* s); |
va009039 | 0:417b7ae90eff | 19 | void operator =(const char* s); |
va009039 | 0:417b7ae90eff | 20 | void operator +=(const char* s); |
va009039 | 0:417b7ae90eff | 21 | bool operator ==(BitPattern& b); |
va009039 | 0:417b7ae90eff | 22 | private: |
va009039 | 0:417b7ae90eff | 23 | uint32_t m_pat; |
va009039 | 0:417b7ae90eff | 24 | int m_size; |
va009039 | 0:417b7ae90eff | 25 | }; |
va009039 | 0:417b7ae90eff | 26 | #endif // BIT_PATTERN_H |