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
release/0.6
Måns Rullgård 15 years ago
parent 19fcd66c31
commit 2ed6f39944
  1. 2
      libavcodec/fft.c
  2. 3
      libavcodec/mdct.c
  3. 1
      libavcodec/rdft.c
  4. 3
      libavutil/adler32.c
  5. 2
      libavutil/adler32.h
  6. 2
      libavutil/arm/bswap.h
  7. 2
      libavutil/arm/intmath.h
  8. 2
      libavutil/avr32/bswap.h
  9. 2
      libavutil/bfin/bswap.h
  10. 2
      libavutil/bswap.h
  11. 1
      libavutil/crc.c
  12. 2
      libavutil/crc.h
  13. 2
      libavutil/fifo.h
  14. 3
      libavutil/internal.h
  15. 3
      libavutil/intfloat_readwrite.c
  16. 2
      libavutil/intfloat_readwrite.h
  17. 3
      libavutil/lfg.c
  18. 4
      libavutil/mathematics.c
  19. 2
      libavutil/mathematics.h
  20. 1
      libavutil/md5.c
  21. 2
      libavutil/mem.h
  22. 2
      libavutil/rational.h
  23. 2
      libavutil/sh4/bswap.h
  24. 3
      libavutil/sha.c
  25. 1
      libavutil/tree.c
  26. 2
      libavutil/x86/bswap.h
  27. 2
      libavutil/x86/intmath.h
  28. 2
      libavutil/x86/intreadwrite.h

@ -26,6 +26,8 @@
* FFT/IFFT transforms. * FFT/IFFT transforms.
*/ */
#include <stdlib.h>
#include <string.h>
#include "libavutil/mathematics.h" #include "libavutil/mathematics.h"
#include "fft.h" #include "fft.h"

@ -19,6 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * 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 "libavutil/mathematics.h"
#include "fft.h" #include "fft.h"

@ -18,6 +18,7 @@
* License along with FFmpeg; if not, write to the Free Software * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <stdlib.h>
#include <math.h> #include <math.h>
#include "libavutil/mathematics.h" #include "libavutil/mathematics.h"
#include "fft.h" #include "fft.h"

@ -21,7 +21,7 @@
* 3. This notice may not be removed or altered from any source distribution. * 3. This notice may not be removed or altered from any source distribution.
*/ */
#include "common.h" #include "config.h"
#include "adler32.h" #include "adler32.h"
#define BASE 65521L /* largest prime smaller than 65536 */ #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 #ifdef TEST
#include "log.h" #include "log.h"
#include "timer.h"
#define LEN 7001 #define LEN 7001
volatile int checksum; volatile int checksum;
int main(void){ int main(void){

@ -22,7 +22,7 @@
#define AVUTIL_ADLER32_H #define AVUTIL_ADLER32_H
#include <stdint.h> #include <stdint.h>
#include "common.h" #include "attributes.h"
unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
unsigned int len) av_pure; unsigned int len) av_pure;

@ -21,7 +21,7 @@
#include <stdint.h> #include <stdint.h>
#include "config.h" #include "config.h"
#include "libavutil/common.h" #include "libavutil/attributes.h"
#ifdef __ARMCC_VERSION #ifdef __ARMCC_VERSION

@ -22,7 +22,7 @@
#define AVUTIL_ARM_INTMATH_H #define AVUTIL_ARM_INTMATH_H
#include "config.h" #include "config.h"
#include "libavutil/common.h" #include "libavutil/attributes.h"
#if HAVE_INLINE_ASM #if HAVE_INLINE_ASM

@ -21,7 +21,7 @@
#include <stdint.h> #include <stdint.h>
#include "config.h" #include "config.h"
#include "libavutil/common.h" #include "libavutil/attributes.h"
#if HAVE_INLINE_ASM #if HAVE_INLINE_ASM

@ -28,7 +28,7 @@
#include <stdint.h> #include <stdint.h>
#include "config.h" #include "config.h"
#include "libavutil/common.h" #include "libavutil/attributes.h"
#define bswap_32 bswap_32 #define bswap_32 bswap_32
static av_always_inline av_const uint32_t bswap_32(uint32_t x) static av_always_inline av_const uint32_t bswap_32(uint32_t x)

@ -28,7 +28,7 @@
#include <stdint.h> #include <stdint.h>
#include "config.h" #include "config.h"
#include "common.h" #include "attributes.h"
#if ARCH_ARM #if ARCH_ARM
# include "arm/bswap.h" # include "arm/bswap.h"

@ -19,6 +19,7 @@
*/ */
#include "config.h" #include "config.h"
#include "common.h"
#include "bswap.h" #include "bswap.h"
#include "crc.h" #include "crc.h"

@ -23,7 +23,7 @@
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
#include "common.h" #include "attributes.h"
typedef uint32_t AVCRC; typedef uint32_t AVCRC;

@ -25,8 +25,6 @@
#define AVUTIL_FIFO_H #define AVUTIL_FIFO_H
#include <stdint.h> #include <stdint.h>
#include "avutil.h"
#include "common.h"
typedef struct AVFifoBuffer { typedef struct AVFifoBuffer {
uint8_t *buffer; uint8_t *buffer;

@ -35,8 +35,7 @@
#include <stddef.h> #include <stddef.h>
#include <assert.h> #include <assert.h>
#include "config.h" #include "config.h"
#include "common.h" #include "attributes.h"
#include "mem.h"
#include "timer.h" #include "timer.h"
#ifndef attribute_align_arg #ifndef attribute_align_arg

@ -25,7 +25,8 @@
* portable IEEE float/double read/write functions * portable IEEE float/double read/write functions
*/ */
#include "common.h" #include <stdint.h>
#include <math.h>
#include "intfloat_readwrite.h" #include "intfloat_readwrite.h"
double av_int2dbl(int64_t v){ double av_int2dbl(int64_t v){

@ -22,7 +22,7 @@
#define AVUTIL_INTFLOAT_READWRITE_H #define AVUTIL_INTFLOAT_READWRITE_H
#include <stdint.h> #include <stdint.h>
#include "common.h" #include "attributes.h"
/* IEEE 80 bits extended float */ /* IEEE 80 bits extended float */
typedef struct AVExtFloat { typedef struct AVExtFloat {

@ -23,6 +23,7 @@
#include "lfg.h" #include "lfg.h"
#include "md5.h" #include "md5.h"
#include "intreadwrite.h" #include "intreadwrite.h"
#include "attributes.h"
void av_cold av_lfg_init(AVLFG *c, unsigned int seed){ void av_cold av_lfg_init(AVLFG *c, unsigned int seed){
uint8_t tmp[16]={0}; uint8_t tmp[16]={0};
@ -56,7 +57,7 @@ void av_bmg_get(AVLFG *lfg, double out[2])
#ifdef TEST #ifdef TEST
#include "log.h" #include "log.h"
#include "common.h" #include "timer.h"
int main(void) int main(void)
{ {

@ -24,8 +24,8 @@
*/ */
#include <assert.h> #include <assert.h>
#include "avutil.h" #include <stdint.h>
#include "common.h" #include <limits.h>
#include "mathematics.h" #include "mathematics.h"
const uint8_t ff_sqrt_tab[256]={ const uint8_t ff_sqrt_tab[256]={

@ -23,7 +23,7 @@
#include <stdint.h> #include <stdint.h>
#include <math.h> #include <math.h>
#include "common.h" #include "attributes.h"
#include "rational.h" #include "rational.h"
#ifndef M_E #ifndef M_E

@ -163,6 +163,7 @@ void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len){
#ifdef TEST #ifdef TEST
#include <stdio.h> #include <stdio.h>
#include <inttypes.h>
#undef printf #undef printf
int main(void){ int main(void){
uint64_t md5val; uint64_t md5val;

@ -26,7 +26,7 @@
#ifndef AVUTIL_MEM_H #ifndef AVUTIL_MEM_H
#define AVUTIL_MEM_H #define AVUTIL_MEM_H
#include "common.h" #include "attributes.h"
#if defined(__ICC) || defined(__SUNPRO_C) #if defined(__ICC) || defined(__SUNPRO_C)
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v

@ -29,7 +29,7 @@
#define AVUTIL_RATIONAL_H #define AVUTIL_RATIONAL_H
#include <stdint.h> #include <stdint.h>
#include "common.h" #include "attributes.h"
/** /**
* rational number numerator/denominator * rational number numerator/denominator

@ -26,7 +26,7 @@
#include <stdint.h> #include <stdint.h>
#include "config.h" #include "config.h"
#include "libavutil/common.h" #include "libavutil/attributes.h"
#define bswap_16 bswap_16 #define bswap_16 bswap_16
static av_always_inline av_const uint16_t bswap_16(uint16_t x) static av_always_inline av_const uint16_t bswap_16(uint16_t x)

@ -21,8 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "common.h" #include <string.h>
#include "avutil.h"
#include "bswap.h" #include "bswap.h"
#include "sha.h" #include "sha.h"
#include "sha1.h" #include "sha1.h"

@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "common.h"
#include "log.h" #include "log.h"
#include "tree.h" #include "tree.h"

@ -26,7 +26,7 @@
#include <stdint.h> #include <stdint.h>
#include "config.h" #include "config.h"
#include "libavutil/common.h" #include "libavutil/attributes.h"
#define bswap_16 bswap_16 #define bswap_16 bswap_16
static av_always_inline av_const uint16_t bswap_16(uint16_t x) static av_always_inline av_const uint16_t bswap_16(uint16_t x)

@ -21,8 +21,6 @@
#ifndef AVUTIL_X86_INTMATH_H #ifndef AVUTIL_X86_INTMATH_H
#define AVUTIL_X86_INTMATH_H #define AVUTIL_X86_INTMATH_H
#include "libavutil/common.h"
#define FASTDIV(a,b) \ #define FASTDIV(a,b) \
({\ ({\
int ret, dmy;\ int ret, dmy;\

@ -23,7 +23,7 @@
#include <stdint.h> #include <stdint.h>
#include "config.h" #include "config.h"
#include "libavutil/common.h" #include "libavutil/attributes.h"
#if HAVE_MMX #if HAVE_MMX

Loading…
Cancel
Save