[FFmpeg-cvslog] r23680 - in trunk: doc/tablegen.txt libavcodec/mdct_tablegen.h libavcodec/mpegaudio_tablegen.h libavcodec/ps_tablegen.h
reimar
subversion
Mon Jun 21 19:01:22 CEST 2010
Author: reimar
Date: Mon Jun 21 19:01:22 2010
New Revision: 23680
Log:
mathematics.h no longer needs config.h, so update tablegen code and
documentation to use it where appropriate.
Modified:
trunk/doc/tablegen.txt
trunk/libavcodec/mdct_tablegen.h
trunk/libavcodec/mpegaudio_tablegen.h
trunk/libavcodec/ps_tablegen.h
Modified: trunk/doc/tablegen.txt
==============================================================================
--- trunk/doc/tablegen.txt Mon Jun 21 12:35:50 2010 (r23679)
+++ trunk/doc/tablegen.txt Mon Jun 21 19:01:22 2010 (r23680)
@@ -12,6 +12,7 @@ the tables as a header file using the ta
Both of these files will be compiled for the host system, so to avoid
breakage with cross-compilation neither of them may include, directly
or indirectly, config.h or avconfig.h.
+This means that e.g. libavutil/mathematics.h is ok but libavutil/libm.h is not.
Due to this, the .c file or Makefile may have to provide additional defines
or stubs, though if possible this should be avoided.
In particular, CONFIG_HARDCODED_TABLES should always be defined to 0.
Modified: trunk/libavcodec/mdct_tablegen.h
==============================================================================
--- trunk/libavcodec/mdct_tablegen.h Mon Jun 21 12:35:50 2010 (r23679)
+++ trunk/libavcodec/mdct_tablegen.h Mon Jun 21 19:01:22 2010 (r23680)
@@ -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"
Modified: trunk/libavcodec/mpegaudio_tablegen.h
==============================================================================
--- trunk/libavcodec/mpegaudio_tablegen.h Mon Jun 21 12:35:50 2010 (r23679)
+++ trunk/libavcodec/mpegaudio_tablegen.h Mon Jun 21 19:01:22 2010 (r23680)
@@ -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
Modified: trunk/libavcodec/ps_tablegen.h
==============================================================================
--- trunk/libavcodec/ps_tablegen.h Mon Jun 21 12:35:50 2010 (r23679)
+++ trunk/libavcodec/ps_tablegen.h Mon Jun 21 19:01:22 2010 (r23680)
@@ -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
More information about the ffmpeg-cvslog
mailing list