Mercurial > libavcodec.hg
diff mpegaudio_tablegen.c @ 11570:e03e3df6fb7d libavcodec
Change/simplify the tableprint/tablegen API.
author | reimar |
---|---|
date | Thu, 01 Apr 2010 17:11:47 +0000 |
parents | 23ca6d60184d |
children | a0f514fb84d6 |
line wrap: on
line diff
--- a/mpegaudio_tablegen.c Thu Apr 01 16:52:14 2010 +0000 +++ b/mpegaudio_tablegen.c Thu Apr 01 17:11:47 2010 +0000 @@ -25,36 +25,27 @@ #include "mpegaudio_tablegen.h" #include "tableprint.h" -void tableinit(void) +int main(void) { mpegaudio_tableinit(); -} + + 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"); -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 } -}; + 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; +}