annotate mpegaudio_tablegen.c @ 11619:8d3539d6ba3d libavcodec

DCA: ARM/NEON optimised lfe_fir
author mru
date Mon, 12 Apr 2010 20:45:33 +0000
parents e03e3df6fb7d
children a0f514fb84d6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10469
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
1 /*
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
2 * Generate a header file for hardcoded mpegaudiodec tables
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
3 *
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
4 * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
5 *
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
6 * This file is part of FFmpeg.
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
7 *
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
8 * FFmpeg is free software; you can redistribute it and/or
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
9 * modify it under the terms of the GNU Lesser General Public
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
10 * License as published by the Free Software Foundation; either
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
11 * version 2.1 of the License, or (at your option) any later version.
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
12 *
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
13 * FFmpeg is distributed in the hope that it will be useful,
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
16 * Lesser General Public License for more details.
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
17 *
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
19 * License along with FFmpeg; if not, write to the Free Software
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
21 */
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
22
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
23 #include <stdlib.h>
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
24 #define CONFIG_HARDCODED_TABLES 0
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
25 #include "mpegaudio_tablegen.h"
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
26 #include "tableprint.h"
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
27
11570
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
28 int main(void)
10469
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
29 {
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
30 mpegaudio_tableinit();
11570
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
31
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
32 write_fileheader();
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
33
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
34 printf("static const int8_t table_4_3_exp[TABLE_4_3_SIZE] = {\n");
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
35 write_int8_array(table_4_3_exp, TABLE_4_3_SIZE);
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
36 printf("};\n");
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
37
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
38 printf("static const uint32_t table_4_3_value[TABLE_4_3_SIZE] = {\n");
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
39 write_uint32_array(table_4_3_value, TABLE_4_3_SIZE);
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
40 printf("};\n");
10469
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
41
11570
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
42 printf("static const uint32_t exp_table[512] = {\n");
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
43 write_uint32_array(exp_table, 512);
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
44 printf("};\n");
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
45
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
46 printf("static const uint32_t expval_table[512][16] = {\n");
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
47 write_uint32_2d_array(expval_table, 512, 16);
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
48 printf("};\n");
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
49
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
50 return 0;
e03e3df6fb7d Change/simplify the tableprint/tablegen API.
reimar
parents: 10469
diff changeset
51 }