diff vc9data.h @ 2460:42077bb89a53 libavcodec

norm-6 / diff-6 support (untested, parts of it just guessed as the spec is unclear)
author michael
date Mon, 24 Jan 2005 01:46:12 +0000
parents 1bae913cb46c
children 5fd4de95731f
line wrap: on
line diff
--- a/vc9data.h	Mon Jan 24 00:35:18 2005 +0000
+++ b/vc9data.h	Mon Jan 24 01:46:12 2005 +0000
@@ -71,6 +71,88 @@
   1, 3, 3, 2
 };
 
+static const uint16_t vc9_norm6_codes[64] = {
+0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E, 
+0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037, 
+0x007, 0x00A, 0x00B, 0x043, 0x00C, 0x045, 0x046, 0x309, 0x00D, 0x049, 0x04A, 0x308, 0x04C, 0x307, 0x306, 0x036, 
+0x00E, 0x051, 0x052, 0x305, 0x054, 0x304, 0x303, 0x035, 0x058, 0x302, 0x301, 0x034, 0x300, 0x033, 0x032, 0x007, 
+};
+
+static const uint8_t vc9_norm6_bits[64] = {
+ 1,  4,  4,  8,  4,  8,  8, 10,  4,  8,  8, 10,  8, 10, 10, 13, 
+ 4,  8,  8, 10,  8, 10, 10, 13,  8, 10, 10, 13, 10, 13, 13,  9, 
+ 4,  8,  8, 10,  8, 10, 10, 13,  8, 10, 10, 13, 10, 13, 13,  9, 
+ 8, 10, 10, 13, 10, 13, 13,  9, 10, 13, 13,  9, 13,  9,  9,  6,
+};
+#if 0
+/* Normal-6 imode */
+static const uint8_t vc9_norm6_spec[64][5] = {
+{ 0,  1, 1        },
+{ 1,  2, 4        },
+{ 2,  3, 4        },
+{ 3,  0, 8        },
+{ 4,  4, 4        },
+{ 5,  1, 8        },
+{ 6,  2, 8        },
+{ 7,  2, 5,  7, 5 },
+{ 8,  5, 4        },
+{ 9,  3, 8        },
+{10,  4, 8        },
+{11,  2, 5, 11, 5 },
+{12,  5, 8        },
+{13,  2, 5, 13, 5 },
+{14,  2, 5, 14, 5 },
+{15,  3, 5, 14, 8 },
+{16,  6, 4        },
+{17,  6, 8        },
+{18,  7, 8        },
+{19,  2, 5, 19, 5 },
+{20,  8, 8        },
+{21,  2, 5, 21, 5 },
+{22,  2, 5, 22, 5 },
+{23,  3, 5, 13, 8 },
+{24,  9, 8        },
+{25,  2, 5, 25, 5 },
+{26,  2, 5, 26, 5 },
+{27,  3, 5, 12, 8 },
+{28,  2, 5, 28, 5 },
+{29,  3, 5, 11, 8 },
+{30,  3, 5, 10, 8 },
+{31,  3, 5,  7, 4 },
+{32,  7, 4        },
+{33, 10, 8        },
+{34, 11, 8        },
+{35,  2, 5,  3, 5 },
+{36, 12, 8        },
+{37,  2, 5,  5, 5 },
+{38,  2, 5,  6, 5 },
+{39,  3, 5,  9, 8 },
+{40, 13, 8        },
+{41,  2, 5,  9, 5 },
+{42,  2, 5, 10, 5 },
+{43,  3, 5,  8, 8 },
+{44,  2, 5, 12, 5 },
+{45,  3, 5,  7, 8 },
+{46,  3, 5,  6, 8 },
+{47,  3, 5,  6, 4 },
+{48, 14, 8        },
+{49,  2, 5, 17, 5 },
+{50,  2, 5, 18, 5 },
+{51,  3, 5,  5, 8 },
+{52,  2, 5, 20, 5 },
+{53,  3, 5,  4, 8 },
+{54,  3, 5,  3, 8 },
+{55,  3, 5,  5, 4 },
+{56,  2, 5, 24, 5 },
+{57,  3, 5,  2, 8 },
+{58,  3, 5,  1, 8 },
+{59,  3, 5,  4, 4 },
+{60,  3, 5,  0, 8 },
+{61,  3, 5,  3, 4 },
+{62,  3, 5,  2, 4 },
+{63,  3, 5,  1, 1 },
+};
+#endif
 /* 4MV Block pattern VLC tables */
 static const uint8_t vc9_4mv_block_pattern_codes[4][16] = {
   { 14, 58, 59, 25, 12, 26, 15, 15, 13, 24, 27,  0, 28,  1,  2,  2},