aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dsd_tablegen.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2014-04-14 18:22:32 +1000
committerMichael Niedermayer <michaelni@gmx.at>2014-04-15 20:35:57 +0200
commit5f4f9ee99f4e9ab980bb18475009c701ba47a74f (patch)
tree0dcfd201ea5cd1ba527a76cc7cdd64d3d38fe626 /libavcodec/dsd_tablegen.c
parentadd5d7a8ce6fb53790a6885519f8f700755b52e0 (diff)
downloadffmpeg-5f4f9ee99f4e9ab980bb18475009c701ba47a74f.tar.gz
Direct Stream Digital (DSD) decoder
Signed-off-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dsd_tablegen.c')
-rw-r--r--libavcodec/dsd_tablegen.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/libavcodec/dsd_tablegen.c b/libavcodec/dsd_tablegen.c
new file mode 100644
index 0000000000..dbeb9fe205
--- /dev/null
+++ b/libavcodec/dsd_tablegen.c
@@ -0,0 +1,38 @@
+/*
+ * Generate a header file for hardcoded DSD tables
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdlib.h>
+#define CONFIG_HARDCODED_TABLES 0
+#include "dsd_tablegen.h"
+#include "tableprint.h"
+#include <inttypes.h>
+
+int main(void)
+{
+ dsd_ctables_tableinit();
+
+ write_fileheader();
+
+ printf("static const double ctables[CTABLES][256] = {\n");
+ write_float_2d_array(ctables, CTABLES, 256);
+ printf("};\n");
+
+ return 0;
+}