BaseJpegDeocde exampe program
Dependencies: BaseJpegDecode Terminal BaseUsbHost mbed mbed-rtos
Fork of BaseJpegDecode by
Diff: SimpleJpegDecode.h
- Revision:
- 5:033432f9baf3
- Parent:
- 4:7d88de31c55a
diff -r 7d88de31c55a -r 033432f9baf3 SimpleJpegDecode.h --- a/SimpleJpegDecode.h Tue Oct 30 15:35:36 2012 +0000 +++ b/SimpleJpegDecode.h Thu Nov 15 10:20:38 2012 +0000 @@ -4,16 +4,23 @@ #include "BaseJpegDecode.h" #include "inverseDCT.h" +#define YUV 0 +#define RGB24 1 + class SimpleJpegDecode : public BaseJpegDecode, public inverseDCT { public: - SimpleJpegDecode(); + SimpleJpegDecode(uint8_t output_mode=RGB24); + + void format_YUV(int mcu, int block, int8_t* values); + void format_RGB24(int mcu, int block, int8_t* values); + void output(int mcu, int block, int scan, int value); virtual void outputDC(int mcu, int block, int value); virtual void outputAC(int mcu, int block, int scan, int value); virtual void outputMARK(uint8_t c); - virtual void outputBLOCK(int muc, int block, uint8_t* values); // iDCT + virtual void outputBLOCK(int muc, int block, int8_t* values); // iDCT - uint8_t* m_block_data[6]; + int8_t m_block_data[5][64]; int DC_count; int AC_count; int BLOCK_count; @@ -43,6 +50,7 @@ CDummy* m_pCbItem; void (CDummy::*m_pCbMeth)(int, int, uint8_t*); void (*m_pCb)(int, int, uint8_t*); + uint8_t m_output_mode; }; #endif // SIMPLE_JPEG_DECODE_H \ No newline at end of file