Revision 8eaa6e0e libavcodec/mpegaudio_tablegen.c

View differences:

libavcodec/mpegaudio_tablegen.c
25 25
#include "mpegaudio_tablegen.h"
26 26
#include "tableprint.h"
27 27

  
28
void tableinit(void)
28
int main(void)
29 29
{
30 30
    mpegaudio_tableinit();
31
}
32 31

  
33
const struct tabledef tables[] = {
34
    {
35
        "static const int8_t table_4_3_exp[TABLE_4_3_SIZE]",
36
        write_int8_array,
37
        table_4_3_exp,
38
        TABLE_4_3_SIZE
39
    },
40
    {
41
        "static const uint32_t table_4_3_value[TABLE_4_3_SIZE]",
42
        write_uint32_array,
43
        table_4_3_value,
44
        TABLE_4_3_SIZE
45
    },
46
    {
47
        "static const uint32_t exp_table[512]",
48
        write_uint32_array,
49
        exp_table,
50
        512
51
    },
52
    {
53
        "static const uint32_t expval_table[512][16]",
54
        write_uint32_2d_array,
55
        expval_table,
56
        512,
57
        16
58
    },
59
    { NULL }
60
};
32
    write_fileheader();
33

  
34
    printf("static const int8_t table_4_3_exp[TABLE_4_3_SIZE] = {\n");
35
    write_int8_array(table_4_3_exp, TABLE_4_3_SIZE);
36
    printf("};\n");
37

  
38
    printf("static const uint32_t table_4_3_value[TABLE_4_3_SIZE] = {\n");
39
    write_uint32_array(table_4_3_value, TABLE_4_3_SIZE);
40
    printf("};\n");
41

  
42
    printf("static const uint32_t exp_table[512] = {\n");
43
    write_uint32_array(exp_table, 512);
44
    printf("};\n");
45

  
46
    printf("static const uint32_t expval_table[512][16] = {\n");
47
    write_uint32_2d_array(expval_table, 512, 16);
48
    printf("};\n");
49

  
50
    return 0;
51
}

Also available in: Unified diff