annotate dv_tablegen.c @ 11560:8a4984c5cacc libavcodec

Define AVMediaType enum, and use it instead of enum CodecType, which is deprecated and will be dropped at the next major bump.
author stefano
date Tue, 30 Mar 2010 23:30:55 +0000
parents 3367dd5913a0
children e03e3df6fb7d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11523
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
1 /*
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
2 * Generate a header file for hardcoded DV tables
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
3 *
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
4 * Copyright (c) 2010 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
5 *
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
6 * This file is part of FFmpeg.
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
7 *
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
8 * FFmpeg is free software; you can redistribute it and/or
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
9 * modify it under the terms of the GNU Lesser General Public
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
10 * License as published by the Free Software Foundation; either
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
11 * version 2.1 of the License, or (at your option) any later version.
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
12 *
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
13 * FFmpeg is distributed in the hope that it will be useful,
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
16 * Lesser General Public License for more details.
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
17 *
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
19 * License along with FFmpeg; if not, write to the Free Software
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
21 */
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
22
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
23 #include <stdlib.h>
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
24 #define CONFIG_HARDCODED_TABLES 0
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
25 #ifndef CONFIG_SMALL
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
26 #error CONFIG_SMALL must be defined to generate tables
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
27 #endif
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
28 #include "dv_tablegen.h"
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
29 #include "tableprint.h"
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
30 #include <inttypes.h>
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
31
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
32 WRITE_1D_FUNC_ARGV(vlc_pair, struct dv_vlc_pair, 7,
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
33 "{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
34 WRITE_2D_FUNC(vlc_pair, struct dv_vlc_pair)
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
35
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
36 void tableinit(void)
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
37 {
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
38 dv_vlc_map_tableinit();
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
39 }
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
40
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
41 const struct tabledef tables[] = {
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
42 {
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
43 "static const struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE]",
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
44 write_vlc_pair_2d_array,
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
45 dv_vlc_map,
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
46 DV_VLC_MAP_RUN_SIZE,
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
47 DV_VLC_MAP_LEV_SIZE
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
48 },
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
49 { NULL }
3367dd5913a0 Add support for hard-coding the 256kB large dv_vlc_map table.
reimar
parents:
diff changeset
50 };