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
HuffmanDecode.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 HUFFMAN_DECODE_H |
va009039 | 0:417b7ae90eff | 2 | #define HUFFMAN_DECODE_H |
va009039 | 0:417b7ae90eff | 3 | #include "BitPattern.h" |
va009039 | 0:417b7ae90eff | 4 | |
va009039 | 0:417b7ae90eff | 5 | typedef struct sthuff { |
va009039 | 0:417b7ae90eff | 6 | int8_t run; |
va009039 | 0:417b7ae90eff | 7 | int8_t value_size; |
va009039 | 0:417b7ae90eff | 8 | int8_t code_size; |
va009039 | 0:417b7ae90eff | 9 | uint16_t code; |
va009039 | 0:417b7ae90eff | 10 | } Huff; |
va009039 | 0:417b7ae90eff | 11 | |
va009039 | 0:417b7ae90eff | 12 | class HuffmanDecode { |
va009039 | 0:417b7ae90eff | 13 | public: |
va009039 | 0:417b7ae90eff | 14 | Huff* Lookup(int tc, int th, BitPattern* bitpat); |
va009039 | 0:417b7ae90eff | 15 | int getValue(Huff* huff, BitPattern* bitpat); |
va009039 | 0:417b7ae90eff | 16 | }; |
va009039 | 0:417b7ae90eff | 17 | |
va009039 | 0:417b7ae90eff | 18 | #endif // HUFFMAN_DECODE_H |