annotate mpeg12data.h @ 4507:b80c704183e9 libavcodec

always decode extradata when of non-avc stream (like RTSP) Patch by Francois Oligny-Lemieux % eucloid A gmail P com % Original thread: Date: Feb 9, 2007 12:00 AM Subject: [Ffmpeg-devel] h264.c patch, always decoding extradata when on non avc stream
author gpoirier
date Fri, 09 Feb 2007 22:25:29 +0000
parents 85e1f5ceb97e
children 5464e5021a67
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3699
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
1 /*
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
2 * MPEG1 codec / MPEG2 decoder
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
3 * copyright (c) 2000,2001 Fabrice Bellard
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
4 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
5 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3776
diff changeset
6 * This file is part of FFmpeg.
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3776
diff changeset
7 *
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3776
diff changeset
8 * FFmpeg is free software; you can redistribute it and/or
3699
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
9 * modify it under the terms of the GNU Lesser General Public
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
10 * License as published by the Free Software Foundation; either
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3776
diff changeset
11 * version 2.1 of the License, or (at your option) any later version.
3699
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
12 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3776
diff changeset
13 * FFmpeg is distributed in the hope that it will be useful,
3699
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
16 * Lesser General Public License for more details.
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
17 *
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3776
diff changeset
19 * License along with FFmpeg; if not, write to the Free Software
3699
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
21 */
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3556
diff changeset
22
1106
1e39f273ecd6 per file doxy
michaelni
parents: 1091
diff changeset
23 /**
1e39f273ecd6 per file doxy
michaelni
parents: 1091
diff changeset
24 * @file mpeg12data.h
1e39f273ecd6 per file doxy
michaelni
parents: 1091
diff changeset
25 * MPEG1/2 tables.
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
26 */
986e461dc072 Initial revision
glantau
parents:
diff changeset
27
3776
1843a85123b7 fix some signedness warnings
mru
parents: 3699
diff changeset
28 const uint16_t ff_mpeg1_default_intra_matrix[64] = {
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
29 8, 16, 19, 22, 26, 27, 29, 34,
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
30 16, 16, 22, 24, 27, 29, 34, 37,
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
31 19, 22, 26, 27, 29, 34, 34, 38,
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
32 22, 22, 26, 27, 29, 34, 37, 40,
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
33 22, 26, 27, 29, 32, 35, 40, 48,
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
34 26, 27, 29, 32, 35, 40, 48, 58,
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
35 26, 27, 29, 34, 38, 46, 56, 69,
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
36 27, 29, 35, 38, 46, 56, 69, 83
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
37 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
38
3776
1843a85123b7 fix some signedness warnings
mru
parents: 3699
diff changeset
39 const uint16_t ff_mpeg1_default_non_intra_matrix[64] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
40 16, 16, 16, 16, 16, 16, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
41 16, 16, 16, 16, 16, 16, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
42 16, 16, 16, 16, 16, 16, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
43 16, 16, 16, 16, 16, 16, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
44 16, 16, 16, 16, 16, 16, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
45 16, 16, 16, 16, 16, 16, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
46 16, 16, 16, 16, 16, 16, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
47 16, 16, 16, 16, 16, 16, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
48 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
49
1325
1cbc2380d172 CONFIG_ENCODERS cleanup
michaelni
parents: 1181
diff changeset
50 static const uint16_t vlc_dc_lum_code[12] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
51 0x4, 0x0, 0x1, 0x5, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x1ff,
986e461dc072 Initial revision
glantau
parents:
diff changeset
52 };
1325
1cbc2380d172 CONFIG_ENCODERS cleanup
michaelni
parents: 1181
diff changeset
53 static const unsigned char vlc_dc_lum_bits[12] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
54 3, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 9,
986e461dc072 Initial revision
glantau
parents:
diff changeset
55 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
56
4180
85e1f5ceb97e make more tables static
mru
parents: 3947
diff changeset
57 static const uint16_t vlc_dc_chroma_code[12] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
58 0x0, 0x1, 0x2, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x3fe, 0x3ff,
986e461dc072 Initial revision
glantau
parents:
diff changeset
59 };
4180
85e1f5ceb97e make more tables static
mru
parents: 3947
diff changeset
60 static const unsigned char vlc_dc_chroma_bits[12] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
61 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10,
986e461dc072 Initial revision
glantau
parents:
diff changeset
62 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
63
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 917
diff changeset
64 static const uint16_t mpeg1_vlc[113][2] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
65 { 0x3, 2 }, { 0x4, 4 }, { 0x5, 5 }, { 0x6, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
66 { 0x26, 8 }, { 0x21, 8 }, { 0xa, 10 }, { 0x1d, 12 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
67 { 0x18, 12 }, { 0x13, 12 }, { 0x10, 12 }, { 0x1a, 13 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
68 { 0x19, 13 }, { 0x18, 13 }, { 0x17, 13 }, { 0x1f, 14 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
69 { 0x1e, 14 }, { 0x1d, 14 }, { 0x1c, 14 }, { 0x1b, 14 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
70 { 0x1a, 14 }, { 0x19, 14 }, { 0x18, 14 }, { 0x17, 14 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
71 { 0x16, 14 }, { 0x15, 14 }, { 0x14, 14 }, { 0x13, 14 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
72 { 0x12, 14 }, { 0x11, 14 }, { 0x10, 14 }, { 0x18, 15 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
73 { 0x17, 15 }, { 0x16, 15 }, { 0x15, 15 }, { 0x14, 15 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
74 { 0x13, 15 }, { 0x12, 15 }, { 0x11, 15 }, { 0x10, 15 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
75 { 0x3, 3 }, { 0x6, 6 }, { 0x25, 8 }, { 0xc, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
76 { 0x1b, 12 }, { 0x16, 13 }, { 0x15, 13 }, { 0x1f, 15 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
77 { 0x1e, 15 }, { 0x1d, 15 }, { 0x1c, 15 }, { 0x1b, 15 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
78 { 0x1a, 15 }, { 0x19, 15 }, { 0x13, 16 }, { 0x12, 16 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
79 { 0x11, 16 }, { 0x10, 16 }, { 0x5, 4 }, { 0x4, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
80 { 0xb, 10 }, { 0x14, 12 }, { 0x14, 13 }, { 0x7, 5 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
81 { 0x24, 8 }, { 0x1c, 12 }, { 0x13, 13 }, { 0x6, 5 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
82 { 0xf, 10 }, { 0x12, 12 }, { 0x7, 6 }, { 0x9, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
83 { 0x12, 13 }, { 0x5, 6 }, { 0x1e, 12 }, { 0x14, 16 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
84 { 0x4, 6 }, { 0x15, 12 }, { 0x7, 7 }, { 0x11, 12 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
85 { 0x5, 7 }, { 0x11, 13 }, { 0x27, 8 }, { 0x10, 13 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
86 { 0x23, 8 }, { 0x1a, 16 }, { 0x22, 8 }, { 0x19, 16 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
87 { 0x20, 8 }, { 0x18, 16 }, { 0xe, 10 }, { 0x17, 16 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
88 { 0xd, 10 }, { 0x16, 16 }, { 0x8, 10 }, { 0x15, 16 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
89 { 0x1f, 12 }, { 0x1a, 12 }, { 0x19, 12 }, { 0x17, 12 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
90 { 0x16, 12 }, { 0x1f, 13 }, { 0x1e, 13 }, { 0x1d, 13 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
91 { 0x1c, 13 }, { 0x1b, 13 }, { 0x1f, 16 }, { 0x1e, 16 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
92 { 0x1d, 16 }, { 0x1c, 16 }, { 0x1b, 16 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
93 { 0x1, 6 }, /* escape */
986e461dc072 Initial revision
glantau
parents:
diff changeset
94 { 0x2, 2 }, /* EOB */
986e461dc072 Initial revision
glantau
parents:
diff changeset
95 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
96
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 917
diff changeset
97 static const uint16_t mpeg2_vlc[113][2] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
98 {0x02, 2}, {0x06, 3}, {0x07, 4}, {0x1c, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
99 {0x1d, 5}, {0x05, 6}, {0x04, 6}, {0x7b, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
100 {0x7c, 7}, {0x23, 8}, {0x22, 8}, {0xfa, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
101 {0xfb, 8}, {0xfe, 8}, {0xff, 8}, {0x1f,14},
986e461dc072 Initial revision
glantau
parents:
diff changeset
102 {0x1e,14}, {0x1d,14}, {0x1c,14}, {0x1b,14},
986e461dc072 Initial revision
glantau
parents:
diff changeset
103 {0x1a,14}, {0x19,14}, {0x18,14}, {0x17,14},
986e461dc072 Initial revision
glantau
parents:
diff changeset
104 {0x16,14}, {0x15,14}, {0x14,14}, {0x13,14},
986e461dc072 Initial revision
glantau
parents:
diff changeset
105 {0x12,14}, {0x11,14}, {0x10,14}, {0x18,15},
986e461dc072 Initial revision
glantau
parents:
diff changeset
106 {0x17,15}, {0x16,15}, {0x15,15}, {0x14,15},
986e461dc072 Initial revision
glantau
parents:
diff changeset
107 {0x13,15}, {0x12,15}, {0x11,15}, {0x10,15},
986e461dc072 Initial revision
glantau
parents:
diff changeset
108 {0x02, 3}, {0x06, 5}, {0x79, 7}, {0x27, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
109 {0x20, 8}, {0x16,13}, {0x15,13}, {0x1f,15},
986e461dc072 Initial revision
glantau
parents:
diff changeset
110 {0x1e,15}, {0x1d,15}, {0x1c,15}, {0x1b,15},
986e461dc072 Initial revision
glantau
parents:
diff changeset
111 {0x1a,15}, {0x19,15}, {0x13,16}, {0x12,16},
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
112 {0x11,16}, {0x10,16}, {0x05, 5}, {0x07, 7},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
113 {0xfc, 8}, {0x0c,10}, {0x14,13}, {0x07, 5},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
114 {0x26, 8}, {0x1c,12}, {0x13,13}, {0x06, 6},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
115 {0xfd, 8}, {0x12,12}, {0x07, 6}, {0x04, 9},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
116 {0x12,13}, {0x06, 7}, {0x1e,12}, {0x14,16},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
117 {0x04, 7}, {0x15,12}, {0x05, 7}, {0x11,12},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
118 {0x78, 7}, {0x11,13}, {0x7a, 7}, {0x10,13},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
119 {0x21, 8}, {0x1a,16}, {0x25, 8}, {0x19,16},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
120 {0x24, 8}, {0x18,16}, {0x05, 9}, {0x17,16},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
121 {0x07, 9}, {0x16,16}, {0x0d,10}, {0x15,16},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
122 {0x1f,12}, {0x1a,12}, {0x19,12}, {0x17,12},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
123 {0x16,12}, {0x1f,13}, {0x1e,13}, {0x1d,13},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
124 {0x1c,13}, {0x1b,13}, {0x1f,16}, {0x1e,16},
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
125 {0x1d,16}, {0x1c,16}, {0x1b,16},
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
126 {0x01,6}, /* escape */
986e461dc072 Initial revision
glantau
parents:
diff changeset
127 {0x06,4}, /* EOB */
986e461dc072 Initial revision
glantau
parents:
diff changeset
128 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
129
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 917
diff changeset
130 static const int8_t mpeg1_level[111] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
131 1, 2, 3, 4, 5, 6, 7, 8,
986e461dc072 Initial revision
glantau
parents:
diff changeset
132 9, 10, 11, 12, 13, 14, 15, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
133 17, 18, 19, 20, 21, 22, 23, 24,
986e461dc072 Initial revision
glantau
parents:
diff changeset
134 25, 26, 27, 28, 29, 30, 31, 32,
986e461dc072 Initial revision
glantau
parents:
diff changeset
135 33, 34, 35, 36, 37, 38, 39, 40,
986e461dc072 Initial revision
glantau
parents:
diff changeset
136 1, 2, 3, 4, 5, 6, 7, 8,
986e461dc072 Initial revision
glantau
parents:
diff changeset
137 9, 10, 11, 12, 13, 14, 15, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
138 17, 18, 1, 2, 3, 4, 5, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
139 2, 3, 4, 1, 2, 3, 1, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
140 3, 1, 2, 3, 1, 2, 1, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
141 1, 2, 1, 2, 1, 2, 1, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
142 1, 2, 1, 2, 1, 2, 1, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
143 1, 1, 1, 1, 1, 1, 1, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
144 1, 1, 1, 1, 1, 1, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
145 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
146
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 917
diff changeset
147 static const int8_t mpeg1_run[111] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
148 0, 0, 0, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
149 0, 0, 0, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
150 0, 0, 0, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
151 0, 0, 0, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
152 0, 0, 0, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
153 1, 1, 1, 1, 1, 1, 1, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
154 1, 1, 1, 1, 1, 1, 1, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
155 1, 1, 2, 2, 2, 2, 2, 3,
986e461dc072 Initial revision
glantau
parents:
diff changeset
156 3, 3, 3, 4, 4, 4, 5, 5,
986e461dc072 Initial revision
glantau
parents:
diff changeset
157 5, 6, 6, 6, 7, 7, 8, 8,
986e461dc072 Initial revision
glantau
parents:
diff changeset
158 9, 9, 10, 10, 11, 11, 12, 12,
986e461dc072 Initial revision
glantau
parents:
diff changeset
159 13, 13, 14, 14, 15, 15, 16, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
160 17, 18, 19, 20, 21, 22, 23, 24,
986e461dc072 Initial revision
glantau
parents:
diff changeset
161 25, 26, 27, 28, 29, 30, 31,
986e461dc072 Initial revision
glantau
parents:
diff changeset
162 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
163
986e461dc072 Initial revision
glantau
parents:
diff changeset
164 static RLTable rl_mpeg1 = {
986e461dc072 Initial revision
glantau
parents:
diff changeset
165 111,
986e461dc072 Initial revision
glantau
parents:
diff changeset
166 111,
986e461dc072 Initial revision
glantau
parents:
diff changeset
167 mpeg1_vlc,
986e461dc072 Initial revision
glantau
parents:
diff changeset
168 mpeg1_run,
986e461dc072 Initial revision
glantau
parents:
diff changeset
169 mpeg1_level,
986e461dc072 Initial revision
glantau
parents:
diff changeset
170 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
171
986e461dc072 Initial revision
glantau
parents:
diff changeset
172 static RLTable rl_mpeg2 = {
986e461dc072 Initial revision
glantau
parents:
diff changeset
173 111,
986e461dc072 Initial revision
glantau
parents:
diff changeset
174 111,
986e461dc072 Initial revision
glantau
parents:
diff changeset
175 mpeg2_vlc,
986e461dc072 Initial revision
glantau
parents:
diff changeset
176 mpeg1_run,
986e461dc072 Initial revision
glantau
parents:
diff changeset
177 mpeg1_level,
986e461dc072 Initial revision
glantau
parents:
diff changeset
178 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
179
1181
4c2339f3863a 100l (mpeg2 decoding fixed)
michaelni
parents: 1177
diff changeset
180 static const uint8_t mbAddrIncrTable[36][2] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
181 {0x1, 1},
986e461dc072 Initial revision
glantau
parents:
diff changeset
182 {0x3, 3},
986e461dc072 Initial revision
glantau
parents:
diff changeset
183 {0x2, 3},
986e461dc072 Initial revision
glantau
parents:
diff changeset
184 {0x3, 4},
986e461dc072 Initial revision
glantau
parents:
diff changeset
185 {0x2, 4},
986e461dc072 Initial revision
glantau
parents:
diff changeset
186 {0x3, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
187 {0x2, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
188 {0x7, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
189 {0x6, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
190 {0xb, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
191 {0xa, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
192 {0x9, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
193 {0x8, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
194 {0x7, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
195 {0x6, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
196 {0x17, 10},
986e461dc072 Initial revision
glantau
parents:
diff changeset
197 {0x16, 10},
986e461dc072 Initial revision
glantau
parents:
diff changeset
198 {0x15, 10},
986e461dc072 Initial revision
glantau
parents:
diff changeset
199 {0x14, 10},
986e461dc072 Initial revision
glantau
parents:
diff changeset
200 {0x13, 10},
986e461dc072 Initial revision
glantau
parents:
diff changeset
201 {0x12, 10},
986e461dc072 Initial revision
glantau
parents:
diff changeset
202 {0x23, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
203 {0x22, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
204 {0x21, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
205 {0x20, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
206 {0x1f, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
207 {0x1e, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
208 {0x1d, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
209 {0x1c, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
210 {0x1b, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
211 {0x1a, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
212 {0x19, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
213 {0x18, 11},
986e461dc072 Initial revision
glantau
parents:
diff changeset
214 {0x8, 11}, /* escape */
986e461dc072 Initial revision
glantau
parents:
diff changeset
215 {0xf, 11}, /* stuffing */
1181
4c2339f3863a 100l (mpeg2 decoding fixed)
michaelni
parents: 1177
diff changeset
216 {0x0, 8}, /* end (and 15 more 0 bits should follow) */
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
217 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
218
1853
9de89f579086 add vlc for cbp=0 that is valid in 422,444
iive
parents: 1837
diff changeset
219 static const uint8_t mbPatTable[64][2] = {
9de89f579086 add vlc for cbp=0 that is valid in 422,444
iive
parents: 1837
diff changeset
220 {0x1, 9},
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
221 {0xb, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
222 {0x9, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
223 {0xd, 6},
986e461dc072 Initial revision
glantau
parents:
diff changeset
224 {0xd, 4},
986e461dc072 Initial revision
glantau
parents:
diff changeset
225 {0x17, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
226 {0x13, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
227 {0x1f, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
228 {0xc, 4},
986e461dc072 Initial revision
glantau
parents:
diff changeset
229 {0x16, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
230 {0x12, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
231 {0x1e, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
232 {0x13, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
233 {0x1b, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
234 {0x17, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
235 {0x13, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
236 {0xb, 4},
986e461dc072 Initial revision
glantau
parents:
diff changeset
237 {0x15, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
238 {0x11, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
239 {0x1d, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
240 {0x11, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
241 {0x19, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
242 {0x15, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
243 {0x11, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
244 {0xf, 6},
986e461dc072 Initial revision
glantau
parents:
diff changeset
245 {0xf, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
246 {0xd, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
247 {0x3, 9},
986e461dc072 Initial revision
glantau
parents:
diff changeset
248 {0xf, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
249 {0xb, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
250 {0x7, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
251 {0x7, 9},
986e461dc072 Initial revision
glantau
parents:
diff changeset
252 {0xa, 4},
986e461dc072 Initial revision
glantau
parents:
diff changeset
253 {0x14, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
254 {0x10, 7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
255 {0x1c, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
256 {0xe, 6},
986e461dc072 Initial revision
glantau
parents:
diff changeset
257 {0xe, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
258 {0xc, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
259 {0x2, 9},
986e461dc072 Initial revision
glantau
parents:
diff changeset
260 {0x10, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
261 {0x18, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
262 {0x14, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
263 {0x10, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
264 {0xe, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
265 {0xa, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
266 {0x6, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
267 {0x6, 9},
986e461dc072 Initial revision
glantau
parents:
diff changeset
268 {0x12, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
269 {0x1a, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
270 {0x16, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
271 {0x12, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
272 {0xd, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
273 {0x9, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
274 {0x5, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
275 {0x5, 9},
986e461dc072 Initial revision
glantau
parents:
diff changeset
276 {0xc, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
277 {0x8, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
278 {0x4, 8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
279 {0x4, 9},
986e461dc072 Initial revision
glantau
parents:
diff changeset
280 {0x7, 3},
986e461dc072 Initial revision
glantau
parents:
diff changeset
281 {0xa, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
282 {0x8, 5},
986e461dc072 Initial revision
glantau
parents:
diff changeset
283 {0xc, 6}
986e461dc072 Initial revision
glantau
parents:
diff changeset
284 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
285
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
286 #define MB_TYPE_ZERO_MV 0x20000000
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
287 #define IS_ZERO_MV(a) ((a)&MB_TYPE_ZERO_MV)
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
288
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
289 static const uint8_t table_mb_ptype[7][2] = {
64
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
290 { 3, 5 }, // 0x01 MB_INTRA
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
291 { 1, 2 }, // 0x02 MB_PAT
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
292 { 1, 3 }, // 0x08 MB_FOR
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
293 { 1, 1 }, // 0x0A MB_FOR|MB_PAT
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
294 { 1, 6 }, // 0x11 MB_QUANT|MB_INTRA
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
295 { 1, 5 }, // 0x12 MB_QUANT|MB_PAT
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
296 { 2, 5 }, // 0x1A MB_QUANT|MB_FOR|MB_PAT
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
297 };
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
298
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
299 static const uint32_t ptype2mb_type[7] = {
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
300 MB_TYPE_INTRA,
1655
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
301 MB_TYPE_L0 | MB_TYPE_CBP | MB_TYPE_ZERO_MV | MB_TYPE_16x16,
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
302 MB_TYPE_L0,
1655
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
303 MB_TYPE_L0 | MB_TYPE_CBP,
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
304 MB_TYPE_QUANT | MB_TYPE_INTRA,
1655
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
305 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP | MB_TYPE_ZERO_MV | MB_TYPE_16x16,
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
306 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP,
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
307 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
308
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
309 static const uint8_t table_mb_btype[11][2] = {
64
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
310 { 3, 5 }, // 0x01 MB_INTRA
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
311 { 2, 3 }, // 0x04 MB_BACK
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
312 { 3, 3 }, // 0x06 MB_BACK|MB_PAT
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
313 { 2, 4 }, // 0x08 MB_FOR
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
314 { 3, 4 }, // 0x0A MB_FOR|MB_PAT
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
315 { 2, 2 }, // 0x0C MB_FOR|MB_BACK
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
316 { 3, 2 }, // 0x0E MB_FOR|MB_BACK|MB_PAT
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
317 { 1, 6 }, // 0x11 MB_QUANT|MB_INTRA
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
318 { 2, 6 }, // 0x16 MB_QUANT|MB_BACK|MB_PAT
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
319 { 3, 6 }, // 0x1A MB_QUANT|MB_FOR|MB_PAT
5aa6292a1660 win32 fixes
glantau
parents: 39
diff changeset
320 { 2, 5 }, // 0x1E MB_QUANT|MB_FOR|MB_BACK|MB_PAT
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
321 };
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
322
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
323 static const uint32_t btype2mb_type[11] = {
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
324 MB_TYPE_INTRA,
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
325 MB_TYPE_L1,
1655
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
326 MB_TYPE_L1 | MB_TYPE_CBP,
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
327 MB_TYPE_L0,
1655
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
328 MB_TYPE_L0 | MB_TYPE_CBP,
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
329 MB_TYPE_L0L1,
1655
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
330 MB_TYPE_L0L1 | MB_TYPE_CBP,
1177
fea03d2c4946 simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture
michaelni
parents: 1126
diff changeset
331 MB_TYPE_QUANT | MB_TYPE_INTRA,
1655
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
332 MB_TYPE_QUANT | MB_TYPE_L1 | MB_TYPE_CBP,
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
333 MB_TYPE_QUANT | MB_TYPE_L0 | MB_TYPE_CBP,
c92147a61d97 rv20 (h263) b frame decoding support
michael
parents: 1548
diff changeset
334 MB_TYPE_QUANT | MB_TYPE_L0L1 | MB_TYPE_CBP,
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
335 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
336
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 917
diff changeset
337 static const uint8_t mbMotionVectorTable[17][2] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
338 { 0x1, 1 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
339 { 0x1, 2 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
340 { 0x1, 3 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
341 { 0x1, 4 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
342 { 0x3, 6 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
343 { 0x5, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
344 { 0x4, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
345 { 0x3, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
346 { 0xb, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
347 { 0xa, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
348 { 0x9, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
349 { 0x11, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
350 { 0x10, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
351 { 0xf, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
352 { 0xe, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
353 { 0xd, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
354 { 0xc, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
355 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
356
3391
d60dc0a7dee6 staric frame_rate_tab -> non static ff_frame_rate_tab part of the cavs patch by (Stefan Gehrer stefan.gehrer gmx de)
michael
parents: 2979
diff changeset
357 const AVRational ff_frame_rate_tab[] = {
1837
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
358 { 0, 0},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
359 {24000, 1001},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
360 { 24, 1},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
361 { 25, 1},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
362 {30000, 1001},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
363 { 30, 1},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
364 { 50, 1},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
365 {60000, 1001},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
366 { 60, 1},
1126
77ccf7fe3bd0 per context frame_rate_base, this should finally fix frame_rate related av sync issues
michaelni
parents: 1106
diff changeset
367 // Xing's 15fps: (9)
1837
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
368 { 15, 1},
1126
77ccf7fe3bd0 per context frame_rate_base, this should finally fix frame_rate related av sync issues
michaelni
parents: 1106
diff changeset
369 // libmpeg3's "Unofficial economy rates": (10-13)
1837
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
370 { 5, 1},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
371 { 10, 1},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
372 { 12, 1},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
373 { 15, 1},
a4d9e8b4e2f8 AVCodec.supported_framerates
michael
parents: 1721
diff changeset
374 { 0, 0},
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
375 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
376
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 917
diff changeset
377 static const uint8_t non_linear_qscale[32] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
378 0, 1, 2, 3, 4, 5, 6, 7,
986e461dc072 Initial revision
glantau
parents:
diff changeset
379 8,10,12,14,16,18,20,22,
986e461dc072 Initial revision
glantau
parents:
diff changeset
380 24,28,32,36,40,44,48,52,
986e461dc072 Initial revision
glantau
parents:
diff changeset
381 56,64,72,80,88,96,104,112,
986e461dc072 Initial revision
glantau
parents:
diff changeset
382 };
498
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
383
2753
ba8ecddf5598 adding a few const
michael
parents: 1993
diff changeset
384 const uint8_t ff_mpeg1_dc_scale_table[128]={
498
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
385 // 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
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
386 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,
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
387 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,
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
388 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,
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
389 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,
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
390 };
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
391
3556
6805c1e5507e Fix some "'static' is not at beginning of declaration" warnings.
diego
parents: 3391
diff changeset
392 static const uint8_t mpeg2_dc_scale_table1[128]={
1993
michael
parents: 1986
diff changeset
393 // 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
michael
parents: 1986
diff changeset
394 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,
michael
parents: 1986
diff changeset
395 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,
michael
parents: 1986
diff changeset
396 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,
michael
parents: 1986
diff changeset
397 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,
michael
parents: 1986
diff changeset
398 };
michael
parents: 1986
diff changeset
399
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
400 static const uint8_t mpeg2_dc_scale_table2[128]={
1993
michael
parents: 1986
diff changeset
401 // 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
michael
parents: 1986
diff changeset
402 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,
michael
parents: 1986
diff changeset
403 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,
michael
parents: 1986
diff changeset
404 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,
michael
parents: 1986
diff changeset
405 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,
michael
parents: 1986
diff changeset
406 };
michael
parents: 1986
diff changeset
407
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
408 static const uint8_t mpeg2_dc_scale_table3[128]={
1993
michael
parents: 1986
diff changeset
409 // 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
michael
parents: 1986
diff changeset
410 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,
michael
parents: 1986
diff changeset
411 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,
michael
parents: 1986
diff changeset
412 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,
michael
parents: 1986
diff changeset
413 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,
michael
parents: 1986
diff changeset
414 };
michael
parents: 1986
diff changeset
415
2753
ba8ecddf5598 adding a few const
michael
parents: 1993
diff changeset
416 static const uint8_t *mpeg2_dc_scale_table[4]={
1993
michael
parents: 1986
diff changeset
417 ff_mpeg1_dc_scale_table,
michael
parents: 1986
diff changeset
418 mpeg2_dc_scale_table1,
michael
parents: 1986
diff changeset
419 mpeg2_dc_scale_table2,
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
420 mpeg2_dc_scale_table3,
1993
michael
parents: 1986
diff changeset
421 };
michael
parents: 1986
diff changeset
422
917
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
423 static const float mpeg1_aspect[16]={
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
424 0.0000,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
425 1.0000,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
426 0.6735,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
427 0.7031,
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
428
917
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
429 0.7615,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
430 0.8055,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
431 0.8437,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
432 0.8935,
498
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 237
diff changeset
433
917
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
434 0.9157,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
435 0.9815,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
436 1.0255,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
437 1.0695,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
438
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
439 1.0950,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
440 1.1575,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
441 1.2015,
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
442 };
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
443
1548
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
444 static const AVRational mpeg2_aspect[16]={
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
445 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
446 {1,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
447 {4,3},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
448 {16,9},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
449 {221,100},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
450 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
451 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
452 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
453 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
454 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
455 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
456 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
457 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
458 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
459 {0,1},
dd544554ed42 AVRational
michael
parents: 1325
diff changeset
460 {0,1},
917
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
461 };
d3aa313dc373 mpeg1&2 aspect decoding
michaelni
parents: 706
diff changeset
462
1721
8158e66f1f75 SVCD scan offset stuff
michael
parents: 1655
diff changeset
463 static const uint8_t svcd_scan_offset_placeholder[14]={
8158e66f1f75 SVCD scan offset stuff
michael
parents: 1655
diff changeset
464 0x10, 0x0E,
8158e66f1f75 SVCD scan offset stuff
michael
parents: 1655
diff changeset
465 0x00, 0x80, 0x81,
8158e66f1f75 SVCD scan offset stuff
michael
parents: 1655
diff changeset
466 0x00, 0x80, 0x81,
8158e66f1f75 SVCD scan offset stuff
michael
parents: 1655
diff changeset
467 0xff, 0xff, 0xff,
8158e66f1f75 SVCD scan offset stuff
michael
parents: 1655
diff changeset
468 0xff, 0xff, 0xff,
8158e66f1f75 SVCD scan offset stuff
michael
parents: 1655
diff changeset
469 };