BaseJpegDeocde exampe program

Dependencies:   BaseJpegDecode Terminal BaseUsbHost mbed mbed-rtos

Fork of BaseJpegDecode by Norimasa Okamoto

Revision:
1:58dfd5386a92
Parent:
0:7121d9fb45f4
--- a/BaseJpefDecode.cpp	Sun Oct 07 12:03:40 2012 +0000
+++ b/BaseJpefDecode.cpp	Mon Oct 08 11:38:57 2012 +0000
@@ -9,6 +9,12 @@
 #define DBG_WAIT(A)
 #endif
 
+#if 1
+#define DBG_ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);};
+#else
+#define DBG_ASSERT(A) 
+#endif
+
 #define MARK_SOF 0xc0
 #define MARK_DHT 0xc4
 #define MARK_RST0 0xd0
@@ -132,7 +138,7 @@
         int th = (m_block < m_yblocks) ? 0 : 1;
         DBG("%d %d %08x %d\n", tc, th, m_bitpat.peek(32), m_bitpat.size());
         if (m_huff == NULL) {
-            m_huff = pHD->Lookup(tc, th, &m_bitpat);
+            m_huff = pHD->Lookup2(tc, th, &m_bitpat);
             if (m_huff == NULL) {
                 break;
             }