annotate msmpeg4data.h @ 12530:63edd10ad4bc libavcodec tip

Try to fix crashes introduced by r25218 r25218 made assumptions about the existence of past reference frames that weren't necessarily true.
author darkshikari
date Tue, 28 Sep 2010 09:06:22 +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: 2967
diff changeset
1 /*
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
2 * MSMPEG4 backend for ffmpeg encoder and decoder
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
3 * copyright (c) 2001 Fabrice Bellard
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
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: 2967
diff changeset
5 *
5214
470601203f44 Group all copyright and author notices together.
diego
parents: 4964
diff changeset
6 * msmpeg4v1 & v2 stuff by Michael Niedermayer <michaelni@gmx.at>
470601203f44 Group all copyright and author notices together.
diego
parents: 4964
diff changeset
7 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3699
diff changeset
8 * This file is part of FFmpeg.
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3699
diff changeset
9 *
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3699
diff changeset
10 * 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: 2967
diff changeset
11 * 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: 2967
diff changeset
12 * 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
13 * 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: 2967
diff changeset
14 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3699
diff changeset
15 * 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: 2967
diff changeset
16 * 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: 2967
diff changeset
17 * 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: 2967
diff changeset
18 * Lesser General Public License for more details.
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
19 *
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
20 * 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
21 * 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: 2967
diff changeset
22 * 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: 2967
diff changeset
23 */
c537a97eec66 Add official LGPL license headers to the files that were missing them.
diego
parents: 2967
diff changeset
24
1106
1e39f273ecd6 per file doxy
michaelni
parents: 1013
diff changeset
25 /**
11644
7dd2a45249a9 Remove explicit filename from Doxygen @file commands.
diego
parents: 10803
diff changeset
26 * @file
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2965
diff changeset
27 * MSMPEG4 data tables.
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
28 */
986e461dc072 Initial revision
glantau
parents:
diff changeset
29
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 7136
diff changeset
30 #ifndef AVCODEC_MSMPEG4DATA_H
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 7136
diff changeset
31 #define AVCODEC_MSMPEG4DATA_H
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
32
6763
f7cbb7733146 Use full path for #includes from another directory.
diego
parents: 6129
diff changeset
33 #include "libavutil/common.h"
9428
0dce4fe6e6f3 Rename bitstream.h to get_bits.h.
stefano
parents: 8718
diff changeset
34 #include "get_bits.h"
5543
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
35 #include "rl.h"
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
36
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
37 /* motion vector table */
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
38 typedef struct MVTable {
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
39 int n;
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
40 const uint16_t *table_mv_code;
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
41 const uint8_t *table_mv_bits;
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
42 const uint8_t *table_mvx;
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
43 const uint8_t *table_mvy;
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
44 uint16_t *table_mv_index; /* encoding: convert mv to index in table_mv */
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
45 VLC vlc; /* decoding: vlc */
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
46 } MVTable;
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
47
4964
9fb6d2125500 split msmpeg4 data to easily share some of it with vc1.c
aurel
parents: 4887
diff changeset
48 extern VLC ff_msmp4_mb_i_vlc;
9fb6d2125500 split msmpeg4 data to easily share some of it with vc1.c
aurel
parents: 4887
diff changeset
49 extern VLC ff_msmp4_dc_luma_vlc[2];
9fb6d2125500 split msmpeg4 data to easily share some of it with vc1.c
aurel
parents: 4887
diff changeset
50 extern VLC ff_msmp4_dc_chroma_vlc[2];
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
51
7980
3b5964de95cd spelling cosmetics
diego
parents: 7978
diff changeset
52 /* intra picture macroblock coded block pattern */
4964
9fb6d2125500 split msmpeg4 data to easily share some of it with vc1.c
aurel
parents: 4887
diff changeset
53 extern const uint16_t ff_msmp4_mb_i_table[64][2];
0
986e461dc072 Initial revision
glantau
parents:
diff changeset
54
5543
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
55 #define WMV1_SCANTABLE_COUNT 4
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
56
6129
bd1a8a378368 Move wmv1_scantable to .rodata section by making it an array of arrays.
benoit
parents: 5830
diff changeset
57 extern const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64];
5543
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
58
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
59 #define NB_RL_TABLES 6
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
60
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
61 extern RLTable rl_table[NB_RL_TABLES];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
62
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
63 extern const uint8_t wmv1_y_dc_scale_table[32];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
64 extern const uint8_t wmv1_c_dc_scale_table[32];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
65 extern const uint8_t old_ff_y_dc_scale_table[32];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
66
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
67 extern MVTable mv_tables[2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
68
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
69 extern const uint8_t v2_mb_type[8][2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
70 extern const uint8_t v2_intra_cbpc[4][2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
71
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
72 extern const uint32_t table_mb_non_intra[128][2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
73 extern const uint8_t table_inter_intra[4][2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
74
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
75 extern const uint32_t ff_table0_dc_lum[120][2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
76 extern const uint32_t ff_table1_dc_lum[120][2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
77 extern const uint32_t ff_table0_dc_chroma[120][2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
78 extern const uint32_t ff_table1_dc_chroma[120][2];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
79
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
80 #define WMV2_INTER_CBP_TABLE_COUNT 4
7978
dc1a7a6ec58d Add (additional) const to many global tables.
reimar
parents: 7760
diff changeset
81 extern const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2];
5543
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
82
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
83 extern const uint8_t wmv2_scantableA[64];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
84 extern const uint8_t wmv2_scantableB[64];
56bc8fbd9aee Move msmpeg4 tables from a header file to msmpegdata.c.
diego
parents: 5214
diff changeset
85
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 7136
diff changeset
86 #endif /* AVCODEC_MSMPEG4DATA_H */