From 8eaa6e0e04c3c340d7c44a97613ebc6dbcc0a51d Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Thu, 1 Apr 2010 17:11:47 +0000 Subject: Change/simplify the tableprint/tablegen API. Originally committed as revision 22761 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dv_tablegen.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'libavcodec/dv_tablegen.c') 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; +} -- cgit v1.2.3