aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-12-12 16:00:04 +0100
committerDiego Biurrun <diego@biurrun.de>2016-12-14 14:08:43 +0100
commitea7ee4b4e381e0fa731458de0cbf740430eeb013 (patch)
tree5955919c869ef9eabd1951dbfad1b610d8d07213
parent39929e55eb13eeb8dfbe1bc99301fecf6b8942dd (diff)
downloadffmpeg-ea7ee4b4e381e0fa731458de0cbf740430eeb013.tar.gz
ppc: Centralize compiler-specific altivec.h #include handling in one place
Also move #includes into canonical order where appropriate.
-rw-r--r--libavcodec/ppc/apedsp_altivec.c6
-rw-r--r--libavcodec/ppc/audiodsp.c5
-rw-r--r--libavcodec/ppc/blockdsp.c7
-rw-r--r--libavcodec/ppc/fdctdsp.c6
-rw-r--r--libavcodec/ppc/h264chroma_init.c3
-rw-r--r--libavcodec/ppc/h264dsp.c1
-rw-r--r--libavcodec/ppc/h264qpel.c4
-rw-r--r--libavcodec/ppc/hevcdsp.c5
-rw-r--r--libavcodec/ppc/hpeldsp_altivec.c7
-rw-r--r--libavcodec/ppc/huffyuvdsp_altivec.c5
-rw-r--r--libavcodec/ppc/idctdsp.c9
-rw-r--r--libavcodec/ppc/mdct_init.c3
-rw-r--r--libavcodec/ppc/me_cmp.c5
-rw-r--r--libavcodec/ppc/mpegvideo_altivec.c3
-rw-r--r--libavcodec/ppc/mpegvideodsp.c2
-rw-r--r--libavcodec/ppc/mpegvideoencdsp.c6
-rw-r--r--libavcodec/ppc/pixblockdsp.c5
-rw-r--r--libavcodec/ppc/svq1enc_altivec.c9
-rw-r--r--libavcodec/ppc/vc1dsp_altivec.c3
-rw-r--r--libavcodec/ppc/vorbisdsp_altivec.c6
-rw-r--r--libavcodec/ppc/vp3dsp_altivec.c3
-rw-r--r--libavcodec/ppc/vp8dsp_altivec.c4
-rw-r--r--libswscale/swscale_internal.h5
23 files changed, 45 insertions, 67 deletions
diff --git a/libavcodec/ppc/apedsp_altivec.c b/libavcodec/ppc/apedsp_altivec.c
index 21a3d10f18..7c9d02ae2d 100644
--- a/libavcodec/ppc/apedsp_altivec.c
+++ b/libavcodec/ppc/apedsp_altivec.c
@@ -19,14 +19,12 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/apedsp.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/audiodsp.c b/libavcodec/ppc/audiodsp.c
index 52a1e75cc1..371e0d1e2e 100644
--- a/libavcodec/ppc/audiodsp.c
+++ b/libavcodec/ppc/audiodsp.c
@@ -24,15 +24,12 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/audiodsp.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/blockdsp.c b/libavcodec/ppc/blockdsp.c
index d2c1d0e766..ee5139a931 100644
--- a/libavcodec/ppc/blockdsp.c
+++ b/libavcodec/ppc/blockdsp.c
@@ -21,16 +21,15 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
+
#include <string.h>
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/blockdsp.h"
/* ***** WARNING ***** WARNING ***** WARNING ***** */
diff --git a/libavcodec/ppc/fdctdsp.c b/libavcodec/ppc/fdctdsp.c
index cadca80469..36d4b4e4ba 100644
--- a/libavcodec/ppc/fdctdsp.c
+++ b/libavcodec/ppc/fdctdsp.c
@@ -19,14 +19,14 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
+#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/fdctdsp.h"
+
#include "fdct.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/h264chroma_init.c b/libavcodec/ppc/h264chroma_init.c
index 4a24b7f82f..f8392c2ee2 100644
--- a/libavcodec/ppc/h264chroma_init.c
+++ b/libavcodec/ppc/h264chroma_init.c
@@ -19,12 +19,13 @@
*/
#include "config.h"
+
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/h264chroma.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/h264dsp.c b/libavcodec/ppc/h264dsp.c
index a1fd5253b1..9247cdfb79 100644
--- a/libavcodec/ppc/h264dsp.c
+++ b/libavcodec/ppc/h264dsp.c
@@ -28,7 +28,6 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/h264dec.h"
diff --git a/libavcodec/ppc/h264qpel.c b/libavcodec/ppc/h264qpel.c
index aff20c15a2..5da09bf46e 100644
--- a/libavcodec/ppc/h264qpel.c
+++ b/libavcodec/ppc/h264qpel.c
@@ -19,13 +19,15 @@
*/
#include "config.h"
+
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/h264qpel.h"
+
#include "hpeldsp_altivec.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/hevcdsp.c b/libavcodec/ppc/hevcdsp.c
index 442af9fdc2..f77943b51f 100644
--- a/libavcodec/ppc/hevcdsp.c
+++ b/libavcodec/ppc/hevcdsp.c
@@ -19,13 +19,10 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/hevcdsp.h"
diff --git a/libavcodec/ppc/hpeldsp_altivec.c b/libavcodec/ppc/hpeldsp_altivec.c
index 82b5ce7fc7..405b91841e 100644
--- a/libavcodec/ppc/hpeldsp_altivec.c
+++ b/libavcodec/ppc/hpeldsp_altivec.c
@@ -22,16 +22,13 @@
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
-
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/hpeldsp.h"
+
#include "hpeldsp_altivec.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/huffyuvdsp_altivec.c b/libavcodec/ppc/huffyuvdsp_altivec.c
index 7c34a67ea4..dff29022a8 100644
--- a/libavcodec/ppc/huffyuvdsp_altivec.c
+++ b/libavcodec/ppc/huffyuvdsp_altivec.c
@@ -21,15 +21,12 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/huffyuvdsp.h"
#if HAVE_ALTIVEC
diff --git a/libavcodec/ppc/idctdsp.c b/libavcodec/ppc/idctdsp.c
index 0aaaac0131..dc22e15269 100644
--- a/libavcodec/ppc/idctdsp.c
+++ b/libavcodec/ppc/idctdsp.c
@@ -30,17 +30,16 @@
* IDCT function itself was to factor out the partial transposition, and to
* perform a full transpose at the end of the function. */
+#include "config.h"
+
#include <stdlib.h>
#include <string.h>
-#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/idctdsp.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/mdct_init.c b/libavcodec/ppc/mdct_init.c
index d3582bc00a..73200a0f9b 100644
--- a/libavcodec/ppc/mdct_init.c
+++ b/libavcodec/ppc/mdct_init.c
@@ -21,10 +21,11 @@
*/
#include "config.h"
+
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/fft.h"
/**
diff --git a/libavcodec/ppc/me_cmp.c b/libavcodec/ppc/me_cmp.c
index 6c70f9f0fa..4e4d8da628 100644
--- a/libavcodec/ppc/me_cmp.c
+++ b/libavcodec/ppc/me_cmp.c
@@ -21,15 +21,12 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/avcodec.h"
#include "libavcodec/mpegvideo.h"
#include "libavcodec/me_cmp.h"
diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c
index a09932bdf8..89e15a4a7f 100644
--- a/libavcodec/ppc/mpegvideo_altivec.c
+++ b/libavcodec/ppc/mpegvideo_altivec.c
@@ -25,11 +25,12 @@
#include <stdio.h>
#include "config.h"
+
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/mpegvideo.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/mpegvideodsp.c b/libavcodec/ppc/mpegvideodsp.c
index eef3e1dcbe..44ae126774 100644
--- a/libavcodec/ppc/mpegvideodsp.c
+++ b/libavcodec/ppc/mpegvideodsp.c
@@ -23,8 +23,8 @@
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/mpegvideodsp.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/mpegvideoencdsp.c b/libavcodec/ppc/mpegvideoencdsp.c
index fa71bac0ba..d11f05bf1e 100644
--- a/libavcodec/ppc/mpegvideoencdsp.c
+++ b/libavcodec/ppc/mpegvideoencdsp.c
@@ -17,16 +17,14 @@
*/
#include "config.h"
+
#include <stdint.h>
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/mpegvideoencdsp.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/pixblockdsp.c b/libavcodec/ppc/pixblockdsp.c
index 96e702452f..c9e598b704 100644
--- a/libavcodec/ppc/pixblockdsp.c
+++ b/libavcodec/ppc/pixblockdsp.c
@@ -21,15 +21,12 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/avcodec.h"
#include "libavcodec/pixblockdsp.h"
diff --git a/libavcodec/ppc/svq1enc_altivec.c b/libavcodec/ppc/svq1enc_altivec.c
index 77d771eba6..e155f885cd 100644
--- a/libavcodec/ppc/svq1enc_altivec.c
+++ b/libavcodec/ppc/svq1enc_altivec.c
@@ -18,18 +18,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <stdint.h>
-
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
+
+#include <stdint.h>
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/svq1enc.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/vc1dsp_altivec.c b/libavcodec/ppc/vc1dsp_altivec.c
index d252421560..fc82502358 100644
--- a/libavcodec/ppc/vc1dsp_altivec.c
+++ b/libavcodec/ppc/vc1dsp_altivec.c
@@ -20,11 +20,12 @@
*/
#include "config.h"
+
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/vc1dsp.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/vorbisdsp_altivec.c b/libavcodec/ppc/vorbisdsp_altivec.c
index 509d48ae0c..52c29527ba 100644
--- a/libavcodec/ppc/vorbisdsp_altivec.c
+++ b/libavcodec/ppc/vorbisdsp_altivec.c
@@ -19,12 +19,12 @@
*/
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
+
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
+#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/vorbisdsp.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/vp3dsp_altivec.c b/libavcodec/ppc/vp3dsp_altivec.c
index 4dff4f1b96..2b7cc9d503 100644
--- a/libavcodec/ppc/vp3dsp_altivec.c
+++ b/libavcodec/ppc/vp3dsp_altivec.c
@@ -21,11 +21,12 @@
#include <string.h>
#include "config.h"
+
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/vp3dsp.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c
index 53fe44ab48..6857e6b6a2 100644
--- a/libavcodec/ppc/vp8dsp_altivec.c
+++ b/libavcodec/ppc/vp8dsp_altivec.c
@@ -21,12 +21,14 @@
*/
#include "config.h"
+
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
#include "libavutil/ppc/cpu.h"
-#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+
#include "libavcodec/vp8dsp.h"
+
#include "hpeldsp_altivec.h"
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index e7a6eedd22..adfe1708e1 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -23,16 +23,13 @@
#include "config.h"
-#if HAVE_ALTIVEC_H
-#include <altivec.h>
-#endif
-
#include "libavutil/avassert.h"
#include "libavutil/avutil.h"
#include "libavutil/common.h"
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
#include "libavutil/pixdesc.h"
+#include "libavutil/ppc/util_altivec.h"
#define STR(s) AV_TOSTRING(s) // AV_STRINGIFY is too long