changeset 11906:a1b4029b2465 libavcodec

mathematics.h no longer needs config.h, so update tablegen code and documentation to use it where appropriate.
author reimar
date Mon, 21 Jun 2010 17:01:22 +0000
parents 062aab998a98
children defe337cf643
files mdct_tablegen.h mpegaudio_tablegen.h ps_tablegen.h
diffstat 3 files changed, 2 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/mdct_tablegen.h	Mon Jun 21 04:14:20 2010 +0000
+++ b/mdct_tablegen.h	Mon Jun 21 17:01:22 2010 +0000
@@ -21,7 +21,7 @@
  */
 
 #include <assert.h>
-// do not use libavutil/mathematics.h since this is compiled both
+// do not use libavutil/libm.h since this is compiled both
 // for the host and the target and config.h is only valid for the target
 #include <math.h>
 #include "../libavutil/attributes.h"
--- a/mpegaudio_tablegen.h	Mon Jun 21 04:14:20 2010 +0000
+++ b/mpegaudio_tablegen.h	Mon Jun 21 17:01:22 2010 +0000
@@ -24,8 +24,6 @@
 #define MPEGAUDIO_TABLEGEN_H
 
 #include <stdint.h>
-// do not use libavutil/mathematics.h since this is compiled both
-// for the host and the target and config.h is only valid for the target
 #include <math.h>
 
 #define TABLE_4_3_SIZE (8191 + 16)*4
--- a/ps_tablegen.h	Mon Jun 21 04:14:20 2010 +0000
+++ b/ps_tablegen.h	Mon Jun 21 17:01:22 2010 +0000
@@ -24,22 +24,13 @@
 #define PS_TABLEGEN_H
 
 #include <stdint.h>
-#include <math.h>
 
 #if CONFIG_HARDCODED_TABLES
 #define ps_tableinit()
 #include "libavcodec/ps_tables.h"
 #else
 #include "../libavutil/common.h"
-#ifndef M_SQRT1_2
-#define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */
-#endif
-#ifndef M_PI
-#define M_PI           3.14159265358979323846  /* pi */
-#endif
-#ifndef M_SQRT2
-#define M_SQRT2        1.41421356237309504880  /* sqrt(2) */
-#endif
+#include "../libavutil/mathematics.h"
 #define NR_ALLPASS_BANDS20 30
 #define NR_ALLPASS_BANDS34 50
 #define PS_AP_LINKS 3