comparison vp3data.h @ 2703:3817945001ce libavcodec

replace get_superblock_run_length() with a VLC table
author melanson
date Wed, 18 May 2005 00:11:49 +0000
parents 5a4e5225cbb6
children 9c1a436dac6b
comparison
equal deleted inserted replaced
2702:5a4e5225cbb6 2703:3817945001ce
68 6, 6, 6, 6, 5, 5, 5, 5, 68 6, 6, 6, 6, 5, 5, 5, 5,
69 4, 4, 4, 4, 3, 3, 3, 3, 69 4, 4, 4, 4, 3, 3, 3, 3,
70 2, 2, 2, 2, 2, 2, 2, 2, 70 2, 2, 2, 2, 2, 2, 2, 2,
71 0, 0, 0, 0, 0, 0, 0, 0, 71 0, 0, 0, 0, 0, 0, 0, 0,
72 0, 0, 0, 0, 0, 0, 0, 0 72 0, 0, 0, 0, 0, 0, 0, 0
73 };
74
75 static const uint16_t superblock_run_length_vlc_table[34][2] = {
76 { 0, 1 },
77
78 { 4, 3 }, { 5, 3 },
79
80 { 0xC, 4 }, { 0xD, 4 },
81
82 { 0x38, 6 }, { 0x39, 6 }, { 0x3A, 6 }, { 0x3B, 6 },
83
84 { 0xF0, 8 }, { 0xF1, 8 }, { 0xF2, 8 }, { 0xF3, 8 },
85 { 0xF4, 8 }, { 0xF5, 8 }, { 0xF6, 8 }, { 0xF7, 8 },
86
87 { 0x3E0, 10 }, { 0x3E1, 10 }, { 0x3E2, 10 }, { 0x3E3, 10 },
88 { 0x3E4, 10 }, { 0x3E5, 10 }, { 0x3E6, 10 }, { 0x3E7, 10 },
89 { 0x3E8, 10 }, { 0x3E9, 10 }, { 0x3EA, 10 }, { 0x3EB, 10 },
90 { 0x3EC, 10 }, { 0x3ED, 10 }, { 0x3EE, 10 }, { 0x3EF, 10 },
91
92 { 0x3F, 6 } /* this last VLC is a special case for reading 12 more
93 bits from stream and adding the value 34 */
73 }; 94 };
74 95
75 static const uint16_t fragment_run_length_vlc_table[30][2] = { 96 static const uint16_t fragment_run_length_vlc_table[30][2] = {
76 /* 1 -> 2 */ 97 /* 1 -> 2 */
77 { 0x0, 2 }, { 0x1, 2 }, 98 { 0x0, 2 }, { 0x1, 2 },