/[pcsx2_0.9.7]/trunk/pcsx2/IPU/mpeg2lib/Vlc.h
ViewVC logotype

Diff of /trunk/pcsx2/IPU/mpeg2lib/Vlc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/pcsx2/IPU/mpeg2lib/Vlc.h	2010/09/07 03:24:11	31
+++ trunk/pcsx2/IPU/mpeg2lib/Vlc.h	2010/09/07 11:08:22	62
@@ -21,59 +21,77 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  */
+ 
+// WARNING!  This file should only be included into Mpeg.cpp AND NOWHERE ELSE.
+// All contents of this file are used only by Mpeg.cpp, and including it elsewhere will
+// just result in the linker having to remove a whole lot of redundant/unused decoder
+// tables and static functions. -- air
 
 #ifndef __VLC_H__
 #define __VLC_H__
 
-#include "IPU/coroutine.h"
+//static u8 word[4];
+//static u8 dword[8];
+//static u8 qword[16];
 
-static u8 data[2];
-static u8 dword[4];
-extern tIPU_BP g_BP;
-extern decoder_t g_decoder;
-extern void ReorderBitstream();
-
-static __forceinline void GETWORD(u32 * bit_buf,int bits)
+static __fi int GETWORD()
 {
-	while(!getBits16(data,1))
+	static u8 data[2];
+
+	if (decoder.bitstream_bits > 0)
 	{
-		so_resume();
+		if(!getBits16(data,1))
+		{
+			return 0;
+		}
+		
+		/*u32 data;
+		BigEndian(data, *(u32*)word);
+		decoder.bitstream_buf |=  (u64)data << decoder.bitstream_bits;
+		decoder.bitstream_bits -= 32;*/
+		decoder.bitstream_buf |= (((u32)data[0] << 8) | data[1]) << decoder.bitstream_bits;
+		decoder.bitstream_bits -= 16;
 	}
-	*bit_buf |= ((data[0] << 8) | data[1]) << (bits);
+
+	return 1;
 }
 
-static __forceinline void bitstream_init (decoder_t * decoder){
-    decoder->bitstream_bits = -16;
+static __fi int bitstream_init ()
+{
+	if (!getBits32((u8*)&decoder.bitstream_buf, 1))
+	{
+		return 0;
+	}
 
-	while( !getBits32(dword, 1) )
-		so_resume();
+	decoder.bitstream_bits = -16;
+	BigEndian(decoder.bitstream_buf, decoder.bitstream_buf);
+	/*decoder.bitstream_buf = *(u64*)dword;
+	BigEndian64(decoder.bitstream_buf, decoder.bitstream_buf);*/
 
-	decoder->bitstream_buf = (dword[0] << 24) | (dword[1] << 16) |
-							 (dword[2] <<  8) |dword[3];
+	return 1;
 }
 
-/* make sure that there are at least 16 valid bits in bit_buf */
-#define NEEDBITS(bit_buf,bits,bit_ptr)		\
-do {						\
-    if (bits > 0) {			\
-	GETWORD(&bit_buf,bits);	\
-	bits -= 16;	\
-    }						\
-} while (0)
-
 /* remove num valid bits from bit_buf */
-#define DUMPBITS(bit_buf,bits,num)	\
-do {					\
-	/*IPU_LOG("DUMPBITS %d\n",num);*/	\
-    bit_buf <<= (num);			\
-    bits += (num);			\
-} while (0)
+static __fi void DUMPBITS(int num)
+{
+	decoder.bitstream_buf <<= num;
+    decoder.bitstream_bits += num;
+}
 
 /* take num bits from the high part of bit_buf and zero extend them */
-#define UBITS(bit_buf,num) (((u32)(bit_buf)) >> (32 - (num)))
+#define UBITS(num) (((u32)decoder.bitstream_buf) >> (32 - (num)))
 
 /* take num bits from the high part of bit_buf and sign extend them */
-#define SBITS(bit_buf,num) (((s32)(bit_buf)) >> (32 - (num)))
+#define SBITS(num) (((s32)decoder.bitstream_buf) >> (32 - (num)))
+
+/* Get bits from bitstream */
+static __fi u32 GETBITS(int num)
+{
+	u16 retVal = UBITS(num);
+	DUMPBITS(num);
+
+	return retVal;
+}
 
 struct MBtab {
     u8 modes;
@@ -122,7 +140,7 @@
 #define MC MACROBLOCK_MOTION_FORWARD
 #define CODED MACROBLOCK_PATTERN
 
-static const MBtab MB_P [] = {
+static const __aligned16 MBtab MB_P [] = {
     {INTRA|QUANT, 6}, {CODED|QUANT, 5}, {MC|CODED|QUANT, 5}, {INTRA,    5},
     {MC,          3}, {MC,          3}, {MC,             3}, {MC,       3},
     {CODED,       2}, {CODED,       2}, {CODED,          2}, {CODED,    2},
@@ -137,7 +155,7 @@
 #define BWD MACROBLOCK_MOTION_BACKWARD
 #define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD
 
-static const MBtab MB_B [] = {
+static const __aligned16 MBtab MB_B [] = {
     {0,                 0}, {INTRA|QUANT,       6},
     {BWD|CODED|QUANT,   6}, {FWD|CODED|QUANT,   6},
     {INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
@@ -171,7 +189,7 @@
     { 3, 6}, { 2, 4}, { 1, 3}, { 1, 3}, { 0, 2}, { 0, 2}, { 0, 2}, { 0, 2}
 };
 
-static const MVtab MV_10 [] = {
+static const __aligned16 MVtab MV_10 [] = {
     { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10},
     { 0,10}, { 0,10}, { 0,10}, { 0,10}, {15,10}, {14,10}, {13,10}, {12,10},
     {11,10}, {10,10}, { 9, 9}, { 9, 9}, { 8, 9}, { 8, 9}, { 7, 9}, { 7, 9},
@@ -186,7 +204,7 @@
 };
 
 
-static const CBPtab CBP_7 [] = {
+static const __aligned16 CBPtab CBP_7 [] = {
     {0x22, 7}, {0x12, 7}, {0x0a, 7}, {0x06, 7},
     {0x21, 7}, {0x11, 7}, {0x09, 7}, {0x05, 7},
     {0x3f, 6}, {0x3f, 6}, {0x03, 6}, {0x03, 6},
@@ -217,7 +235,7 @@
     {0x3c, 3}, {0x3c, 3}, {0x3c, 3}, {0x3c, 3}
 };
 
-static const CBPtab CBP_9 [] = {
+static const __aligned16 CBPtab CBP_9 [] = {
     {0,    0}, {0x00, 9}, {0x27, 9}, {0x1b, 9},
     {0x3b, 9}, {0x37, 9}, {0x2f, 9}, {0x1f, 9},
     {0x3a, 8}, {0x3a, 8}, {0x36, 8}, {0x36, 8},
@@ -236,6 +254,8 @@
     {0x0b, 8}, {0x0b, 8}, {0x07, 8}, {0x07, 8}
 };
 
+#if 0		// following tables are unused by PCSX2
+
 static const DCtab DC_lum_5 [] = {
     {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
     {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
@@ -257,7 +277,6 @@
     {8, 7}, {8, 7}, {8, 7}, {8, 7}, {9, 8}, {9, 8}, {10, 9}, {11, 9}
 };
 
-
 static const DCTtab DCT_16 [] = {
     {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
     {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
@@ -406,41 +425,283 @@
     {  1, 9, 7}, {  1, 9, 7}, {  1,12, 8}, {  1,13, 8},
     {  3, 3, 8}, {  5, 2, 8}, {  1,14, 8}, {  1,15, 8}
 };
+#endif
+
+struct MBAtabSet
+{
+	MBAtab mba5[30];
+	MBAtab mba11[26*4];
+};
+static const __aligned16 MBAtabSet MBA = {
+	{	// mba5
+				{6, 5}, {5, 5}, {4, 4}, {4, 4}, {3, 4}, {3, 4},
+		{2, 3}, {2, 3}, {2, 3}, {2, 3}, {1, 3}, {1, 3}, {1, 3}, {1, 3},
+		{0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1},
+		{0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}
+	},
+
+	{	// mba11
+		{32, 11}, {31, 11}, {30, 11}, {29, 11},
+		{28, 11}, {27, 11}, {26, 11}, {25, 11},
+		{24, 11}, {23, 11}, {22, 11}, {21, 11},
+		{20, 10}, {20, 10}, {19, 10}, {19, 10},
+		{18, 10}, {18, 10}, {17, 10}, {17, 10},
+		{16, 10}, {16, 10}, {15, 10}, {15, 10},
+		{14,  8}, {14,  8}, {14,  8}, {14,  8},
+		{14,  8}, {14,  8}, {14,  8}, {14,  8},
+		{13,  8}, {13,  8}, {13,  8}, {13,  8},
+		{13,  8}, {13,  8}, {13,  8}, {13,  8},
+		{12,  8}, {12,  8}, {12,  8}, {12,  8},
+		{12,  8}, {12,  8}, {12,  8}, {12,  8},
+		{11,  8}, {11,  8}, {11,  8}, {11,  8},
+		{11,  8}, {11,  8}, {11,  8}, {11,  8},
+		{10,  8}, {10,  8}, {10,  8}, {10,  8},
+		{10,  8}, {10,  8}, {10,  8}, {10,  8},
+		{ 9,  8}, { 9,  8}, { 9,  8}, { 9,  8},
+		{ 9,  8}, { 9,  8}, { 9,  8}, { 9,  8},
+		{ 8,  7}, { 8,  7}, { 8,  7}, { 8,  7},
+		{ 8,  7}, { 8,  7}, { 8,  7}, { 8,  7},
+		{ 8,  7}, { 8,  7}, { 8,  7}, { 8,  7},
+		{ 8,  7}, { 8,  7}, { 8,  7}, { 8,  7},
+		{ 7,  7}, { 7,  7}, { 7,  7}, { 7,  7},
+		{ 7,  7}, { 7,  7}, { 7,  7}, { 7,  7},
+		{ 7,  7}, { 7,  7}, { 7,  7}, { 7,  7},
+		{ 7,  7}, { 7,  7}, { 7,  7}, { 7,  7}
+	}
+};
+
+// New
+
+#if 0		// Not used by PCSX2
+/* Table B-1, macroblock_address_increment, codes 00010 ... 011xx */
+static MBAtab MBAtab1[16] =
+{ {0,0}, {0,0}, {7,5}, {6,5}, {5,4}, {5,4}, {4,4}, {4,4},
+  {3,3}, {3,3}, {3,3}, {3,3}, {2,3}, {2,3}, {2,3}, {2,3}
+};
+
+/* Table B-1, macroblock_address_increment, codes 00000011000 ... 0000111xxxx */
+static MBAtab MBAtab2[104] =
+{
+  {33,11}, {32,11}, {31,11}, {30,11}, {29,11}, {28,11}, {27,11}, {26,11},
+  {25,11}, {24,11}, {23,11}, {22,11}, {21,10}, {21,10}, {20,10}, {20,10},
+  {19,10}, {19,10}, {18,10}, {18,10}, {17,10}, {17,10}, {16,10}, {16,10},
+  {15,8},  {15,8},  {15,8},  {15,8},  {15,8},  {15,8},  {15,8},  {15,8},
+  {14,8},  {14,8},  {14,8},  {14,8},  {14,8},  {14,8},  {14,8},  {14,8},
+  {13,8},  {13,8},  {13,8},  {13,8},  {13,8},  {13,8},  {13,8},  {13,8},
+  {12,8},  {12,8},  {12,8},  {12,8},  {12,8},  {12,8},  {12,8},  {12,8},
+  {11,8},  {11,8},  {11,8},  {11,8},  {11,8},  {11,8},  {11,8},  {11,8},
+  {10,8},  {10,8},  {10,8},  {10,8},  {10,8},  {10,8},  {10,8},  {10,8},
+  {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},
+  {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},   {9,7},
+  {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},
+  {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7},   {8,7}
+};
+#endif
 
+struct DCtabSet
+{
+	DCtab lum0[32];		// Table B-12, dct_dc_size_luminance, codes 00xxx ... 11110
+	DCtab lum1[16];		// Table B-12, dct_dc_size_luminance, codes 111110xxx ... 111111111
+	DCtab chrom0[32];	// Table B-13, dct_dc_size_chrominance, codes 00xxx ... 11110
+	DCtab chrom1[32];	// Table B-13, dct_dc_size_chrominance, codes 111110xxxx ... 1111111111
+};
 
-static const MBAtab MBA_5 [] = {
-		    {6, 5}, {5, 5}, {4, 4}, {4, 4}, {3, 4}, {3, 4},
-    {2, 3}, {2, 3}, {2, 3}, {2, 3}, {1, 3}, {1, 3}, {1, 3}, {1, 3},
-    {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1},
-    {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}
-};
-
-static const MBAtab MBA_11 [] = {
-    {32, 11}, {31, 11}, {30, 11}, {29, 11},
-    {28, 11}, {27, 11}, {26, 11}, {25, 11},
-    {24, 11}, {23, 11}, {22, 11}, {21, 11},
-    {20, 10}, {20, 10}, {19, 10}, {19, 10},
-    {18, 10}, {18, 10}, {17, 10}, {17, 10},
-    {16, 10}, {16, 10}, {15, 10}, {15, 10},
-    {14,  8}, {14,  8}, {14,  8}, {14,  8},
-    {14,  8}, {14,  8}, {14,  8}, {14,  8},
-    {13,  8}, {13,  8}, {13,  8}, {13,  8},
-    {13,  8}, {13,  8}, {13,  8}, {13,  8},
-    {12,  8}, {12,  8}, {12,  8}, {12,  8},
-    {12,  8}, {12,  8}, {12,  8}, {12,  8},
-    {11,  8}, {11,  8}, {11,  8}, {11,  8},
-    {11,  8}, {11,  8}, {11,  8}, {11,  8},
-    {10,  8}, {10,  8}, {10,  8}, {10,  8},
-    {10,  8}, {10,  8}, {10,  8}, {10,  8},
-    { 9,  8}, { 9,  8}, { 9,  8}, { 9,  8},
-    { 9,  8}, { 9,  8}, { 9,  8}, { 9,  8},
-    { 8,  7}, { 8,  7}, { 8,  7}, { 8,  7},
-    { 8,  7}, { 8,  7}, { 8,  7}, { 8,  7},
-    { 8,  7}, { 8,  7}, { 8,  7}, { 8,  7},
-    { 8,  7}, { 8,  7}, { 8,  7}, { 8,  7},
-    { 7,  7}, { 7,  7}, { 7,  7}, { 7,  7},
-    { 7,  7}, { 7,  7}, { 7,  7}, { 7,  7},
-    { 7,  7}, { 7,  7}, { 7,  7}, { 7,  7},
-    { 7,  7}, { 7,  7}, { 7,  7}, { 7,  7}
+static const __aligned16 DCtabSet DCtable =
+{
+	// lum0: Table B-12, dct_dc_size_luminance, codes 00xxx ... 11110 */
+	{ {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
+	  {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
+	  {0, 3}, {0, 3}, {0, 3}, {0, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
+	  {4, 3}, {4, 3}, {4, 3}, {4, 3}, {5, 4}, {5, 4}, {6, 5}, {0, 0} },
+
+	/* lum1: Table B-12, dct_dc_size_luminance, codes 111110xxx ... 111111111 */
+	{ {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6},
+	  {8, 7}, {8, 7}, {8, 7}, {8, 7}, {9, 8}, {9, 8}, {10,9}, {11,9} },
+
+	/* chrom0: Table B-13, dct_dc_size_chrominance, codes 00xxx ... 11110 */
+	{ {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
+	  {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
+	  {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
+	  {3, 3}, {3, 3}, {3, 3}, {3, 3}, {4, 4}, {4, 4}, {5, 5}, {0, 0} },
+
+	/* chrom1: Table B-13, dct_dc_size_chrominance, codes 111110xxxx ... 1111111111 */
+	{ {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6},
+	  {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6}, {6, 6},
+	  {7, 7}, {7, 7}, {7, 7}, {7, 7}, {7, 7}, {7, 7}, {7, 7}, {7, 7},
+	  {8, 8}, {8, 8}, {8, 8}, {8, 8}, {9, 9}, {9, 9}, {10,10}, {11,10} },
 };
+
+struct DCTtabSet
+{
+	DCTtab first[12];
+	DCTtab next[12];
+
+	DCTtab tab0[60];
+	DCTtab tab0a[252];
+	DCTtab tab1[8];
+	DCTtab tab1a[8];
+
+	DCTtab tab2[16];
+	DCTtab tab3[16];
+	DCTtab tab4[16];
+	DCTtab tab5[16];
+	DCTtab tab6[16];
+};
+
+static const __aligned16 DCTtabSet DCT =
+{
+	/* first[12]: Table B-14, DCT coefficients table zero,
+	 * codes 0100 ... 1xxx (used for first (DC) coefficient)
+	 */
+	{ {0,2,4}, {2,1,4}, {1,1,3}, {1,1,3},
+	  {0,1,1}, {0,1,1}, {0,1,1}, {0,1,1},
+	  {0,1,1}, {0,1,1}, {0,1,1}, {0,1,1} },
+
+	/* next[12]: Table B-14, DCT coefficients table zero,
+	 * codes 0100 ... 1xxx (used for all other coefficients)
+	 */
+	{ {0,2,4},  {2,1,4},  {1,1,3},  {1,1,3},
+	  {64,0,2}, {64,0,2}, {64,0,2}, {64,0,2}, /* EOB */
+	  {0,1,2},  {0,1,2},  {0,1,2},  {0,1,2} },
+
+	/* tab0[60]: Table B-14, DCT coefficients table zero,
+	 * codes 000001xx ... 00111xxx
+	 */
+	{ {65,0,6}, {65,0,6}, {65,0,6}, {65,0,6}, /* Escape */
+	  {2,2,7}, {2,2,7}, {9,1,7}, {9,1,7},
+	  {0,4,7}, {0,4,7}, {8,1,7}, {8,1,7},
+	  {7,1,6}, {7,1,6}, {7,1,6}, {7,1,6},
+	  {6,1,6}, {6,1,6}, {6,1,6}, {6,1,6},
+	  {1,2,6}, {1,2,6}, {1,2,6}, {1,2,6},
+	  {5,1,6}, {5,1,6}, {5,1,6}, {5,1,6},
+	  {13,1,8}, {0,6,8}, {12,1,8}, {11,1,8},
+	  {3,2,8}, {1,3,8}, {0,5,8}, {10,1,8},
+	  {0,3,5}, {0,3,5}, {0,3,5}, {0,3,5},
+	  {0,3,5}, {0,3,5}, {0,3,5}, {0,3,5},
+	  {4,1,5}, {4,1,5}, {4,1,5}, {4,1,5},
+	  {4,1,5}, {4,1,5}, {4,1,5}, {4,1,5},
+	  {3,1,5}, {3,1,5}, {3,1,5}, {3,1,5},
+	  {3,1,5}, {3,1,5}, {3,1,5}, {3,1,5} },
+
+	/* tab0a[252]: Table B-15, DCT coefficients table one,
+	 * codes 000001xx ... 11111111
+	 */
+	{ {65,0,6}, {65,0,6}, {65,0,6}, {65,0,6}, /* Escape */
+	  {7,1,7}, {7,1,7}, {8,1,7}, {8,1,7},
+	  {6,1,7}, {6,1,7}, {2,2,7}, {2,2,7},
+	  {0,7,6}, {0,7,6}, {0,7,6}, {0,7,6},
+	  {0,6,6}, {0,6,6}, {0,6,6}, {0,6,6},
+	  {4,1,6}, {4,1,6}, {4,1,6}, {4,1,6},
+	  {5,1,6}, {5,1,6}, {5,1,6}, {5,1,6},
+	  {1,5,8}, {11,1,8}, {0,11,8}, {0,10,8},
+	  {13,1,8}, {12,1,8}, {3,2,8}, {1,4,8},
+	  {2,1,5}, {2,1,5}, {2,1,5}, {2,1,5},
+	  {2,1,5}, {2,1,5}, {2,1,5}, {2,1,5},
+	  {1,2,5}, {1,2,5}, {1,2,5}, {1,2,5},
+	  {1,2,5}, {1,2,5}, {1,2,5}, {1,2,5},
+	  {3,1,5}, {3,1,5}, {3,1,5}, {3,1,5},
+	  {3,1,5}, {3,1,5}, {3,1,5}, {3,1,5},
+	  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},
+	  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},
+	  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},
+	  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},
+	  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},
+	  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},
+	  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},
+	  {1,1,3}, {1,1,3}, {1,1,3}, {1,1,3},
+	  {64,0,4}, {64,0,4}, {64,0,4}, {64,0,4}, /* EOB */
+	  {64,0,4}, {64,0,4}, {64,0,4}, {64,0,4},
+	  {64,0,4}, {64,0,4}, {64,0,4}, {64,0,4},
+	  {64,0,4}, {64,0,4}, {64,0,4}, {64,0,4},
+	  {0,3,4}, {0,3,4}, {0,3,4}, {0,3,4},
+	  {0,3,4}, {0,3,4}, {0,3,4}, {0,3,4},
+	  {0,3,4}, {0,3,4}, {0,3,4}, {0,3,4},
+	  {0,3,4}, {0,3,4}, {0,3,4}, {0,3,4},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,1,2}, {0,1,2}, {0,1,2}, {0,1,2},
+	  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},
+	  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},
+	  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},
+	  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},
+	  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},
+	  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},
+	  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},
+	  {0,2,3}, {0,2,3}, {0,2,3}, {0,2,3},
+	  {0,4,5}, {0,4,5}, {0,4,5}, {0,4,5},
+	  {0,4,5}, {0,4,5}, {0,4,5}, {0,4,5},
+	  {0,5,5}, {0,5,5}, {0,5,5}, {0,5,5},
+	  {0,5,5}, {0,5,5}, {0,5,5}, {0,5,5},
+	  {9,1,7}, {9,1,7}, {1,3,7}, {1,3,7},
+	  {10,1,7}, {10,1,7}, {0,8,7}, {0,8,7},
+	  {0,9,7}, {0,9,7}, {0,12,8}, {0,13,8},
+	  {2,3,8}, {4,2,8}, {0,14,8}, {0,15,8} },
+
+	/* Table B-14, DCT coefficients table zero,
+	 * codes 0000001000 ... 0000001111
+	 */
+	{ {16,1,10}, {5,2,10}, {0,7,10}, {2,3,10},
+	  {1,4,10}, {15,1,10}, {14,1,10}, {4,2,10} },
+
+	/* Table B-15, DCT coefficients table one,
+	 * codes 000000100x ... 000000111x
+	 */
+	{ {5,2,9}, {5,2,9}, {14,1,9}, {14,1,9},
+	  {2,4,10}, {16,1,10}, {15,1,9}, {15,1,9} },
+
+	/* Table B-14/15, DCT coefficients table zero / one,
+	 * codes 000000010000 ... 000000011111
+	 */
+	{ {0,11,12}, {8,2,12}, {4,3,12}, {0,10,12},
+	  {2,4,12}, {7,2,12}, {21,1,12}, {20,1,12},
+	  {0,9,12}, {19,1,12}, {18,1,12}, {1,5,12},
+	  {3,3,12}, {0,8,12}, {6,2,12}, {17,1,12} },
+
+	/* Table B-14/15, DCT coefficients table zero / one,
+	 * codes 0000000010000 ... 0000000011111
+	 */
+	{ {10,2,13}, {9,2,13}, {5,3,13}, {3,4,13},
+	  {2,5,13}, {1,7,13}, {1,6,13}, {0,15,13},
+	  {0,14,13}, {0,13,13}, {0,12,13}, {26,1,13},
+	  {25,1,13}, {24,1,13}, {23,1,13}, {22,1,13} },
+
+	/* Table B-14/15, DCT coefficients table zero / one,
+	 * codes 00000000010000 ... 00000000011111
+	 */
+	{ {0,31,14}, {0,30,14}, {0,29,14}, {0,28,14},
+	  {0,27,14}, {0,26,14}, {0,25,14}, {0,24,14},
+	  {0,23,14}, {0,22,14}, {0,21,14}, {0,20,14},
+	  {0,19,14}, {0,18,14}, {0,17,14}, {0,16,14} },
+
+	/* Table B-14/15, DCT coefficients table zero / one,
+	 * codes 000000000010000 ... 000000000011111
+	 */
+	{ {0,40,15}, {0,39,15}, {0,38,15}, {0,37,15},
+	  {0,36,15}, {0,35,15}, {0,34,15}, {0,33,15},
+	  {0,32,15}, {1,14,15}, {1,13,15}, {1,12,15},
+	  {1,11,15}, {1,10,15}, {1,9,15}, {1,8,15} },
+
+	/* Table B-14/15, DCT coefficients table zero / one,
+	 * codes 0000000000010000 ... 0000000000011111
+	 */
+	{ {1,18,16}, {1,17,16}, {1,16,16}, {1,15,16},
+	  {6,3,16}, {16,2,16}, {15,2,16}, {14,2,16},
+	  {13,2,16}, {12,2,16}, {11,2,16}, {31,1,16},
+	  {30,1,16}, {29,1,16}, {28,1,16}, {27,1,16} }
+
+};
+
 #endif//__VLC_H__

 

  ViewVC Help
Powered by ViewVC 1.1.22