[FFmpeg-cvslog] PPC: Move types_altivec.h and util_altivec.h from libavcodec to libavutil

Justin Ruggles git at videolan.org
Sat Jun 9 00:10:27 CEST 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Mon May 21 16:24:42 2012 -0400| [98db4e2a4e35ccc2406004216270ceaa1c6a7d00] | committer: Justin Ruggles

PPC: Move types_altivec.h and util_altivec.h from libavcodec to libavutil

This will allow for easier implementation of Altivec functions in libraries
other than libavcodec.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=98db4e2a4e35ccc2406004216270ceaa1c6a7d00
---

 libavcodec/ppc/dsputil_altivec.c              |    4 ++--
 libavcodec/ppc/fft_altivec.c                  |    5 +++--
 libavcodec/ppc/float_altivec.c                |    2 +-
 libavcodec/ppc/fmtconvert_altivec.c           |    2 +-
 libavcodec/ppc/gmc_altivec.c                  |    4 ++--
 libavcodec/ppc/h264_altivec.c                 |    4 ++--
 libavcodec/ppc/idct_altivec.c                 |    2 +-
 libavcodec/ppc/int_altivec.c                  |    3 +--
 libavcodec/ppc/mpegaudiodec_altivec.c         |    2 +-
 libavcodec/ppc/mpegvideo_altivec.c            |    5 +++--
 libavcodec/ppc/vc1dsp_altivec.c               |    5 ++---
 libavcodec/ppc/vp3dsp_altivec.c               |    4 ++--
 libavcodec/ppc/vp8dsp_altivec.c               |    4 ++--
 {libavcodec => libavutil}/ppc/types_altivec.h |    6 +++---
 {libavcodec => libavutil}/ppc/util_altivec.h  |    6 +++---
 15 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/libavcodec/ppc/dsputil_altivec.c b/libavcodec/ppc/dsputil_altivec.c
index 6679359..9ad73ef 100644
--- a/libavcodec/ppc/dsputil_altivec.c
+++ b/libavcodec/ppc/dsputil_altivec.c
@@ -24,9 +24,9 @@
 #if HAVE_ALTIVEC_H
 #include <altivec.h>
 #endif
+#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
-#include "util_altivec.h"
-#include "types_altivec.h"
 #include "dsputil_altivec.h"
 
 static int sad16_x2_altivec(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
diff --git a/libavcodec/ppc/fft_altivec.c b/libavcodec/ppc/fft_altivec.c
index 39830b2..c85d04f 100644
--- a/libavcodec/ppc/fft_altivec.c
+++ b/libavcodec/ppc/fft_altivec.c
@@ -19,9 +19,10 @@
  * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+
+#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/fft.h"
-#include "util_altivec.h"
-#include "types_altivec.h"
 
 /**
  * Do a complex FFT with the parameters defined in ff_fft_init(). The
diff --git a/libavcodec/ppc/float_altivec.c b/libavcodec/ppc/float_altivec.c
index 8253716..6e0556e 100644
--- a/libavcodec/ppc/float_altivec.c
+++ b/libavcodec/ppc/float_altivec.c
@@ -18,10 +18,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
 
 #include "dsputil_altivec.h"
-#include "util_altivec.h"
 
 static void vector_fmul_altivec(float *dst, const float *src0, const float *src1, int len)
 {
diff --git a/libavcodec/ppc/fmtconvert_altivec.c b/libavcodec/ppc/fmtconvert_altivec.c
index b1eaf9b..20a05d7 100644
--- a/libavcodec/ppc/fmtconvert_altivec.c
+++ b/libavcodec/ppc/fmtconvert_altivec.c
@@ -20,8 +20,8 @@
 
 #include "libavcodec/fmtconvert.h"
 
+#include "libavutil/ppc/util_altivec.h"
 #include "dsputil_altivec.h"
-#include "util_altivec.h"
 
 static void int32_to_float_fmul_scalar_altivec(float *dst, const int *src, float mul, int len)
 {
diff --git a/libavcodec/ppc/gmc_altivec.c b/libavcodec/ppc/gmc_altivec.c
index fb67b9e..45243c2 100644
--- a/libavcodec/ppc/gmc_altivec.c
+++ b/libavcodec/ppc/gmc_altivec.c
@@ -20,9 +20,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
-#include "util_altivec.h"
-#include "types_altivec.h"
 #include "dsputil_altivec.h"
 
 /*
diff --git a/libavcodec/ppc/h264_altivec.c b/libavcodec/ppc/h264_altivec.c
index 79e1714..92bfd45 100644
--- a/libavcodec/ppc/h264_altivec.c
+++ b/libavcodec/ppc/h264_altivec.c
@@ -19,13 +19,13 @@
  */
 
 #include "libavutil/cpu.h"
+#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
 #include "libavcodec/h264data.h"
 #include "libavcodec/h264dsp.h"
 
 #include "dsputil_altivec.h"
-#include "util_altivec.h"
-#include "types_altivec.h"
 
 #define PUT_OP_U8_ALTIVEC(d, s, dst) d = s
 #define AVG_OP_U8_ALTIVEC(d, s, dst) d = vec_avg(dst, s)
diff --git a/libavcodec/ppc/idct_altivec.c b/libavcodec/ppc/idct_altivec.c
index d2e9017..e599491 100644
--- a/libavcodec/ppc/idct_altivec.c
+++ b/libavcodec/ppc/idct_altivec.c
@@ -41,8 +41,8 @@
 #if HAVE_ALTIVEC_H
 #include <altivec.h>
 #endif
+#include "libavutil/ppc/types_altivec.h"
 #include "libavcodec/dsputil.h"
-#include "types_altivec.h"
 #include "dsputil_altivec.h"
 
 #define IDCT_HALF                                       \
diff --git a/libavcodec/ppc/int_altivec.c b/libavcodec/ppc/int_altivec.c
index 3c8b852..4fcdf77 100644
--- a/libavcodec/ppc/int_altivec.c
+++ b/libavcodec/ppc/int_altivec.c
@@ -28,12 +28,11 @@
 #include <altivec.h>
 #endif
 
+#include "libavutil/ppc/types_altivec.h"
 #include "libavcodec/dsputil.h"
 
 #include "dsputil_altivec.h"
 
-#include "types_altivec.h"
-
 static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
                                      int size) {
     int i, size16;
diff --git a/libavcodec/ppc/mpegaudiodec_altivec.c b/libavcodec/ppc/mpegaudiodec_altivec.c
index 5df0fda..fabde6a 100644
--- a/libavcodec/ppc/mpegaudiodec_altivec.c
+++ b/libavcodec/ppc/mpegaudiodec_altivec.c
@@ -20,7 +20,7 @@
  */
 
 #include "dsputil_altivec.h"
-#include "util_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
 #include "libavcodec/mpegaudiodsp.h"
 
diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c
index 42702fd..df111e9 100644
--- a/libavcodec/ppc/mpegvideo_altivec.c
+++ b/libavcodec/ppc/mpegvideo_altivec.c
@@ -23,12 +23,13 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+
 #include "libavutil/cpu.h"
+#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
 #include "libavcodec/mpegvideo.h"
 
-#include "util_altivec.h"
-#include "types_altivec.h"
 #include "dsputil_altivec.h"
 
 /* AltiVec version of dct_unquantize_h263
diff --git a/libavcodec/ppc/vc1dsp_altivec.c b/libavcodec/ppc/vc1dsp_altivec.c
index 307e0e9..38a7da2 100644
--- a/libavcodec/ppc/vc1dsp_altivec.c
+++ b/libavcodec/ppc/vc1dsp_altivec.c
@@ -19,12 +19,11 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
 #include "libavcodec/vc1dsp.h"
 
-#include "util_altivec.h"
-#include "dsputil_altivec.h"
-
 // main steps of 8x8 transform
 #define STEP8(s0, s1, s2, s3, s4, s5, s6, s7, vec_rnd) \
 do { \
diff --git a/libavcodec/ppc/vp3dsp_altivec.c b/libavcodec/ppc/vp3dsp_altivec.c
index bbe9170..938502e 100644
--- a/libavcodec/ppc/vp3dsp_altivec.c
+++ b/libavcodec/ppc/vp3dsp_altivec.c
@@ -18,9 +18,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/dsputil.h"
-#include "util_altivec.h"
-#include "types_altivec.h"
 #include "dsputil_altivec.h"
 
 static const vec_s16 constants =
diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c
index c3f6502..f570000 100644
--- a/libavcodec/ppc/vp8dsp_altivec.c
+++ b/libavcodec/ppc/vp8dsp_altivec.c
@@ -21,10 +21,10 @@
  */
 
 #include "libavutil/cpu.h"
+#include "libavutil/ppc/types_altivec.h"
+#include "libavutil/ppc/util_altivec.h"
 #include "libavcodec/vp8dsp.h"
 #include "dsputil_altivec.h"
-#include "types_altivec.h"
-#include "util_altivec.h"
 
 #define REPT4(...) { __VA_ARGS__, __VA_ARGS__, __VA_ARGS__, __VA_ARGS__ }
 
diff --git a/libavcodec/ppc/types_altivec.h b/libavutil/ppc/types_altivec.h
similarity index 93%
rename from libavcodec/ppc/types_altivec.h
rename to libavutil/ppc/types_altivec.h
index defa20e..0a4eaf8 100644
--- a/libavcodec/ppc/types_altivec.h
+++ b/libavutil/ppc/types_altivec.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_PPC_TYPES_ALTIVEC_H
-#define AVCODEC_PPC_TYPES_ALTIVEC_H
+#ifndef AVUTIL_PPC_TYPES_ALTIVEC_H
+#define AVUTIL_PPC_TYPES_ALTIVEC_H
 
 /***********************************************************************
  * Vector types
@@ -44,4 +44,4 @@
 #define zero_u32v (vec_u32) zerov
 #define zero_s32v (vec_s32) zerov
 
-#endif /* AVCODEC_PPC_TYPES_ALTIVEC_H */
+#endif /* AVUTIL_PPC_TYPES_ALTIVEC_H */
diff --git a/libavcodec/ppc/util_altivec.h b/libavutil/ppc/util_altivec.h
similarity index 96%
rename from libavcodec/ppc/util_altivec.h
rename to libavutil/ppc/util_altivec.h
index 19ea962..bdbf862 100644
--- a/libavcodec/ppc/util_altivec.h
+++ b/libavutil/ppc/util_altivec.h
@@ -21,8 +21,8 @@
  * Contains misc utility macros and inline functions
  */
 
-#ifndef AVCODEC_PPC_UTIL_ALTIVEC_H
-#define AVCODEC_PPC_UTIL_ALTIVEC_H
+#ifndef AVUTIL_PPC_UTIL_ALTIVEC_H
+#define AVUTIL_PPC_UTIL_ALTIVEC_H
 
 #include <stdint.h>
 
@@ -115,4 +115,4 @@ static inline vec_u8 load_with_perm_vec(int offset, uint8_t *src, vec_u8 perm_ve
     return vec_perm(a, b, perm_vec);
 }
 
-#endif /* AVCODEC_PPC_UTIL_ALTIVEC_H */
+#endif /* AVUTIL_PPC_UTIL_ALTIVEC_H */



More information about the ffmpeg-cvslog mailing list