add multiple inclusion guards to headers
[libav.git] / libavcodec / mpeg12data.h
CommitLineData
04d7f601
DB
1/*
2 * MPEG1 codec / MPEG2 decoder
3 * copyright (c) 2000,2001 Fabrice Bellard
4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 *
b78e7197
DB
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
04d7f601
DB
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
b78e7197 11 * version 2.1 of the License, or (at your option) any later version.
04d7f601 12 *
b78e7197 13 * FFmpeg is distributed in the hope that it will be useful,
04d7f601
DB
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
b78e7197 19 * License along with FFmpeg; if not, write to the Free Software
04d7f601
DB
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
983e3246
MN
23/**
24 * @file mpeg12data.h
25 * MPEG1/2 tables.
de6d9b64
FB
26 */
27
699b3f99
MR
28#ifndef AVCODEC_MPEG12DATA_H
29#define AVCODEC_MPEG12DATA_H
30
99545457
MR
31#include <stdint.h>
32#include "mpegvideo.h"
33
191e8ca7 34const uint16_t ff_mpeg1_default_intra_matrix[64] = {
bb270c08
DB
35 8, 16, 19, 22, 26, 27, 29, 34,
36 16, 16, 22, 24, 27, 29, 34, 37,
37 19, 22, 26, 27, 29, 34, 34, 38,
38 22, 22, 26, 27, 29, 34, 37, 40,
39 22, 26, 27, 29, 32, 35, 40, 48,
40 26, 27, 29, 32, 35, 40, 48, 58,
41 26, 27, 29, 34, 38, 46, 56, 69,
42 27, 29, 35, 38, 46, 56, 69, 83
de6d9b64
FB
43};
44
191e8ca7 45const uint16_t ff_mpeg1_default_non_intra_matrix[64] = {
de6d9b64
FB
46 16, 16, 16, 16, 16, 16, 16, 16,
47 16, 16, 16, 16, 16, 16, 16, 16,
48 16, 16, 16, 16, 16, 16, 16, 16,
49 16, 16, 16, 16, 16, 16, 16, 16,
50 16, 16, 16, 16, 16, 16, 16, 16,
51 16, 16, 16, 16, 16, 16, 16, 16,
52 16, 16, 16, 16, 16, 16, 16, 16,
53 16, 16, 16, 16, 16, 16, 16, 16,
54};
55
2a250222 56static const uint16_t vlc_dc_lum_code[12] = {
de6d9b64
FB
57 0x4, 0x0, 0x1, 0x5, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x1ff,
58};
2a250222 59static const unsigned char vlc_dc_lum_bits[12] = {
de6d9b64
FB
60 3, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 9,
61};
62
7b7abda3 63static const uint16_t vlc_dc_chroma_code[12] = {
de6d9b64
FB
64 0x0, 0x1, 0x2, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x3fe, 0x3ff,
65};
7b7abda3 66static const unsigned char vlc_dc_chroma_bits[12] = {
de6d9b64
FB
67 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10,
68};
69
0c1a9eda 70static const uint16_t mpeg1_vlc[113][2] = {
de6d9b64
FB
71 { 0x3, 2 }, { 0x4, 4 }, { 0x5, 5 }, { 0x6, 7 },
72 { 0x26, 8 }, { 0x21, 8 }, { 0xa, 10 }, { 0x1d, 12 },
73 { 0x18, 12 }, { 0x13, 12 }, { 0x10, 12 }, { 0x1a, 13 },
74 { 0x19, 13 }, { 0x18, 13 }, { 0x17, 13 }, { 0x1f, 14 },
75 { 0x1e, 14 }, { 0x1d, 14 }, { 0x1c, 14 }, { 0x1b, 14 },
76 { 0x1a, 14 }, { 0x19, 14 }, { 0x18, 14 }, { 0x17, 14 },
77 { 0x16, 14 }, { 0x15, 14 }, { 0x14, 14 }, { 0x13, 14 },
78 { 0x12, 14 }, { 0x11, 14 }, { 0x10, 14 }, { 0x18, 15 },
79 { 0x17, 15 }, { 0x16, 15 }, { 0x15, 15 }, { 0x14, 15 },
80 { 0x13, 15 }, { 0x12, 15 }, { 0x11, 15 }, { 0x10, 15 },
81 { 0x3, 3 }, { 0x6, 6 }, { 0x25, 8 }, { 0xc, 10 },
82 { 0x1b, 12 }, { 0x16, 13 }, { 0x15, 13 }, { 0x1f, 15 },
83 { 0x1e, 15 }, { 0x1d, 15 }, { 0x1c, 15 }, { 0x1b, 15 },
84 { 0x1a, 15 }, { 0x19, 15 }, { 0x13, 16 }, { 0x12, 16 },
85 { 0x11, 16 }, { 0x10, 16 }, { 0x5, 4 }, { 0x4, 7 },
86 { 0xb, 10 }, { 0x14, 12 }, { 0x14, 13 }, { 0x7, 5 },
87 { 0x24, 8 }, { 0x1c, 12 }, { 0x13, 13 }, { 0x6, 5 },
88 { 0xf, 10 }, { 0x12, 12 }, { 0x7, 6 }, { 0x9, 10 },
89 { 0x12, 13 }, { 0x5, 6 }, { 0x1e, 12 }, { 0x14, 16 },
90 { 0x4, 6 }, { 0x15, 12 }, { 0x7, 7 }, { 0x11, 12 },
91 { 0x5, 7 }, { 0x11, 13 }, { 0x27, 8 }, { 0x10, 13 },
92 { 0x23, 8 }, { 0x1a, 16 }, { 0x22, 8 }, { 0x19, 16 },
93 { 0x20, 8 }, { 0x18, 16 }, { 0xe, 10 }, { 0x17, 16 },
94 { 0xd, 10 }, { 0x16, 16 }, { 0x8, 10 }, { 0x15, 16 },
95 { 0x1f, 12 }, { 0x1a, 12 }, { 0x19, 12 }, { 0x17, 12 },
96 { 0x16, 12 }, { 0x1f, 13 }, { 0x1e, 13 }, { 0x1d, 13 },
97 { 0x1c, 13 }, { 0x1b, 13 }, { 0x1f, 16 }, { 0x1e, 16 },
98 { 0x1d, 16 }, { 0x1c, 16 }, { 0x1b, 16 },
99 { 0x1, 6 }, /* escape */
100 { 0x2, 2 }, /* EOB */
101};
102
0c1a9eda 103static const uint16_t mpeg2_vlc[113][2] = {
de6d9b64
FB
104 {0x02, 2}, {0x06, 3}, {0x07, 4}, {0x1c, 5},
105 {0x1d, 5}, {0x05, 6}, {0x04, 6}, {0x7b, 7},
106 {0x7c, 7}, {0x23, 8}, {0x22, 8}, {0xfa, 8},
107 {0xfb, 8}, {0xfe, 8}, {0xff, 8}, {0x1f,14},
108 {0x1e,14}, {0x1d,14}, {0x1c,14}, {0x1b,14},
109 {0x1a,14}, {0x19,14}, {0x18,14}, {0x17,14},
110 {0x16,14}, {0x15,14}, {0x14,14}, {0x13,14},
111 {0x12,14}, {0x11,14}, {0x10,14}, {0x18,15},
112 {0x17,15}, {0x16,15}, {0x15,15}, {0x14,15},
113 {0x13,15}, {0x12,15}, {0x11,15}, {0x10,15},
114 {0x02, 3}, {0x06, 5}, {0x79, 7}, {0x27, 8},
115 {0x20, 8}, {0x16,13}, {0x15,13}, {0x1f,15},
116 {0x1e,15}, {0x1d,15}, {0x1c,15}, {0x1b,15},
117 {0x1a,15}, {0x19,15}, {0x13,16}, {0x12,16},
115329f1
DB
118 {0x11,16}, {0x10,16}, {0x05, 5}, {0x07, 7},
119 {0xfc, 8}, {0x0c,10}, {0x14,13}, {0x07, 5},
120 {0x26, 8}, {0x1c,12}, {0x13,13}, {0x06, 6},
121 {0xfd, 8}, {0x12,12}, {0x07, 6}, {0x04, 9},
122 {0x12,13}, {0x06, 7}, {0x1e,12}, {0x14,16},
123 {0x04, 7}, {0x15,12}, {0x05, 7}, {0x11,12},
124 {0x78, 7}, {0x11,13}, {0x7a, 7}, {0x10,13},
125 {0x21, 8}, {0x1a,16}, {0x25, 8}, {0x19,16},
126 {0x24, 8}, {0x18,16}, {0x05, 9}, {0x17,16},
127 {0x07, 9}, {0x16,16}, {0x0d,10}, {0x15,16},
128 {0x1f,12}, {0x1a,12}, {0x19,12}, {0x17,12},
129 {0x16,12}, {0x1f,13}, {0x1e,13}, {0x1d,13},
130 {0x1c,13}, {0x1b,13}, {0x1f,16}, {0x1e,16},
131 {0x1d,16}, {0x1c,16}, {0x1b,16},
de6d9b64
FB
132 {0x01,6}, /* escape */
133 {0x06,4}, /* EOB */
134};
135
0c1a9eda 136static const int8_t mpeg1_level[111] = {
de6d9b64
FB
137 1, 2, 3, 4, 5, 6, 7, 8,
138 9, 10, 11, 12, 13, 14, 15, 16,
139 17, 18, 19, 20, 21, 22, 23, 24,
140 25, 26, 27, 28, 29, 30, 31, 32,
141 33, 34, 35, 36, 37, 38, 39, 40,
142 1, 2, 3, 4, 5, 6, 7, 8,
143 9, 10, 11, 12, 13, 14, 15, 16,
144 17, 18, 1, 2, 3, 4, 5, 1,
145 2, 3, 4, 1, 2, 3, 1, 2,
146 3, 1, 2, 3, 1, 2, 1, 2,
147 1, 2, 1, 2, 1, 2, 1, 2,
148 1, 2, 1, 2, 1, 2, 1, 2,
149 1, 1, 1, 1, 1, 1, 1, 1,
150 1, 1, 1, 1, 1, 1, 1,
151};
152
0c1a9eda 153static const int8_t mpeg1_run[111] = {
de6d9b64
FB
154 0, 0, 0, 0, 0, 0, 0, 0,
155 0, 0, 0, 0, 0, 0, 0, 0,
156 0, 0, 0, 0, 0, 0, 0, 0,
157 0, 0, 0, 0, 0, 0, 0, 0,
158 0, 0, 0, 0, 0, 0, 0, 0,
159 1, 1, 1, 1, 1, 1, 1, 1,
160 1, 1, 1, 1, 1, 1, 1, 1,
161 1, 1, 2, 2, 2, 2, 2, 3,
162 3, 3, 3, 4, 4, 4, 5, 5,
163 5, 6, 6, 6, 7, 7, 8, 8,
164 9, 9, 10, 10, 11, 11, 12, 12,
165 13, 13, 14, 14, 15, 15, 16, 16,
166 17, 18, 19, 20, 21, 22, 23, 24,
167 25, 26, 27, 28, 29, 30, 31,
168};
169
170static RLTable rl_mpeg1 = {
171 111,
172 111,
173 mpeg1_vlc,
174 mpeg1_run,
175 mpeg1_level,
176};
177
178static RLTable rl_mpeg2 = {
179 111,
180 111,
181 mpeg2_vlc,
182 mpeg1_run,
183 mpeg1_level,
184};
185
9c00c3af 186static const uint8_t mbAddrIncrTable[36][2] = {
de6d9b64
FB
187 {0x1, 1},
188 {0x3, 3},
189 {0x2, 3},
190 {0x3, 4},
191 {0x2, 4},
192 {0x3, 5},
193 {0x2, 5},
194 {0x7, 7},
195 {0x6, 7},
196 {0xb, 8},
197 {0xa, 8},
198 {0x9, 8},
199 {0x8, 8},
200 {0x7, 8},
201 {0x6, 8},
202 {0x17, 10},
203 {0x16, 10},
204 {0x15, 10},
205 {0x14, 10},
206 {0x13, 10},
207 {0x12, 10},
208 {0x23, 11},
209 {0x22, 11},
210 {0x21, 11},
211 {0x20, 11},
212 {0x1f, 11},
213 {0x1e, 11},
214 {0x1d, 11},
215 {0x1c, 11},
216 {0x1b, 11},
217 {0x1a, 11},
218 {0x19, 11},
219 {0x18, 11},
220 {0x8, 11}, /* escape */
221 {0xf, 11}, /* stuffing */
9c00c3af 222 {0x0, 8}, /* end (and 15 more 0 bits should follow) */
de6d9b64
FB
223};
224
461cd5bf
IK
225static const uint8_t mbPatTable[64][2] = {
226 {0x1, 9},
de6d9b64
FB
227 {0xb, 5},
228 {0x9, 5},
229 {0xd, 6},
230 {0xd, 4},
231 {0x17, 7},
232 {0x13, 7},
233 {0x1f, 8},
234 {0xc, 4},
235 {0x16, 7},
236 {0x12, 7},
237 {0x1e, 8},
238 {0x13, 5},
239 {0x1b, 8},
240 {0x17, 8},
241 {0x13, 8},
242 {0xb, 4},
243 {0x15, 7},
244 {0x11, 7},
245 {0x1d, 8},
246 {0x11, 5},
247 {0x19, 8},
248 {0x15, 8},
249 {0x11, 8},
250 {0xf, 6},
251 {0xf, 8},
252 {0xd, 8},
253 {0x3, 9},
254 {0xf, 5},
255 {0xb, 8},
256 {0x7, 8},
257 {0x7, 9},
258 {0xa, 4},
259 {0x14, 7},
260 {0x10, 7},
261 {0x1c, 8},
262 {0xe, 6},
263 {0xe, 8},
264 {0xc, 8},
265 {0x2, 9},
266 {0x10, 5},
267 {0x18, 8},
268 {0x14, 8},
269 {0x10, 8},
270 {0xe, 5},
271 {0xa, 8},
272 {0x6, 8},
273 {0x6, 9},
274 {0x12, 5},
275 {0x1a, 8},
276 {0x16, 8},
277 {0x12, 8},
278 {0xd, 5},
279 {0x9, 8},
280 {0x5, 8},
281 {0x5, 9},
282 {0xc, 5},
283 {0x8, 8},
284 {0x4, 8},
285 {0x4, 9},
286 {0x7, 3},
287 {0xa, 5},
288 {0x8, 5},
289 {0xc, 6}
290};
291
7bc9090a
MN
292#define MB_TYPE_ZERO_MV 0x20000000
293#define IS_ZERO_MV(a) ((a)&MB_TYPE_ZERO_MV)
de6d9b64 294
7bc9090a 295static const uint8_t table_mb_ptype[7][2] = {
1a565432
FB
296 { 3, 5 }, // 0x01 MB_INTRA
297 { 1, 2 }, // 0x02 MB_PAT
1a565432 298 { 1, 3 }, // 0x08 MB_FOR
1a565432 299 { 1, 1 }, // 0x0A MB_FOR|MB_PAT
1a565432
FB
300 { 1, 6 }, // 0x11 MB_QUANT|MB_INTRA
301 { 1, 5 }, // 0x12 MB_QUANT|MB_PAT
1a565432 302 { 2, 5 }, // 0x1A MB_QUANT|MB_FOR|MB_PAT
de6d9b64
FB
303};
304
7bc9090a
MN
305static const uint32_t ptype2mb_type[7] = {
306 MB_TYPE_INTRA,
b40cd4e0 307 MB_TYPE_L0 | MB_TYPE_CBP | MB_TYPE_ZERO_MV | MB_TYPE_16x16,
7bc9090a 308 MB_TYPE_L0,
b40cd4e0 309 MB_TYPE_L0 | MB_TYPE_CBP,
7bc9090a 310 MB_TYPE_QUANT | MB_TYPE_INTRA,
b40cd4e0
MN
311 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP | MB_TYPE_ZERO_MV | MB_TYPE_16x16,
312 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP,
7bc9090a
MN
313};
314
315static const uint8_t table_mb_btype[11][2] = {
1a565432 316 { 3, 5 }, // 0x01 MB_INTRA
1a565432 317 { 2, 3 }, // 0x04 MB_BACK
1a565432 318 { 3, 3 }, // 0x06 MB_BACK|MB_PAT
1a565432 319 { 2, 4 }, // 0x08 MB_FOR
1a565432 320 { 3, 4 }, // 0x0A MB_FOR|MB_PAT
1a565432 321 { 2, 2 }, // 0x0C MB_FOR|MB_BACK
1a565432 322 { 3, 2 }, // 0x0E MB_FOR|MB_BACK|MB_PAT
1a565432 323 { 1, 6 }, // 0x11 MB_QUANT|MB_INTRA
1a565432 324 { 2, 6 }, // 0x16 MB_QUANT|MB_BACK|MB_PAT
1a565432 325 { 3, 6 }, // 0x1A MB_QUANT|MB_FOR|MB_PAT
1a565432 326 { 2, 5 }, // 0x1E MB_QUANT|MB_FOR|MB_BACK|MB_PAT
7bc9090a
MN
327};
328
329static const uint32_t btype2mb_type[11] = {
330 MB_TYPE_INTRA,
331 MB_TYPE_L1,
b40cd4e0 332 MB_TYPE_L1 | MB_TYPE_CBP,
7bc9090a 333 MB_TYPE_L0,
b40cd4e0 334 MB_TYPE_L0 | MB_TYPE_CBP,
7bc9090a 335 MB_TYPE_L0L1,
b40cd4e0 336 MB_TYPE_L0L1 | MB_TYPE_CBP,
7bc9090a 337 MB_TYPE_QUANT | MB_TYPE_INTRA,
b40cd4e0
MN
338 MB_TYPE_QUANT | MB_TYPE_L1 | MB_TYPE_CBP,
339 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP,
340 MB_TYPE_QUANT | MB_TYPE_L0L1 | MB_TYPE_CBP,
de6d9b64
FB
341};
342
0c1a9eda 343static const uint8_t mbMotionVectorTable[17][2] = {
de6d9b64
FB
344{ 0x1, 1 },
345{ 0x1, 2 },
346{ 0x1, 3 },
347{ 0x1, 4 },
348{ 0x3, 6 },
349{ 0x5, 7 },
350{ 0x4, 7 },
351{ 0x3, 7 },
352{ 0xb, 9 },
353{ 0xa, 9 },
354{ 0x9, 9 },
355{ 0x11, 10 },
356{ 0x10, 10 },
357{ 0xf, 10 },
358{ 0xe, 10 },
359{ 0xd, 10 },
360{ 0xc, 10 },
361};
362
761089b0 363const AVRational ff_frame_rate_tab[] = {
8d52ec7e
MN
364 { 0, 0},
365 {24000, 1001},
366 { 24, 1},
367 { 25, 1},
368 {30000, 1001},
369 { 30, 1},
370 { 50, 1},
371 {60000, 1001},
372 { 60, 1},
14bea432 373 // Xing's 15fps: (9)
8d52ec7e 374 { 15, 1},
14bea432 375 // libmpeg3's "Unofficial economy rates": (10-13)
8d52ec7e
MN
376 { 5, 1},
377 { 10, 1},
378 { 12, 1},
379 { 15, 1},
380 { 0, 0},
de6d9b64
FB
381};
382
0c1a9eda 383static const uint8_t non_linear_qscale[32] = {
de6d9b64
FB
384 0, 1, 2, 3, 4, 5, 6, 7,
385 8,10,12,14,16,18,20,22,
386 24,28,32,36,40,44,48,52,
387 56,64,72,80,88,96,104,112,
388};
8f8402e4 389
5a6b9443
BC
390static const uint8_t inv_non_linear_qscale[13] = {
391 0, 2, 4, 6, 8,
392 9,10,11,12,13,14,15,16,
393};
394
c26ae41d 395const uint8_t ff_mpeg1_dc_scale_table[128]={
8f8402e4
MN
396// 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
397 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
398 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
399 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
400 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
401};
402
ed4e20ac 403static const uint8_t mpeg2_dc_scale_table1[128]={
60f41d13
MN
404// 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
405 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
406 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
407 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
408 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
409};
410
115329f1 411static const uint8_t mpeg2_dc_scale_table2[128]={
60f41d13
MN
412// 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
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
416 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
417};
418
115329f1 419static const uint8_t mpeg2_dc_scale_table3[128]={
60f41d13
MN
420// 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
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425};
426
c26ae41d 427static const uint8_t *mpeg2_dc_scale_table[4]={
60f41d13
MN
428 ff_mpeg1_dc_scale_table,
429 mpeg2_dc_scale_table1,
430 mpeg2_dc_scale_table2,
115329f1 431 mpeg2_dc_scale_table3,
60f41d13
MN
432};
433
945f15b7
MN
434static const float mpeg1_aspect[16]={
435 0.0000,
436 1.0000,
437 0.6735,
438 0.7031,
115329f1 439
945f15b7
MN
440 0.7615,
441 0.8055,
442 0.8437,
443 0.8935,
444
445 0.9157,
446 0.9815,
447 1.0255,
448 1.0695,
449
450 1.0950,
451 1.1575,
452 1.2015,
453};
454
5ff85f1d
MN
455static const AVRational mpeg2_aspect[16]={
456 {0,1},
457 {1,1},
458 {4,3},
459 {16,9},
460 {221,100},
461 {0,1},
462 {0,1},
463 {0,1},
464 {0,1},
465 {0,1},
466 {0,1},
467 {0,1},
468 {0,1},
469 {0,1},
470 {0,1},
471 {0,1},
945f15b7 472};
8f8402e4 473
baaf3f46
MN
474static const uint8_t svcd_scan_offset_placeholder[14]={
475 0x10, 0x0E,
476 0x00, 0x80, 0x81,
477 0x00, 0x80, 0x81,
478 0xff, 0xff, 0xff,
479 0xff, 0xff, 0xff,
480};
699b3f99
MR
481
482#endif