annotate mpeg4data.h @ 12478:5942c42c44e5 libavcodec

Add G.722 ADPCM audio decoder
author mstorsjo
date Thu, 09 Sep 2010 19:21:16 +0000
parents 7dd2a45249a9
children
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: 3066
diff changeset
1 /*
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3066
diff changeset
2 * copyright (c) 2000,2001 Fabrice Bellard
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3066
diff changeset
3 * H263+ support
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3066
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: 3066
diff changeset
5 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3699
diff changeset
6 * This file is part of FFmpeg.
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3699
diff changeset
7 *
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3699
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: 3066
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: 3066
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: 3699
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: 3066
diff changeset
12 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3699
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: 3066
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: 3066
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: 3066
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: 3066
diff changeset
17 *
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3066
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: 3699
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: 3066
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: 3066
diff changeset
21 */
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 3066
diff changeset
22
1106
1e39f273ecd6 per file doxy
michaelni
parents: 1064
diff changeset
23 /**
11644
7dd2a45249a9 Remove explicit filename from Doxygen @file commands.
diego
parents: 10830
diff changeset
24 * @file
1106
1e39f273ecd6 per file doxy
michaelni
parents: 1064
diff changeset
25 * mpeg4 tables.
1e39f273ecd6 per file doxy
michaelni
parents: 1064
diff changeset
26 */
1e39f273ecd6 per file doxy
michaelni
parents: 1064
diff changeset
27
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
28 #ifndef AVCODEC_MPEG4DATA_H
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
29 #define AVCODEC_MPEG4DATA_H
5163
9ecbfc0c82bf add multiple inclusion guards to headers
mru
parents: 5162
diff changeset
30
5162
4394344397d8 include all prerequisites in header files
mru
parents: 5129
diff changeset
31 #include <stdint.h>
4394344397d8 include all prerequisites in header files
mru
parents: 5129
diff changeset
32 #include "mpegvideo.h"
4394344397d8 include all prerequisites in header files
mru
parents: 5129
diff changeset
33
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
34 /* dc encoding for mpeg4 */
10816
9abebeca7d1b Rename DCtab_*, its a global variable and it helps understanding if mpeg4
michael
parents: 10803
diff changeset
35 const uint8_t ff_mpeg4_DCtab_lum[13][2] =
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
36 {
986e461dc072 Initial revision
glantau
parents:
diff changeset
37 {3,3}, {3,2}, {2,2}, {2,3}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7},
986e461dc072 Initial revision
glantau
parents:
diff changeset
38 {1,8}, {1,9}, {1,10}, {1,11},
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
39 };
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
40
10816
9abebeca7d1b Rename DCtab_*, its a global variable and it helps understanding if mpeg4
michael
parents: 10803
diff changeset
41 const uint8_t ff_mpeg4_DCtab_chrom[13][2] =
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
42 {
986e461dc072 Initial revision
glantau
parents:
diff changeset
43 {3,2}, {2,2}, {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, {1,8},
986e461dc072 Initial revision
glantau
parents:
diff changeset
44 {1,9}, {1,10}, {1,11}, {1,12},
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
45 };
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
46
10817
d1fe22d92a65 Rename mpeg4 intra vlc tables so they contain "mpeg4", this improves readability
michael
parents: 10816
diff changeset
47 const uint16_t ff_mpeg4_intra_vlc[103][2] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
48 { 0x2, 2 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
49 { 0x6, 3 },{ 0xf, 4 },{ 0xd, 5 },{ 0xc, 5 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
50 { 0x15, 6 },{ 0x13, 6 },{ 0x12, 6 },{ 0x17, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
51 { 0x1f, 8 },{ 0x1e, 8 },{ 0x1d, 8 },{ 0x25, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
52 { 0x24, 9 },{ 0x23, 9 },{ 0x21, 9 },{ 0x21, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
53 { 0x20, 10 },{ 0xf, 10 },{ 0xe, 10 },{ 0x7, 11 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
54 { 0x6, 11 },{ 0x20, 11 },{ 0x21, 11 },{ 0x50, 12 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
55 { 0x51, 12 },{ 0x52, 12 },{ 0xe, 4 },{ 0x14, 6 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
56 { 0x16, 7 },{ 0x1c, 8 },{ 0x20, 9 },{ 0x1f, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
57 { 0xd, 10 },{ 0x22, 11 },{ 0x53, 12 },{ 0x55, 12 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
58 { 0xb, 5 },{ 0x15, 7 },{ 0x1e, 9 },{ 0xc, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
59 { 0x56, 12 },{ 0x11, 6 },{ 0x1b, 8 },{ 0x1d, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
60 { 0xb, 10 },{ 0x10, 6 },{ 0x22, 9 },{ 0xa, 10 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
61 { 0xd, 6 },{ 0x1c, 9 },{ 0x8, 10 },{ 0x12, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
62 { 0x1b, 9 },{ 0x54, 12 },{ 0x14, 7 },{ 0x1a, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
63 { 0x57, 12 },{ 0x19, 8 },{ 0x9, 10 },{ 0x18, 8 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
64 { 0x23, 11 },{ 0x17, 8 },{ 0x19, 9 },{ 0x18, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
65 { 0x7, 10 },{ 0x58, 12 },{ 0x7, 4 },{ 0xc, 6 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
66 { 0x16, 8 },{ 0x17, 9 },{ 0x6, 10 },{ 0x5, 11 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
67 { 0x4, 11 },{ 0x59, 12 },{ 0xf, 6 },{ 0x16, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
68 { 0x5, 10 },{ 0xe, 6 },{ 0x4, 10 },{ 0x11, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
69 { 0x24, 11 },{ 0x10, 7 },{ 0x25, 11 },{ 0x13, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
70 { 0x5a, 12 },{ 0x15, 8 },{ 0x5b, 12 },{ 0x14, 8 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
71 { 0x13, 8 },{ 0x1a, 8 },{ 0x15, 9 },{ 0x14, 9 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
72 { 0x13, 9 },{ 0x12, 9 },{ 0x11, 9 },{ 0x26, 11 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
73 { 0x27, 11 },{ 0x5c, 12 },{ 0x5d, 12 },{ 0x5e, 12 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
74 { 0x5f, 12 },{ 0x3, 7 },
986e461dc072 Initial revision
glantau
parents:
diff changeset
75 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
76
10817
d1fe22d92a65 Rename mpeg4 intra vlc tables so they contain "mpeg4", this improves readability
michael
parents: 10816
diff changeset
77 const int8_t ff_mpeg4_intra_level[102] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
78 1, 2, 3, 4, 5, 6, 7, 8,
986e461dc072 Initial revision
glantau
parents:
diff changeset
79 9, 10, 11, 12, 13, 14, 15, 16,
986e461dc072 Initial revision
glantau
parents:
diff changeset
80 17, 18, 19, 20, 21, 22, 23, 24,
986e461dc072 Initial revision
glantau
parents:
diff changeset
81 25, 26, 27, 1, 2, 3, 4, 5,
986e461dc072 Initial revision
glantau
parents:
diff changeset
82 6, 7, 8, 9, 10, 1, 2, 3,
986e461dc072 Initial revision
glantau
parents:
diff changeset
83 4, 5, 1, 2, 3, 4, 1, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
84 3, 1, 2, 3, 1, 2, 3, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
85 2, 3, 1, 2, 1, 2, 1, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
86 1, 1, 1, 1, 2, 3, 4, 5,
986e461dc072 Initial revision
glantau
parents:
diff changeset
87 6, 7, 8, 1, 2, 3, 1, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
88 1, 2, 1, 2, 1, 2, 1, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
89 1, 1, 1, 1, 1, 1, 1, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
90 1, 1, 1, 1, 1, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
91 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
92
10817
d1fe22d92a65 Rename mpeg4 intra vlc tables so they contain "mpeg4", this improves readability
michael
parents: 10816
diff changeset
93 const int8_t ff_mpeg4_intra_run[102] = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
94 0, 0, 0, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
95 0, 0, 0, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
96 0, 0, 0, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
97 0, 0, 0, 1, 1, 1, 1, 1,
986e461dc072 Initial revision
glantau
parents:
diff changeset
98 1, 1, 1, 1, 1, 2, 2, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
99 2, 2, 3, 3, 3, 3, 4, 4,
986e461dc072 Initial revision
glantau
parents:
diff changeset
100 4, 5, 5, 5, 6, 6, 6, 7,
986e461dc072 Initial revision
glantau
parents:
diff changeset
101 7, 7, 8, 8, 9, 9, 10, 11,
986e461dc072 Initial revision
glantau
parents:
diff changeset
102 12, 13, 14, 0, 0, 0, 0, 0,
986e461dc072 Initial revision
glantau
parents:
diff changeset
103 0, 0, 0, 1, 1, 1, 2, 2,
986e461dc072 Initial revision
glantau
parents:
diff changeset
104 3, 3, 4, 4, 5, 5, 6, 6,
986e461dc072 Initial revision
glantau
parents:
diff changeset
105 7, 8, 9, 10, 11, 12, 13, 14,
986e461dc072 Initial revision
glantau
parents:
diff changeset
106 15, 16, 17, 18, 19, 20,
986e461dc072 Initial revision
glantau
parents:
diff changeset
107 };
986e461dc072 Initial revision
glantau
parents:
diff changeset
108
10817
d1fe22d92a65 Rename mpeg4 intra vlc tables so they contain "mpeg4", this improves readability
michael
parents: 10816
diff changeset
109 RLTable ff_mpeg4_rl_intra = {
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
110 102,
986e461dc072 Initial revision
glantau
parents:
diff changeset
111 67,
10817
d1fe22d92a65 Rename mpeg4 intra vlc tables so they contain "mpeg4", this improves readability
michael
parents: 10816
diff changeset
112 ff_mpeg4_intra_vlc,
d1fe22d92a65 Rename mpeg4 intra vlc tables so they contain "mpeg4", this improves readability
michael
parents: 10816
diff changeset
113 ff_mpeg4_intra_run,
d1fe22d92a65 Rename mpeg4 intra vlc tables so they contain "mpeg4", this improves readability
michael
parents: 10816
diff changeset
114 ff_mpeg4_intra_level,
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
115 };
254
b4fed8b24e3a gmc bitstream decoding support (the real motion compensation isnt implemnted yet)
michaelni
parents: 253
diff changeset
116
5129
0244bba24b43 misc typo fixes
diego
parents: 3947
diff changeset
117 /* Note this is identical to the intra rvlc except that it is reordered. */
10803
4605bd2fdb7f Split the mpeg4 encoder and decoder off h263.c
michael
parents: 8718
diff changeset
118 const uint16_t inter_rvlc[170][2]={
1132
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
119 {0x0006, 3},{0x0001, 4},{0x0004, 5},{0x001C, 7},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
120 {0x003C, 8},{0x003D, 8},{0x007C, 9},{0x00FC, 10},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
121 {0x00FD, 10},{0x01FC, 11},{0x01FD, 11},{0x03FC, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
122 {0x07FC, 13},{0x07FD, 13},{0x0BFC, 13},{0x0BFD, 13},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
123 {0x0FFC, 14},{0x0FFD, 14},{0x1FFC, 15},{0x0007, 3},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
124 {0x000C, 6},{0x005C, 8},{0x007D, 9},{0x017C, 10},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
125 {0x02FC, 11},{0x03FD, 12},{0x0DFC, 13},{0x17FC, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
126 {0x17FD, 14},{0x000A, 4},{0x001D, 7},{0x00BC, 9},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
127 {0x02FD, 11},{0x05FC, 12},{0x1BFC, 14},{0x1BFD, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
128 {0x0005, 5},{0x005D, 8},{0x017D, 10},{0x05FD, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
129 {0x0DFD, 13},{0x1DFC, 14},{0x1FFD, 15},{0x0008, 5},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
130 {0x006C, 8},{0x037C, 11},{0x0EFC, 13},{0x2FFC, 15},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
131 {0x0009, 5},{0x00BD, 9},{0x037D, 11},{0x0EFD, 13},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
132 {0x000D, 6},{0x01BC, 10},{0x06FC, 12},{0x1DFD, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
133 {0x0014, 6},{0x01BD, 10},{0x06FD, 12},{0x2FFD, 15},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
134 {0x0015, 6},{0x01DC, 10},{0x0F7C, 13},{0x002C, 7},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
135 {0x01DD, 10},{0x1EFC, 14},{0x002D, 7},{0x03BC, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
136 {0x0034, 7},{0x077C, 12},{0x006D, 8},{0x0F7D, 13},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
137 {0x0074, 8},{0x1EFD, 14},{0x0075, 8},{0x1F7C, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
138 {0x00DC, 9},{0x1F7D, 14},{0x00DD, 9},{0x1FBC, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
139 {0x00EC, 9},{0x37FC, 15},{0x01EC, 10},{0x01ED, 10},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
140 {0x01F4, 10},{0x03BD, 11},{0x03DC, 11},{0x03DD, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
141 {0x03EC, 11},{0x03ED, 11},{0x03F4, 11},{0x077D, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
142 {0x07BC, 12},{0x07BD, 12},{0x0FBC, 13},{0x0FBD, 13},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
143 {0x0FDC, 13},{0x0FDD, 13},{0x1FBD, 14},{0x1FDC, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
144 {0x1FDD, 14},{0x37FD, 15},{0x3BFC, 15},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
145 {0x000B, 4},{0x0078, 8},{0x03F5, 11},{0x0FEC, 13},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
146 {0x1FEC, 14},{0x0012, 5},{0x00ED, 9},{0x07DC, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
147 {0x1FED, 14},{0x3BFD, 15},{0x0013, 5},{0x03F8, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
148 {0x3DFC, 15},{0x0018, 6},{0x07DD, 12},{0x0019, 6},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
149 {0x07EC, 12},{0x0022, 6},{0x0FED, 13},{0x0023, 6},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
150 {0x0FF4, 13},{0x0035, 7},{0x0FF5, 13},{0x0038, 7},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
151 {0x0FF8, 13},{0x0039, 7},{0x0FF9, 13},{0x0042, 7},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
152 {0x1FF4, 14},{0x0043, 7},{0x1FF5, 14},{0x0079, 8},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
153 {0x1FF8, 14},{0x0082, 8},{0x3DFD, 15},{0x0083, 8},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
154 {0x00F4, 9},{0x00F5, 9},{0x00F8, 9},{0x00F9, 9},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
155 {0x0102, 9},{0x0103, 9},{0x01F5, 10},{0x01F8, 10},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
156 {0x01F9, 10},{0x0202, 10},{0x0203, 10},{0x03F9, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
157 {0x0402, 11},{0x0403, 11},{0x07ED, 12},{0x07F4, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
158 {0x07F5, 12},{0x07F8, 12},{0x07F9, 12},{0x0802, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
159 {0x0803, 12},{0x1002, 13},{0x1003, 13},{0x1FF9, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
160 {0x2002, 14},{0x2003, 14},{0x3EFC, 15},{0x3EFD, 15},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
161 {0x3F7C, 15},{0x3F7D, 15},{0x0000, 4}
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
162 };
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
163
10830
34739b965809 Make some tables static again, i mistakely thought they would be used in several
michael
parents: 10817
diff changeset
164 static const int8_t inter_rvlc_run[169]={
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
165 0, 0, 0, 0, 0, 0, 0, 0,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
166 0, 0, 0, 0, 0, 0, 0, 0,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
167 0, 0, 0, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
168 1, 1, 1, 1, 1, 2, 2, 2,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
169 2, 2, 2, 2, 3, 3, 3, 3,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
170 3, 3, 3, 4, 4, 4, 4, 4,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
171 5, 5, 5, 5, 6, 6, 6, 6,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
172 7, 7, 7, 7, 8, 8, 8, 9,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
173 9, 9, 10, 10, 11, 11, 12, 12,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
174 13, 13, 14, 14, 15, 15, 16, 16,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
175 17, 17, 18, 19, 20, 21, 22, 23,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
176 24, 25, 26, 27, 28, 29, 30, 31,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
177 32, 33, 34, 35, 36, 37, 38,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
178 0, 0, 0, 0, 0, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
179 1, 1, 2, 2, 2, 3, 3, 4,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
180 4, 5, 5, 6, 6, 7, 7, 8,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
181 8, 9, 9, 10, 10, 11, 11, 12,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
182 12, 13, 13, 14, 15, 16, 17, 18,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
183 19, 20, 21, 22, 23, 24, 25, 26,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
184 27, 28, 29, 30, 31, 32, 33, 34,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
185 35, 36, 37, 38, 39, 40, 41, 42,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
186 43, 44,
1132
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
187 };
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
188
10830
34739b965809 Make some tables static again, i mistakely thought they would be used in several
michael
parents: 10817
diff changeset
189 static const int8_t inter_rvlc_level[169]={
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
190 1, 2, 3, 4, 5, 6, 7, 8,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
191 9, 10, 11, 12, 13, 14, 15, 16,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
192 17, 18, 19, 1, 2, 3, 4, 5,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
193 6, 7, 8, 9, 10, 1, 2, 3,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
194 4, 5, 6, 7, 1, 2, 3, 4,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
195 5, 6, 7, 1, 2, 3, 4, 5,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
196 1, 2, 3, 4, 1, 2, 3, 4,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
197 1, 2, 3, 4, 1, 2, 3, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
198 2, 3, 1, 2, 1, 2, 1, 2,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
199 1, 2, 1, 2, 1, 2, 1, 2,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
200 1, 2, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
201 1, 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
202 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
203 1, 2, 3, 4, 5, 1, 2, 3,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
204 4, 5, 1, 2, 3, 1, 2, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
205 2, 1, 2, 1, 2, 1, 2, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
206 2, 1, 2, 1, 2, 1, 2, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
207 2, 1, 2, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
208 1, 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
209 1, 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
210 1, 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
211 1, 1,
1132
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
212 };
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
213
10803
4605bd2fdb7f Split the mpeg4 encoder and decoder off h263.c
michael
parents: 8718
diff changeset
214 RLTable rvlc_rl_inter = {
1132
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
215 169,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
216 103,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
217 inter_rvlc,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
218 inter_rvlc_run,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
219 inter_rvlc_level,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
220 };
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
221
10803
4605bd2fdb7f Split the mpeg4 encoder and decoder off h263.c
michael
parents: 8718
diff changeset
222 const uint16_t intra_rvlc[170][2]={
1132
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
223 {0x0006, 3},{0x0007, 3},{0x000A, 4},{0x0009, 5},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
224 {0x0014, 6},{0x0015, 6},{0x0034, 7},{0x0074, 8},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
225 {0x0075, 8},{0x00DD, 9},{0x00EC, 9},{0x01EC, 10},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
226 {0x01ED, 10},{0x01F4, 10},{0x03EC, 11},{0x03ED, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
227 {0x03F4, 11},{0x077D, 12},{0x07BC, 12},{0x0FBD, 13},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
228 {0x0FDC, 13},{0x07BD, 12},{0x0FDD, 13},{0x1FBD, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
229 {0x1FDC, 14},{0x1FDD, 14},{0x1FFC, 15},{0x0001, 4},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
230 {0x0008, 5},{0x002D, 7},{0x006C, 8},{0x006D, 8},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
231 {0x00DC, 9},{0x01DD, 10},{0x03DC, 11},{0x03DD, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
232 {0x077C, 12},{0x0FBC, 13},{0x1F7D, 14},{0x1FBC, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
233 {0x0004, 5},{0x002C, 7},{0x00BC, 9},{0x01DC, 10},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
234 {0x03BC, 11},{0x03BD, 11},{0x0EFD, 13},{0x0F7C, 13},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
235 {0x0F7D, 13},{0x1EFD, 14},{0x1F7C, 14},{0x0005, 5},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
236 {0x005C, 8},{0x00BD, 9},{0x037D, 11},{0x06FC, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
237 {0x0EFC, 13},{0x1DFD, 14},{0x1EFC, 14},{0x1FFD, 15},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
238 {0x000C, 6},{0x005D, 8},{0x01BD, 10},{0x03FD, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
239 {0x06FD, 12},{0x1BFD, 14},{0x000D, 6},{0x007D, 9},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
240 {0x02FC, 11},{0x05FC, 12},{0x1BFC, 14},{0x1DFC, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
241 {0x001C, 7},{0x017C, 10},{0x02FD, 11},{0x05FD, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
242 {0x2FFC, 15},{0x001D, 7},{0x017D, 10},{0x037C, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
243 {0x0DFD, 13},{0x2FFD, 15},{0x003C, 8},{0x01BC, 10},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
244 {0x0BFD, 13},{0x17FD, 14},{0x003D, 8},{0x01FD, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
245 {0x0DFC, 13},{0x37FC, 15},{0x007C, 9},{0x03FC, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
246 {0x00FC, 10},{0x0BFC, 13},{0x00FD, 10},{0x37FD, 15},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
247 {0x01FC, 11},{0x07FC, 13},{0x07FD, 13},{0x0FFC, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
248 {0x0FFD, 14},{0x17FC, 14},{0x3BFC, 15},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
249 {0x000B, 4},{0x0078, 8},{0x03F5, 11},{0x0FEC, 13},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
250 {0x1FEC, 14},{0x0012, 5},{0x00ED, 9},{0x07DC, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
251 {0x1FED, 14},{0x3BFD, 15},{0x0013, 5},{0x03F8, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
252 {0x3DFC, 15},{0x0018, 6},{0x07DD, 12},{0x0019, 6},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
253 {0x07EC, 12},{0x0022, 6},{0x0FED, 13},{0x0023, 6},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
254 {0x0FF4, 13},{0x0035, 7},{0x0FF5, 13},{0x0038, 7},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
255 {0x0FF8, 13},{0x0039, 7},{0x0FF9, 13},{0x0042, 7},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
256 {0x1FF4, 14},{0x0043, 7},{0x1FF5, 14},{0x0079, 8},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
257 {0x1FF8, 14},{0x0082, 8},{0x3DFD, 15},{0x0083, 8},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
258 {0x00F4, 9},{0x00F5, 9},{0x00F8, 9},{0x00F9, 9},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
259 {0x0102, 9},{0x0103, 9},{0x01F5, 10},{0x01F8, 10},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
260 {0x01F9, 10},{0x0202, 10},{0x0203, 10},{0x03F9, 11},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
261 {0x0402, 11},{0x0403, 11},{0x07ED, 12},{0x07F4, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
262 {0x07F5, 12},{0x07F8, 12},{0x07F9, 12},{0x0802, 12},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
263 {0x0803, 12},{0x1002, 13},{0x1003, 13},{0x1FF9, 14},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
264 {0x2002, 14},{0x2003, 14},{0x3EFC, 15},{0x3EFD, 15},
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
265 {0x3F7C, 15},{0x3F7D, 15},{0x0000, 4}
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
266 };
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
267
10830
34739b965809 Make some tables static again, i mistakely thought they would be used in several
michael
parents: 10817
diff changeset
268 static const int8_t intra_rvlc_run[169]={
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
269 0, 0, 0, 0, 0, 0, 0, 0,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
270 0, 0, 0, 0, 0, 0, 0, 0,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
271 0, 0, 0, 0, 0, 0, 0, 0,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
272 0, 0, 0, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
273 1, 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
274 2, 2, 2, 2, 2, 2, 2, 2,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
275 2, 2, 2, 3, 3, 3, 3, 3,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
276 3, 3, 3, 3, 4, 4, 4, 4,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
277 4, 4, 5, 5, 5, 5, 5, 5,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
278 6, 6, 6, 6, 6, 7, 7, 7,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
279 7, 7, 8, 8, 8, 8, 9, 9,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
280 9, 9, 10, 10, 11, 11, 12, 12,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
281 13, 14, 15, 16, 17, 18, 19,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
282 0, 0, 0, 0, 0, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
283 1, 1, 2, 2, 2, 3, 3, 4,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
284 4, 5, 5, 6, 6, 7, 7, 8,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
285 8, 9, 9, 10, 10, 11, 11, 12,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
286 12, 13, 13, 14, 15, 16, 17, 18,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
287 19, 20, 21, 22, 23, 24, 25, 26,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
288 27, 28, 29, 30, 31, 32, 33, 34,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
289 35, 36, 37, 38, 39, 40, 41, 42,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
290 43, 44,
1132
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
291 };
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
292
10830
34739b965809 Make some tables static again, i mistakely thought they would be used in several
michael
parents: 10817
diff changeset
293 static const int8_t intra_rvlc_level[169]={
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
294 1, 2, 3, 4, 5, 6, 7, 8,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
295 9, 10, 11, 12, 13, 14, 15, 16,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
296 17, 18, 19, 20, 21, 22, 23, 24,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
297 25, 26, 27, 1, 2, 3, 4, 5,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
298 6, 7, 8, 9, 10, 11, 12, 13,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
299 1, 2, 3, 4, 5, 6, 7, 8,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
300 9, 10, 11, 1, 2, 3, 4, 5,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
301 6, 7, 8, 9, 1, 2, 3, 4,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
302 5, 6, 1, 2, 3, 4, 5, 6,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
303 1, 2, 3, 4, 5, 1, 2, 3,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
304 4, 5, 1, 2, 3, 4, 1, 2,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
305 3, 4, 1, 2, 1, 2, 1, 2,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
306 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
307 1, 2, 3, 4, 5, 1, 2, 3,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
308 4, 5, 1, 2, 3, 1, 2, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
309 2, 1, 2, 1, 2, 1, 2, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
310 2, 1, 2, 1, 2, 1, 2, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
311 2, 1, 2, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
312 1, 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
313 1, 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
314 1, 1, 1, 1, 1, 1, 1, 1,
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
315 1, 1,
1132
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
316 };
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
317
10803
4605bd2fdb7f Split the mpeg4 encoder and decoder off h263.c
michael
parents: 8718
diff changeset
318 RLTable rvlc_rl_intra = {
1132
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
319 169,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
320 103,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
321 intra_rvlc,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
322 intra_rvlc_run,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
323 intra_rvlc_level,
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
324 };
61c89e8ffa88 rvlc decoding support
michaelni
parents: 1106
diff changeset
325
10803
4605bd2fdb7f Split the mpeg4 encoder and decoder off h263.c
michael
parents: 8718
diff changeset
326 const uint16_t sprite_trajectory_tab[15][2] = {
254
b4fed8b24e3a gmc bitstream decoding support (the real motion compensation isnt implemnted yet)
michaelni
parents: 253
diff changeset
327 {0x00, 2}, {0x02, 3}, {0x03, 3}, {0x04, 3}, {0x05, 3}, {0x06, 3},
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
328 {0x0E, 4}, {0x1E, 5}, {0x3E, 6}, {0x7E, 7}, {0xFE, 8},
254
b4fed8b24e3a gmc bitstream decoding support (the real motion compensation isnt implemnted yet)
michaelni
parents: 253
diff changeset
329 {0x1FE, 9},{0x3FE, 10},{0x7FE, 11},{0xFFE, 12},
b4fed8b24e3a gmc bitstream decoding support (the real motion compensation isnt implemnted yet)
michaelni
parents: 253
diff changeset
330 };
262
7d941b8c4e84 mpeg4 b-frames :)
michaelni
parents: 254
diff changeset
331
10803
4605bd2fdb7f Split the mpeg4 encoder and decoder off h263.c
michael
parents: 8718
diff changeset
332 const uint8_t mb_type_b_tab[4][2] = {
262
7d941b8c4e84 mpeg4 b-frames :)
michaelni
parents: 254
diff changeset
333 {1, 1}, {1, 2}, {1, 3}, {1, 4},
7d941b8c4e84 mpeg4 b-frames :)
michaelni
parents: 254
diff changeset
334 };
307
764aeec1320e msmpeg4v2 decoding (no encoding yet)
michaelni
parents: 262
diff changeset
335
312
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
336 /* these matrixes will be permuted for the idct */
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 942
diff changeset
337 const int16_t ff_mpeg4_default_intra_matrix[64] = {
312
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
338 8, 17, 18, 19, 21, 23, 25, 27,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
339 17, 18, 19, 21, 23, 25, 27, 28,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
340 20, 21, 22, 23, 24, 26, 28, 30,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
341 21, 22, 23, 24, 26, 28, 30, 32,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
342 22, 23, 24, 26, 28, 30, 32, 35,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
343 23, 24, 26, 28, 30, 32, 35, 38,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
344 25, 26, 28, 30, 32, 35, 38, 41,
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2753
diff changeset
345 27, 28, 30, 32, 35, 38, 41, 45,
312
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
346 };
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
347
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 942
diff changeset
348 const int16_t ff_mpeg4_default_non_intra_matrix[64] = {
312
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
349 16, 17, 18, 19, 20, 21, 22, 23,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
350 17, 18, 19, 20, 21, 22, 23, 24,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
351 18, 19, 20, 21, 22, 23, 24, 25,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
352 19, 20, 21, 22, 23, 24, 26, 27,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
353 20, 21, 22, 23, 25, 26, 27, 28,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
354 21, 22, 23, 24, 26, 27, 28, 30,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
355 22, 23, 24, 26, 27, 28, 30, 31,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
356 23, 24, 25, 27, 28, 30, 31, 33,
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
357 };
8cf5507e6ca5 mpeg4 mpeg quantizer support
michaelni
parents: 307
diff changeset
358
2753
ba8ecddf5598 adding a few const
michael
parents: 1548
diff changeset
359 const uint8_t ff_mpeg4_y_dc_scale_table[32]={
498
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 458
diff changeset
360 // 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: 458
diff changeset
361 0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,36,38,40,42,44,46
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 458
diff changeset
362 };
2753
ba8ecddf5598 adding a few const
michael
parents: 1548
diff changeset
363 const uint8_t ff_mpeg4_c_dc_scale_table[32]={
498
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 458
diff changeset
364 // 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: 458
diff changeset
365 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 458
diff changeset
366 };
0b4450c15067 dc scale simplification/optimization
michaelni
parents: 458
diff changeset
367
1064
b32afefe7d33 * UINTX -> uintx_t INTX -> intx_t
kabi
parents: 942
diff changeset
368 const uint16_t ff_mpeg4_resync_prefix[8]={
745
25d7fb7c89be better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents: 706
diff changeset
369 0x7F00, 0x7E00, 0x7C00, 0x7800, 0x7000, 0x6000, 0x4000, 0x0000
25d7fb7c89be better/cleaner error resilience (done in a 2nd pass after decoding)
michaelni
parents: 706
diff changeset
370 };
1520
ad5461bad820 intra dc treshold != 0 decoding fixed
michael
parents: 1349
diff changeset
371
10803
4605bd2fdb7f Split the mpeg4 encoder and decoder off h263.c
michael
parents: 8718
diff changeset
372 const uint8_t mpeg4_dc_threshold[8]={
1520
ad5461bad820 intra dc treshold != 0 decoding fixed
michael
parents: 1349
diff changeset
373 99, 13, 15, 17, 19, 21, 23, 0
ad5461bad820 intra dc treshold != 0 decoding fixed
michael
parents: 1349
diff changeset
374 };
5163
9ecbfc0c82bf add multiple inclusion guards to headers
mru
parents: 5162
diff changeset
375
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 5830
diff changeset
376 #endif /* AVCODEC_MPEG4DATA_H */