[FFmpeg-devel] [PATCHv2 1/3] avutil/tablegen: add tablegen compatibility hacks

Ganesh Ajjanagadde gajjanagadde at gmail.com
Thu Nov 26 16:23:02 CET 2015


Based on a suggestion by Ronald S. Bultje.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavutil/tablegen.h | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 libavutil/tablegen.h

diff --git a/libavutil/tablegen.h b/libavutil/tablegen.h
new file mode 100644
index 0000000..057db2a
--- /dev/null
+++ b/libavutil/tablegen.h
@@ -0,0 +1,32 @@
+/*
+ * 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
+ */
+
+/**
+ * @file
+ * Compatibility libm for table generation files
+ */
+
+#ifndef AVUTIL_TABLEGEN_H
+#define AVUTIL_TABLEGEN_H
+
+// we lack some functions on all host platforms, and we don't care about
+// performance as it's performed at build time
+#define cbrt(x) pow(x, 1.0 / 3)
+#define llrint(x) floor((x) + 0.5)
+
+#endif /* AVUTIL_TABLEGEN_H */
-- 
2.6.2



More information about the ffmpeg-devel mailing list