OSDN Git Service

Replace many includes of libavutil/common.h with what is actually needed
authorMåns Rullgård <mans@mansr.com>
Tue, 9 Mar 2010 17:39:19 +0000 (17:39 +0000)
committerMåns Rullgård <mans@mansr.com>
Tue, 9 Mar 2010 17:39:19 +0000 (17:39 +0000)
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

28 files changed:
libavcodec/fft.c
libavcodec/mdct.c
libavcodec/rdft.c
libavutil/adler32.c
libavutil/adler32.h
libavutil/arm/bswap.h
libavutil/arm/intmath.h
libavutil/avr32/bswap.h
libavutil/bfin/bswap.h
libavutil/bswap.h
libavutil/crc.c
libavutil/crc.h
libavutil/fifo.h
libavutil/internal.h
libavutil/intfloat_readwrite.c
libavutil/intfloat_readwrite.h
libavutil/lfg.c
libavutil/mathematics.c
libavutil/mathematics.h
libavutil/md5.c
libavutil/mem.h
libavutil/rational.h
libavutil/sh4/bswap.h
libavutil/sha.c
libavutil/tree.c
libavutil/x86/bswap.h
libavutil/x86/intmath.h
libavutil/x86/intreadwrite.h

index facc6e0..7275d98 100644 (file)
@@ -26,6 +26,8 @@
  * FFT/IFFT transforms.
  */
 
+#include <stdlib.h>
+#include <string.h>
 #include "libavutil/mathematics.h"
 #include "fft.h"
 
index 87908d3..9d0a59d 100644 (file)
@@ -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"
 
index 8878e74..8d01677 100644 (file)
@@ -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"
index de79316..4f20010 100644 (file)
@@ -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){
index 34f2b53..9626c80 100644 (file)
@@ -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;
index 87dd8dd..9126350 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <stdint.h>
 #include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
 
 #ifdef __ARMCC_VERSION
 
index 21aef2a..48a05ea 100644 (file)
@@ -22,7 +22,7 @@
 #define AVUTIL_ARM_INTMATH_H
 
 #include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
 
 #if HAVE_INLINE_ASM
 
index 8aad052..e8c8ddc 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <stdint.h>
 #include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
 
 #if HAVE_INLINE_ASM
 
index f0d49b5..c40f922 100644 (file)
@@ -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)
index 52811e7..74c7af3 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <stdint.h>
 #include "config.h"
-#include "common.h"
+#include "attributes.h"
 
 #if   ARCH_ARM
 #   include "arm/bswap.h"
index 6fa14fc..2719bae 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "config.h"
+#include "common.h"
 #include "bswap.h"
 #include "crc.h"
 
index fa34059..6c0baab 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <stdint.h>
 #include <stddef.h>
-#include "common.h"
+#include "attributes.h"
 
 typedef uint32_t AVCRC;
 
index 68ed064..eb36af4 100644 (file)
@@ -25,8 +25,6 @@
 #define AVUTIL_FIFO_H
 
 #include <stdint.h>
-#include "avutil.h"
-#include "common.h"
 
 typedef struct AVFifoBuffer {
     uint8_t *buffer;
index eac7bd3..b47db3d 100644 (file)
@@ -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
index bfe36a6..cb9835b 100644 (file)
@@ -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){
index e2d5d5b..1b80fc6 100644 (file)
@@ -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  {
index a682863..1dad4e4 100644 (file)
@@ -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)
 {
index 91b76f3..81d47c1 100644 (file)
@@ -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]={
index 7a72cef..ab0f3f7 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <stdint.h>
 #include <math.h>
-#include "common.h"
+#include "attributes.h"
 #include "rational.h"
 
 #ifndef M_E
index d3e3e98..39ee624 100644 (file)
@@ -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;
index d8d1d72..fffbb87 100644 (file)
@@ -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
index 0f415ed..c5ecf2c 100644 (file)
@@ -29,7 +29,7 @@
 #define AVUTIL_RATIONAL_H
 
 #include <stdint.h>
-#include "common.h"
+#include "attributes.h"
 
 /**
  * rational number numerator/denominator
index db8e07e..c7cd905 100644 (file)
@@ -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)
index 7fe3400..7d14efc 100644 (file)
@@ -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"
index c387c46..8769c76 100644 (file)
@@ -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"
 
index 3eeb5a4..462309f 100644 (file)
@@ -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)
index 7528c55..f3acddc 100644 (file)
@@ -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;\
index ff3e836..4061d19 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <stdint.h>
 #include "config.h"
-#include "libavutil/common.h"
+#include "libavutil/attributes.h"
 
 #if HAVE_MMX