Mercurial > libavcodec.hg
diff dv_tablegen.c @ 11570:e03e3df6fb7d libavcodec
Change/simplify the tableprint/tablegen API.
author | reimar |
---|---|
date | Thu, 01 Apr 2010 17:11:47 +0000 |
parents | 3367dd5913a0 |
children | 59f399926c12 |
line wrap: on
line diff
--- a/dv_tablegen.c Thu Apr 01 16:52:14 2010 +0000 +++ b/dv_tablegen.c Thu Apr 01 17:11:47 2010 +0000 @@ -33,18 +33,15 @@ "{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(); -} + + write_fileheader(); -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 } -}; + 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; +}