comparison h263data.h @ 1064:b32afefe7d33 libavcodec

* UINTX -> uintx_t INTX -> intx_t
author kabi
date Tue, 11 Feb 2003 16:35:48 +0000
parents 0b4450c15067
children 1e39f273ecd6
comparison
equal deleted inserted replaced
1063:fdeac9642346 1064:b32afefe7d33
1 1
2 /* intra MCBPC, mb_type = (intra), then (intraq) */ 2 /* intra MCBPC, mb_type = (intra), then (intraq) */
3 const UINT8 intra_MCBPC_code[8] = { 1, 1, 2, 3, 1, 1, 2, 3 }; 3 const uint8_t intra_MCBPC_code[8] = { 1, 1, 2, 3, 1, 1, 2, 3 };
4 const UINT8 intra_MCBPC_bits[8] = { 1, 3, 3, 3, 4, 6, 6, 6 }; 4 const uint8_t intra_MCBPC_bits[8] = { 1, 3, 3, 3, 4, 6, 6, 6 };
5 5
6 /* inter MCBPC, mb_type = (inter), (intra), (interq), (intraq), (inter4v) */ 6 /* inter MCBPC, mb_type = (inter), (intra), (interq), (intraq), (inter4v) */
7 /* Changed the tables for interq and inter4v+q, following the standard ** Juanjo ** */ 7 /* Changed the tables for interq and inter4v+q, following the standard ** Juanjo ** */
8 const UINT8 inter_MCBPC_code[25] = { 8 const uint8_t inter_MCBPC_code[25] = {
9 1, 3, 2, 5, 9 1, 3, 2, 5,
10 3, 4, 3, 3, 10 3, 4, 3, 3,
11 3, 7, 6, 5, 11 3, 7, 6, 5,
12 4, 4, 3, 2, 12 4, 4, 3, 2,
13 2, 5, 4, 5, 13 2, 5, 4, 5,
14 1, /* Stuffing */ 14 1, /* Stuffing */
15 2, 12, 14, 15, 15 2, 12, 14, 15,
16 }; 16 };
17 const UINT8 inter_MCBPC_bits[25] = { 17 const uint8_t inter_MCBPC_bits[25] = {
18 1, 4, 4, 6, 18 1, 4, 4, 6,
19 5, 8, 8, 7, 19 5, 8, 8, 7,
20 3, 7, 7, 9, 20 3, 7, 7, 9,
21 6, 9, 9, 9, 21 6, 9, 9, 9,
22 3, 7, 7, 8, 22 3, 7, 7, 8,
23 9, /* Stuffing */ 23 9, /* Stuffing */
24 11, 13, 13, 13, 24 11, 13, 13, 13,
25 }; 25 };
26 26
27 /* This is the old table 27 /* This is the old table
28 static const UINT8 inter_MCBPC_code[20] = { 28 static const uint8_t inter_MCBPC_code[20] = {
29 1, 3, 2, 5, 29 1, 3, 2, 5,
30 3, 4, 3, 3, 30 3, 4, 3, 3,
31 0, 1, 2, 3, 31 0, 1, 2, 3,
32 4, 4, 3, 2, 32 4, 4, 3, 2,
33 2, 5, 4, 5, 33 2, 5, 4, 5,
34 }; 34 };
35 static const UINT8 inter_MCBPC_bits[20] = { 35 static const uint8_t inter_MCBPC_bits[20] = {
36 1, 4, 4, 6, 36 1, 4, 4, 6,
37 5, 8, 8, 7, 37 5, 8, 8, 7,
38 12, 12, 12, 12, 38 12, 12, 12, 12,
39 6, 9, 9, 9, 39 6, 9, 9, 9,
40 3, 7, 7, 8, 40 3, 7, 7, 8,
41 };*/ 41 };*/
42 42
43 const UINT8 cbpy_tab[16][2] = 43 const uint8_t cbpy_tab[16][2] =
44 { 44 {
45 {3,4}, {5,5}, {4,5}, {9,4}, {3,5}, {7,4}, {2,6}, {11,4}, 45 {3,4}, {5,5}, {4,5}, {9,4}, {3,5}, {7,4}, {2,6}, {11,4},
46 {2,5}, {3,6}, {5,4}, {10,4}, {4,4}, {8,4}, {6,4}, {3,2} 46 {2,5}, {3,6}, {5,4}, {10,4}, {4,4}, {8,4}, {6,4}, {3,2}
47 }; 47 };
48 48
49 const UINT8 mvtab[33][2] = 49 const uint8_t mvtab[33][2] =
50 { 50 {
51 {1,1}, {1,2}, {1,3}, {1,4}, {3,6}, {5,7}, {4,7}, {3,7}, 51 {1,1}, {1,2}, {1,3}, {1,4}, {3,6}, {5,7}, {4,7}, {3,7},
52 {11,9}, {10,9}, {9,9}, {17,10}, {16,10}, {15,10}, {14,10}, {13,10}, 52 {11,9}, {10,9}, {9,9}, {17,10}, {16,10}, {15,10}, {14,10}, {13,10},
53 {12,10}, {11,10}, {10,10}, {9,10}, {8,10}, {7,10}, {6,10}, {5,10}, 53 {12,10}, {11,10}, {10,10}, {9,10}, {8,10}, {7,10}, {6,10}, {5,10},
54 {4,10}, {7,11}, {6,11}, {5,11}, {4,11}, {3,11}, {2,11}, {3,12}, 54 {4,10}, {7,11}, {6,11}, {5,11}, {4,11}, {3,11}, {2,11}, {3,12},
55 {2,12} 55 {2,12}
56 }; 56 };
57 57
58 /* third non intra table */ 58 /* third non intra table */
59 const UINT16 inter_vlc[103][2] = { 59 const uint16_t inter_vlc[103][2] = {
60 { 0x2, 2 },{ 0xf, 4 },{ 0x15, 6 },{ 0x17, 7 }, 60 { 0x2, 2 },{ 0xf, 4 },{ 0x15, 6 },{ 0x17, 7 },
61 { 0x1f, 8 },{ 0x25, 9 },{ 0x24, 9 },{ 0x21, 10 }, 61 { 0x1f, 8 },{ 0x25, 9 },{ 0x24, 9 },{ 0x21, 10 },
62 { 0x20, 10 },{ 0x7, 11 },{ 0x6, 11 },{ 0x20, 11 }, 62 { 0x20, 10 },{ 0x7, 11 },{ 0x6, 11 },{ 0x20, 11 },
63 { 0x6, 3 },{ 0x14, 6 },{ 0x1e, 8 },{ 0xf, 10 }, 63 { 0x6, 3 },{ 0x14, 6 },{ 0x1e, 8 },{ 0xf, 10 },
64 { 0x21, 11 },{ 0x50, 12 },{ 0xe, 4 },{ 0x1d, 8 }, 64 { 0x21, 11 },{ 0x50, 12 },{ 0xe, 4 },{ 0x1d, 8 },
83 { 0x26, 11 },{ 0x27, 11 },{ 0x58, 12 },{ 0x59, 12 }, 83 { 0x26, 11 },{ 0x27, 11 },{ 0x58, 12 },{ 0x59, 12 },
84 { 0x5a, 12 },{ 0x5b, 12 },{ 0x5c, 12 },{ 0x5d, 12 }, 84 { 0x5a, 12 },{ 0x5b, 12 },{ 0x5c, 12 },{ 0x5d, 12 },
85 { 0x5e, 12 },{ 0x5f, 12 },{ 0x3, 7 }, 85 { 0x5e, 12 },{ 0x5f, 12 },{ 0x3, 7 },
86 }; 86 };
87 87
88 const INT8 inter_level[102] = { 88 const int8_t inter_level[102] = {
89 1, 2, 3, 4, 5, 6, 7, 8, 89 1, 2, 3, 4, 5, 6, 7, 8,
90 9, 10, 11, 12, 1, 2, 3, 4, 90 9, 10, 11, 12, 1, 2, 3, 4,
91 5, 6, 1, 2, 3, 4, 1, 2, 91 5, 6, 1, 2, 3, 4, 1, 2,
92 3, 1, 2, 3, 1, 2, 3, 1, 92 3, 1, 2, 3, 1, 2, 3, 1,
93 2, 3, 1, 2, 1, 2, 1, 2, 93 2, 3, 1, 2, 1, 2, 1, 2,
99 1, 1, 1, 1, 1, 1, 1, 1, 99 1, 1, 1, 1, 1, 1, 1, 1,
100 1, 1, 1, 1, 1, 1, 1, 1, 100 1, 1, 1, 1, 1, 1, 1, 1,
101 1, 1, 1, 1, 1, 1, 101 1, 1, 1, 1, 1, 1,
102 }; 102 };
103 103
104 const INT8 inter_run[102] = { 104 const int8_t inter_run[102] = {
105 0, 0, 0, 0, 0, 0, 0, 0, 105 0, 0, 0, 0, 0, 0, 0, 0,
106 0, 0, 0, 0, 1, 1, 1, 1, 106 0, 0, 0, 0, 1, 1, 1, 1,
107 1, 1, 2, 2, 2, 2, 3, 3, 107 1, 1, 2, 2, 2, 2, 3, 3,
108 3, 4, 4, 4, 5, 5, 5, 6, 108 3, 4, 4, 4, 5, 5, 5, 6,
109 6, 6, 7, 7, 8, 8, 9, 9, 109 6, 6, 7, 7, 8, 8, 9, 9,
123 inter_vlc, 123 inter_vlc,
124 inter_run, 124 inter_run,
125 inter_level, 125 inter_level,
126 }; 126 };
127 127
128 const UINT16 intra_vlc_aic[103][2] = { 128 const uint16_t intra_vlc_aic[103][2] = {
129 { 0x2, 2 }, { 0x6, 3 }, { 0xe, 4 }, { 0xc, 5 }, 129 { 0x2, 2 }, { 0x6, 3 }, { 0xe, 4 }, { 0xc, 5 },
130 { 0xd, 5 }, { 0x10, 6 }, { 0x11, 6 }, { 0x12, 6 }, 130 { 0xd, 5 }, { 0x10, 6 }, { 0x11, 6 }, { 0x12, 6 },
131 { 0x16, 7 }, { 0x1b, 8 }, { 0x20, 9 }, { 0x21, 9 }, 131 { 0x16, 7 }, { 0x1b, 8 }, { 0x20, 9 }, { 0x21, 9 },
132 { 0x1a, 9 }, { 0x1b, 9 }, { 0x1c, 9 }, { 0x1d, 9 }, 132 { 0x1a, 9 }, { 0x1b, 9 }, { 0x1c, 9 }, { 0x1d, 9 },
133 { 0x1e, 9 }, { 0x1f, 9 }, { 0x23, 11 }, { 0x22, 11 }, 133 { 0x1e, 9 }, { 0x1f, 9 }, { 0x23, 11 }, { 0x22, 11 },
152 { 0x19, 9 }, { 0x15, 9 }, { 0x16, 9 }, { 0x18, 9 }, 152 { 0x19, 9 }, { 0x15, 9 }, { 0x16, 9 }, { 0x18, 9 },
153 { 0x17, 9 }, { 0x4, 11 }, { 0x5, 11 }, { 0x58, 12 }, 153 { 0x17, 9 }, { 0x4, 11 }, { 0x5, 11 }, { 0x58, 12 },
154 { 0x59, 12 }, { 0x5a, 12 }, { 0x3, 7 }, 154 { 0x59, 12 }, { 0x5a, 12 }, { 0x3, 7 },
155 }; 155 };
156 156
157 const INT8 intra_run_aic[102] = { 157 const int8_t intra_run_aic[102] = {
158 0, 0, 0, 0, 0, 0, 0, 0, 158 0, 0, 0, 0, 0, 0, 0, 0,
159 0, 0, 0, 0, 0, 0, 0, 0, 159 0, 0, 0, 0, 0, 0, 0, 0,
160 0, 0, 0, 0, 0, 0, 0, 0, 160 0, 0, 0, 0, 0, 0, 0, 0,
161 0, 1, 1, 1, 1, 1, 1, 1, 161 0, 1, 1, 1, 1, 1, 1, 1,
162 2, 2, 2, 2, 3, 3, 3, 3, 162 2, 2, 2, 2, 3, 3, 3, 3,
168 5, 5, 6, 6, 7, 7, 8, 9, 168 5, 5, 6, 6, 7, 7, 8, 9,
169 10, 11, 12, 13, 14, 15, 16, 17, 169 10, 11, 12, 13, 14, 15, 16, 17,
170 18, 19, 20, 21, 22, 23, 170 18, 19, 20, 21, 22, 23,
171 }; 171 };
172 172
173 const INT8 intra_level_aic[102] = { 173 const int8_t intra_level_aic[102] = {
174 1, 2, 3, 4, 5, 6, 7, 8, 174 1, 2, 3, 4, 5, 6, 7, 8,
175 9, 10, 11, 12, 13, 14, 15, 16, 175 9, 10, 11, 12, 13, 14, 15, 16,
176 17, 18, 19, 20, 21, 22, 23, 24, 176 17, 18, 19, 20, 21, 22, 23, 24,
177 25, 1, 2, 3, 4, 5, 6, 7, 177 25, 1, 2, 3, 4, 5, 6, 7,
178 1, 2, 3, 4, 1, 2, 3, 4, 178 1, 2, 3, 4, 1, 2, 3, 4,
192 intra_vlc_aic, 192 intra_vlc_aic,
193 intra_run_aic, 193 intra_run_aic,
194 intra_level_aic, 194 intra_level_aic,
195 }; 195 };
196 196
197 static const UINT16 h263_format[8][2] = { 197 static const uint16_t h263_format[8][2] = {
198 { 0, 0 }, 198 { 0, 0 },
199 { 128, 96 }, 199 { 128, 96 },
200 { 176, 144 }, 200 { 176, 144 },
201 { 352, 288 }, 201 { 352, 288 },
202 { 704, 576 }, 202 { 704, 576 },
203 { 1408, 1152 }, 203 { 1408, 1152 },
204 }; 204 };
205 205
206 static UINT8 h263_aic_dc_scale_table[32]={ 206 static uint8_t h263_aic_dc_scale_table[32]={
207 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 207 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
208 0, 2, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62 208 0, 2, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62
209 }; 209 };
210 210