summaryrefslogtreecommitdiff
path: root/libavcodec/dv_tablegen.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-04-01 17:11:47 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-04-01 17:11:47 +0000
commit8eaa6e0e04c3c340d7c44a97613ebc6dbcc0a51d (patch)
tree6b40a6af3963c4f53e90e1e9a6dbbd05eb98ca3e /libavcodec/dv_tablegen.c
parent27eecec3598b0c35b7aeb10c08f2c5e42b1fdd4f (diff)
downloadffmpeg-8eaa6e0e04c3c340d7c44a97613ebc6dbcc0a51d.tar.gz
Change/simplify the tableprint/tablegen API.
Originally committed as revision 22761 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dv_tablegen.c')
-rw-r--r--libavcodec/dv_tablegen.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/libavcodec/dv_tablegen.c b/libavcodec/dv_tablegen.c
index 4294132cf2..0e2b39dfb2 100644
--- a/libavcodec/dv_tablegen.c
+++ b/libavcodec/dv_tablegen.c
@@ -33,18 +33,15 @@ WRITE_1D_FUNC_ARGV(vlc_pair, struct dv_vlc_pair, 7,
"{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
WRITE_2D_FUNC(vlc_pair, struct dv_vlc_pair)
-void tableinit(void)
+int main(void)
{
dv_vlc_map_tableinit();
-}
-const struct tabledef tables[] = {
- {
- "static const struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE]",
- write_vlc_pair_2d_array,
- dv_vlc_map,
- DV_VLC_MAP_RUN_SIZE,
- DV_VLC_MAP_LEV_SIZE
- },
- { NULL }
-};
+ write_fileheader();
+
+ printf("static const struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE] = {\n");
+ write_vlc_pair_2d_array(dv_vlc_map, DV_VLC_MAP_RUN_SIZE, DV_VLC_MAP_LEV_SIZE);
+ printf("};\n");
+
+ return 0;
+}