[FFmpeg-cvslog] aac: fix build with hardcoded tables
Mans Rullgard
git at videolan.org
Fri Oct 19 14:10:06 CEST 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Thu Oct 18 15:32:11 2012 +0100| [7a12d97eb1aac6621f20cb7bffd0f74f8e46ae2c] | committer: Mans Rullgard
aac: fix build with hardcoded tables
aac_tablegen.h includes aac.h for the POW_SF2_ZERO definition, but
this also pulls in a raft of other headers, some of which are not
safe to use in code built with the host compiler.
Moving POW_SF2_ZERO to aac_tablegen_decl.h, where the declaration
of the array it relates to already resides, fixes the problems.
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a12d97eb1aac6621f20cb7bffd0f74f8e46ae2c
---
libavcodec/aac.h | 1 -
libavcodec/aac_tablegen.h | 1 -
libavcodec/aac_tablegen_decl.h | 2 ++
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/aac.h b/libavcodec/aac.h
index 32baf9d..9c6ac27 100644
--- a/libavcodec/aac.h
+++ b/libavcodec/aac.h
@@ -141,7 +141,6 @@ typedef struct PredictorState {
#define SCALE_MAX_POS 255 ///< scalefactor index maximum value
#define SCALE_MAX_DIFF 60 ///< maximum scalefactor difference allowed by standard
#define SCALE_DIFF_ZERO 60 ///< codebook index corresponding to zero scalefactor indices difference
-#define POW_SF2_ZERO 200 ///< ff_aac_pow2sf_tab index corresponding to pow(2, 0);
/**
* Long Term Prediction
diff --git a/libavcodec/aac_tablegen.h b/libavcodec/aac_tablegen.h
index 8773d9b..a45de9a 100644
--- a/libavcodec/aac_tablegen.h
+++ b/libavcodec/aac_tablegen.h
@@ -29,7 +29,6 @@
#include "libavcodec/aac_tables.h"
#else
#include "libavutil/mathematics.h"
-#include "aac.h"
float ff_aac_pow2sf_tab[428];
void ff_aac_tableinit(void)
diff --git a/libavcodec/aac_tablegen_decl.h b/libavcodec/aac_tablegen_decl.h
index 496ca0c..a5fd1cf 100644
--- a/libavcodec/aac_tablegen_decl.h
+++ b/libavcodec/aac_tablegen_decl.h
@@ -23,6 +23,8 @@
#ifndef AVCODEC_AAC_TABLEGEN_DECL_H
#define AVCODEC_AAC_TABLEGEN_DECL_H
+#define POW_SF2_ZERO 200 ///< ff_aac_pow2sf_tab index corresponding to pow(2, 0);
+
#if CONFIG_HARDCODED_TABLES
#define ff_aac_tableinit()
extern const float ff_aac_pow2sf_tab[428];
More information about the ffmpeg-cvslog
mailing list