diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-04-01 17:11:47 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-04-01 17:11:47 +0000 |
commit | 8eaa6e0e04c3c340d7c44a97613ebc6dbcc0a51d (patch) | |
tree | 6b40a6af3963c4f53e90e1e9a6dbbd05eb98ca3e /libavcodec/mpegaudio_tablegen.c | |
parent | 27eecec3598b0c35b7aeb10c08f2c5e42b1fdd4f (diff) | |
download | ffmpeg-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/mpegaudio_tablegen.c')
-rw-r--r-- | libavcodec/mpegaudio_tablegen.c | 51 |
1 files changed, 21 insertions, 30 deletions
diff --git a/libavcodec/mpegaudio_tablegen.c b/libavcodec/mpegaudio_tablegen.c index 9f832a3b0e..70d145b205 100644 --- a/libavcodec/mpegaudio_tablegen.c +++ b/libavcodec/mpegaudio_tablegen.c @@ -25,36 +25,27 @@ #include "mpegaudio_tablegen.h" #include "tableprint.h" -void tableinit(void) +int main(void) { mpegaudio_tableinit(); -} -const struct tabledef tables[] = { - { - "static const int8_t table_4_3_exp[TABLE_4_3_SIZE]", - write_int8_array, - table_4_3_exp, - TABLE_4_3_SIZE - }, - { - "static const uint32_t table_4_3_value[TABLE_4_3_SIZE]", - write_uint32_array, - table_4_3_value, - TABLE_4_3_SIZE - }, - { - "static const uint32_t exp_table[512]", - write_uint32_array, - exp_table, - 512 - }, - { - "static const uint32_t expval_table[512][16]", - write_uint32_2d_array, - expval_table, - 512, - 16 - }, - { NULL } -}; + write_fileheader(); + + printf("static const int8_t table_4_3_exp[TABLE_4_3_SIZE] = {\n"); + write_int8_array(table_4_3_exp, TABLE_4_3_SIZE); + printf("};\n"); + + printf("static const uint32_t table_4_3_value[TABLE_4_3_SIZE] = {\n"); + write_uint32_array(table_4_3_value, TABLE_4_3_SIZE); + printf("};\n"); + + printf("static const uint32_t exp_table[512] = {\n"); + write_uint32_array(exp_table, 512); + printf("};\n"); + + printf("static const uint32_t expval_table[512][16] = {\n"); + write_uint32_2d_array(expval_table, 512, 16); + printf("};\n"); + + return 0; +} |