aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-03-09 17:39:19 +0000
committerMåns Rullgård <mans@mansr.com>2010-03-09 17:39:19 +0000
commit2ed6f399440a9f9fa358a96293c6797c2ebd0aaf (patch)
treeea8d954cee507834abd9e4b233517a0b7864a633
parent19fcd66c31b880487e477dd45501eb91b9c9fdfe (diff)
downloadffmpeg-2ed6f399440a9f9fa358a96293c6797c2ebd0aaf.tar.gz
Replace many includes of libavutil/common.h with what is actually needed
This reduces the number of false dependencies on header files and speeds up compilation. Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/fft.c2
-rw-r--r--libavcodec/mdct.c3
-rw-r--r--libavcodec/rdft.c1
-rw-r--r--libavutil/adler32.c3
-rw-r--r--libavutil/adler32.h2
-rw-r--r--libavutil/arm/bswap.h2
-rw-r--r--libavutil/arm/intmath.h2
-rw-r--r--libavutil/avr32/bswap.h2
-rw-r--r--libavutil/bfin/bswap.h2
-rw-r--r--libavutil/bswap.h2
-rw-r--r--libavutil/crc.c1
-rw-r--r--libavutil/crc.h2
-rw-r--r--libavutil/fifo.h2
-rw-r--r--libavutil/internal.h3
-rw-r--r--libavutil/intfloat_readwrite.c3
-rw-r--r--libavutil/intfloat_readwrite.h2
-rw-r--r--libavutil/lfg.c3
-rw-r--r--libavutil/mathematics.c4
-rw-r--r--libavutil/mathematics.h2
-rw-r--r--libavutil/md5.c1
-rw-r--r--libavutil/mem.h2
-rw-r--r--libavutil/rational.h2
-rw-r--r--libavutil/sh4/bswap.h2
-rw-r--r--libavutil/sha.c3
-rw-r--r--libavutil/tree.c1
-rw-r--r--libavutil/x86/bswap.h2
-rw-r--r--libavutil/x86/intmath.h2
-rw-r--r--libavutil/x86/intreadwrite.h2
28 files changed, 32 insertions, 28 deletions
diff --git a/libavcodec/fft.c b/libavcodec/fft.c
index facc6e05d9..7275d98e9f 100644
--- a/libavcodec/fft.c
+++ b/libavcodec/fft.c
@@ -26,6 +26,8 @@
* FFT/IFFT transforms.
*/
+#include <stdlib.h>
+#include <string.h>
#include "libavutil/mathematics.h"
#include "fft.h"
diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c
index 87908d3d66..9d0a59dc84 100644
--- a/libavcodec/mdct.c
+++ b/libavcodec/mdct.c
@@ -19,6 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stdlib.h>
+#include <string.h>
+#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "fft.h"
diff --git a/libavcodec/rdft.c b/libavcodec/rdft.c
index 8878e744cf..8d0167798f 100644
--- a/libavcodec/rdft.c
+++ b/libavcodec/rdft.c
@@ -18,6 +18,7 @@
* 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>
#include <math.h>
#include "libavutil/mathematics.h"
#include "fft.h"
diff --git a/libavutil/adler32.c b/libavutil/adler32.c
index de793160a0..4f2001025b 100644
--- a/libavutil/adler32.c
+++ b/libavutil/adler32.c
@@ -21,7 +21,7 @@
* 3. This notice may not be removed or altered from any source distribution.
*/
-#include "common.h"
+#include "config.h"
#include "adler32.h"
#define BASE 65521L /* largest prime smaller than 65536 */
@@ -53,6 +53,7 @@ unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, unsigne
#ifdef TEST
#include "log.h"
+#include "timer.h"
#define LEN 7001
volatile int checksum;
int main(void){
diff --git a/libavutil/adler32.h b/libavutil/adler32.h
index 34f2b53e7d..9626c80567 100644
--- a/libavutil/adler32.h
+++ b/libavutil/adler32.h
@@ -22,7 +22,7 @@
#define AVUTIL_ADLER32_H
#include <stdint.h>
-#include "common.h"
+#include "attributes.h"
unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
unsigned int len) av_pure;
diff --git a/libavutil/arm/bswap.h b/libavutil/arm/bswap.h
index 87dd8dd06c..9126350716 100644
--- a/libavutil/arm/bswap.h
+++ b/libavutil/arm/bswap.h
@@ -21,7 +21,7 @@
#include <stdint.h>
#include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
#ifdef __ARMCC_VERSION
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
index 21aef2a478..48a05eaa1b 100644
--- a/libavutil/arm/intmath.h
+++ b/libavutil/arm/intmath.h
@@ -22,7 +22,7 @@
#define AVUTIL_ARM_INTMATH_H
#include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
#if HAVE_INLINE_ASM
diff --git a/libavutil/avr32/bswap.h b/libavutil/avr32/bswap.h
index 8aad0529c3..e8c8ddc4ef 100644
--- a/libavutil/avr32/bswap.h
+++ b/libavutil/avr32/bswap.h
@@ -21,7 +21,7 @@
#include <stdint.h>
#include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
#if HAVE_INLINE_ASM
diff --git a/libavutil/bfin/bswap.h b/libavutil/bfin/bswap.h
index f0d49b5d6d..c40f922e32 100644
--- a/libavutil/bfin/bswap.h
+++ b/libavutil/bfin/bswap.h
@@ -28,7 +28,7 @@
#include <stdint.h>
#include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
#define bswap_32 bswap_32
static av_always_inline av_const uint32_t bswap_32(uint32_t x)
diff --git a/libavutil/bswap.h b/libavutil/bswap.h
index 52811e74a3..74c7af3026 100644
--- a/libavutil/bswap.h
+++ b/libavutil/bswap.h
@@ -28,7 +28,7 @@
#include <stdint.h>
#include "config.h"
-#include "common.h"
+#include "attributes.h"
#if ARCH_ARM
# include "arm/bswap.h"
diff --git a/libavutil/crc.c b/libavutil/crc.c
index 6fa14fcc58..2719baeefd 100644
--- a/libavutil/crc.c
+++ b/libavutil/crc.c
@@ -19,6 +19,7 @@
*/
#include "config.h"
+#include "common.h"
#include "bswap.h"
#include "crc.h"
diff --git a/libavutil/crc.h b/libavutil/crc.h
index fa34059278..6c0baab5ac 100644
--- a/libavutil/crc.h
+++ b/libavutil/crc.h
@@ -23,7 +23,7 @@
#include <stdint.h>
#include <stddef.h>
-#include "common.h"
+#include "attributes.h"
typedef uint32_t AVCRC;
diff --git a/libavutil/fifo.h b/libavutil/fifo.h
index 68ed064c1d..eb36af42a8 100644
--- a/libavutil/fifo.h
+++ b/libavutil/fifo.h
@@ -25,8 +25,6 @@
#define AVUTIL_FIFO_H
#include <stdint.h>
-#include "avutil.h"
-#include "common.h"
typedef struct AVFifoBuffer {
uint8_t *buffer;
diff --git a/libavutil/internal.h b/libavutil/internal.h
index eac7bd3012..b47db3d8c6 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -35,8 +35,7 @@
#include <stddef.h>
#include <assert.h>
#include "config.h"
-#include "common.h"
-#include "mem.h"
+#include "attributes.h"
#include "timer.h"
#ifndef attribute_align_arg
diff --git a/libavutil/intfloat_readwrite.c b/libavutil/intfloat_readwrite.c
index bfe36a641a..cb9835b317 100644
--- a/libavutil/intfloat_readwrite.c
+++ b/libavutil/intfloat_readwrite.c
@@ -25,7 +25,8 @@
* portable IEEE float/double read/write functions
*/
-#include "common.h"
+#include <stdint.h>
+#include <math.h>
#include "intfloat_readwrite.h"
double av_int2dbl(int64_t v){
diff --git a/libavutil/intfloat_readwrite.h b/libavutil/intfloat_readwrite.h
index e2d5d5be0e..1b80fc6e95 100644
--- a/libavutil/intfloat_readwrite.h
+++ b/libavutil/intfloat_readwrite.h
@@ -22,7 +22,7 @@
#define AVUTIL_INTFLOAT_READWRITE_H
#include <stdint.h>
-#include "common.h"
+#include "attributes.h"
/* IEEE 80 bits extended float */
typedef struct AVExtFloat {
diff --git a/libavutil/lfg.c b/libavutil/lfg.c
index a6828634ae..1dad4e442c 100644
--- a/libavutil/lfg.c
+++ b/libavutil/lfg.c
@@ -23,6 +23,7 @@
#include "lfg.h"
#include "md5.h"
#include "intreadwrite.h"
+#include "attributes.h"
void av_cold av_lfg_init(AVLFG *c, unsigned int seed){
uint8_t tmp[16]={0};
@@ -56,7 +57,7 @@ void av_bmg_get(AVLFG *lfg, double out[2])
#ifdef TEST
#include "log.h"
-#include "common.h"
+#include "timer.h"
int main(void)
{
diff --git a/libavutil/mathematics.c b/libavutil/mathematics.c
index 91b76f3aaf..81d47c1bf1 100644
--- a/libavutil/mathematics.c
+++ b/libavutil/mathematics.c
@@ -24,8 +24,8 @@
*/
#include <assert.h>
-#include "avutil.h"
-#include "common.h"
+#include <stdint.h>
+#include <limits.h>
#include "mathematics.h"
const uint8_t ff_sqrt_tab[256]={
diff --git a/libavutil/mathematics.h b/libavutil/mathematics.h
index 7a72ceff96..ab0f3f731d 100644
--- a/libavutil/mathematics.h
+++ b/libavutil/mathematics.h
@@ -23,7 +23,7 @@
#include <stdint.h>
#include <math.h>
-#include "common.h"
+#include "attributes.h"
#include "rational.h"
#ifndef M_E
diff --git a/libavutil/md5.c b/libavutil/md5.c
index d3e3e9816e..39ee6242e5 100644
--- a/libavutil/md5.c
+++ b/libavutil/md5.c
@@ -163,6 +163,7 @@ void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len){
#ifdef TEST
#include <stdio.h>
+#include <inttypes.h>
#undef printf
int main(void){
uint64_t md5val;
diff --git a/libavutil/mem.h b/libavutil/mem.h
index d8d1d72b86..fffbb872ae 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -26,7 +26,7 @@
#ifndef AVUTIL_MEM_H
#define AVUTIL_MEM_H
-#include "common.h"
+#include "attributes.h"
#if defined(__ICC) || defined(__SUNPRO_C)
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
diff --git a/libavutil/rational.h b/libavutil/rational.h
index 0f415edf94..c5ecf2c6fd 100644
--- a/libavutil/rational.h
+++ b/libavutil/rational.h
@@ -29,7 +29,7 @@
#define AVUTIL_RATIONAL_H
#include <stdint.h>
-#include "common.h"
+#include "attributes.h"
/**
* rational number numerator/denominator
diff --git a/libavutil/sh4/bswap.h b/libavutil/sh4/bswap.h
index db8e07eb12..c7cd905194 100644
--- a/libavutil/sh4/bswap.h
+++ b/libavutil/sh4/bswap.h
@@ -26,7 +26,7 @@
#include <stdint.h>
#include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
#define bswap_16 bswap_16
static av_always_inline av_const uint16_t bswap_16(uint16_t x)
diff --git a/libavutil/sha.c b/libavutil/sha.c
index 7fe34007bb..7d14efc6f2 100644
--- a/libavutil/sha.c
+++ b/libavutil/sha.c
@@ -21,8 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "common.h"
-#include "avutil.h"
+#include <string.h>
#include "bswap.h"
#include "sha.h"
#include "sha1.h"
diff --git a/libavutil/tree.c b/libavutil/tree.c
index c387c46deb..8769c76b0f 100644
--- a/libavutil/tree.c
+++ b/libavutil/tree.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "common.h"
#include "log.h"
#include "tree.h"
diff --git a/libavutil/x86/bswap.h b/libavutil/x86/bswap.h
index 3eeb5a4697..462309f41e 100644
--- a/libavutil/x86/bswap.h
+++ b/libavutil/x86/bswap.h
@@ -26,7 +26,7 @@
#include <stdint.h>
#include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
#define bswap_16 bswap_16
static av_always_inline av_const uint16_t bswap_16(uint16_t x)
diff --git a/libavutil/x86/intmath.h b/libavutil/x86/intmath.h
index 7528c55dc8..f3acddc0e3 100644
--- a/libavutil/x86/intmath.h
+++ b/libavutil/x86/intmath.h
@@ -21,8 +21,6 @@
#ifndef AVUTIL_X86_INTMATH_H
#define AVUTIL_X86_INTMATH_H
-#include "libavutil/common.h"
-
#define FASTDIV(a,b) \
({\
int ret, dmy;\
diff --git a/libavutil/x86/intreadwrite.h b/libavutil/x86/intreadwrite.h
index ff3e836c9a..4061d19231 100644
--- a/libavutil/x86/intreadwrite.h
+++ b/libavutil/x86/intreadwrite.h
@@ -23,7 +23,7 @@
#include <stdint.h>
#include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
#if HAVE_MMX