annotate tableprint.h @ 10478:decdb00e19a8 libavcodec

Add generic rules for building helpers with HOSTCC
author mru
date Thu, 29 Oct 2009 00:55:35 +0000
parents 23ca6d60184d
children 2980d9efc542
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 file for hardcoded 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 #ifndef AVCODEC_TABLEPRINT_H
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
24 #define AVCODEC_TABLEPRINT_H
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
25
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
26 #include <stdint.h>
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
27
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
28 /**
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
29 * \defgroup printfuncs Predefined functions for printing tables
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
30 *
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
31 * \{
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
32 */
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
33 void write_int8_array (const void *, int, int);
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
34 void write_uint32_array (const void *, int, int);
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
35 void write_uint32_2d_array(const void *, int, int);
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
36 /** \} */ // end of printfuncs group
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
37
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
38 struct tabledef {
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
39 /** String that declares the array. Adding " = { ..." after it should
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
40 * make a valid initializer, adding "extern" before and ";" if possible
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
41 * should make a valid extern declaration. */
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
42 const char *declaration;
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
43 /** Function used to print the table data (i.e. the part in {}).
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
44 * Should be one of the predefined write_*_array functions. */
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
45 void (*printfunc)(const void *, int, int);
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
46 /** Pointer passed to the printfunc, usually a pointer to the start
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
47 * of the array to be printed. */
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
48 const void *data;
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
49 int size; ///< size of the first dimension of the array
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
50 int size2; ///< size of the second dimension of the array if any
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
51 };
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
52
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
53 /** Initializes all the tables described in the tables array */
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
54 void tableinit(void);
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
55 /** Describes the tables that should be printed */
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
56 extern const struct tabledef tables[];
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
57
23ca6d60184d Add support for hardcoding the mpegaudiodec tables.
reimar
parents:
diff changeset
58 #endif /* AVCODEC_TABLEPRINT_H */