Mercurial > libavcodec.hg
annotate qdm2_tablegen.c @ 11569:731050abce41 libavcodec
Convert two "m" constraints to MANGLE to fix compilation with some compilers.
author | reimar |
---|---|
date | Thu, 01 Apr 2010 16:52:14 +0000 |
parents | 8bef88bc329d |
children | e03e3df6fb7d |
rev | line source |
---|---|
11488
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
1 /* |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
2 * Generate a header file for hardcoded QDM2 tables |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
3 * |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
4 * Copyright (c) 2010 Reimar Döffinger <Reimar.Doeffinger@gmx.de> |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
5 * |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
6 * This file is part of FFmpeg. |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
7 * |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
8 * FFmpeg is free software; you can redistribute it and/or |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
10 * License as published by the Free Software Foundation; either |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
11 * version 2.1 of the License, or (at your option) any later version. |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
12 * |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
13 * FFmpeg is distributed in the hope that it will be useful, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
16 * Lesser General Public License for more details. |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
17 * |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
19 * License along with FFmpeg; if not, write to the Free Software |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
21 */ |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
22 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
23 #include <stdlib.h> |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
24 #define CONFIG_HARDCODED_TABLES 0 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
25 #include "qdm2_tablegen.h" |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
26 #include "tableprint.h" |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
27 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
28 void tableinit(void) |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
29 { |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
30 softclip_table_init(); |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
31 rnd_table_init(); |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
32 init_noise_samples(); |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
33 } |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
34 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
35 const struct tabledef tables[] = { |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
36 { |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
37 "static const uint16_t softclip_table[HARDCLIP_THRESHOLD - SOFTCLIP_THRESHOLD + 1]", |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
38 write_uint16_array, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
39 softclip_table, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
40 HARDCLIP_THRESHOLD - SOFTCLIP_THRESHOLD + 1, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
41 0 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
42 }, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
43 { |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
44 "static const float noise_table[4096]", |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
45 write_float_array, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
46 noise_table, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
47 4096, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
48 0 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
49 }, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
50 { |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
51 "static const uint8_t random_dequant_index[256][5]", |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
52 write_uint8_2d_array, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
53 random_dequant_index, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
54 256, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
55 5 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
56 }, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
57 { |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
58 "static const uint8_t random_dequant_type24[128][3]", |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
59 write_uint8_2d_array, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
60 random_dequant_type24, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
61 128, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
62 3 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
63 }, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
64 { |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
65 "static const float noise_samples[128]", |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
66 write_float_array, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
67 noise_samples, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
68 128, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
69 0 |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
70 }, |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
71 { NULL } |
424b8482f316
Allow hard-coding several QDM2 tables (about 32 kB size).
reimar
parents:
diff
changeset
|
72 }; |