[FFmpeg-devel] [PATCH] Move mathops.h to libavutil.

Mans Rullgard mans
Mon Nov 24 21:56:02 CET 2008


---
 libavcodec/lsp.c                               |    2 +-
 libavcodec/mpegaudiodec.c                      |    2 +-
 {libavcodec/armv4l => libavutil/arm}/mathops.h |    6 +++---
 {libavcodec => libavutil}/bfin/mathops.h       |    6 +++---
 {libavcodec => libavutil}/mathops.h            |   12 ++++++------
 {libavcodec => libavutil}/ppc/mathops.h        |    6 +++---
 {libavcodec/i386 => libavutil/x86}/mathops.h   |    6 +++---
 7 files changed, 20 insertions(+), 20 deletions(-)
 rename {libavcodec/armv4l => libavutil/arm}/mathops.h (96%)
 rename {libavcodec => libavutil}/bfin/mathops.h (95%)
 rename {libavcodec => libavutil}/mathops.h (91%)
 rename {libavcodec => libavutil}/ppc/mathops.h (92%)
 rename {libavcodec/i386 => libavutil/x86}/mathops.h (93%)

diff --git a/libavcodec/lsp.c b/libavcodec/lsp.c
index f57f621..fd57dc2 100644
--- a/libavcodec/lsp.c
+++ b/libavcodec/lsp.c
@@ -24,7 +24,7 @@
 
 #include "avcodec.h"
 #define FRAC_BITS 14
-#include "mathops.h"
+#include "libavutil/mathops.h"
 #include "lsp.h"
 #include "celp_math.h"
 
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index a853562..88969c2 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -43,7 +43,7 @@
 #include "mpegaudio.h"
 #include "mpegaudiodecheader.h"
 
-#include "mathops.h"
+#include "libavutil/mathops.h"
 
 /* WARNING: only correct for posititive numbers */
 #define FIXR(a)   ((int)((a) * FRAC_ONE + 0.5))
diff --git a/libavcodec/armv4l/mathops.h b/libavutil/arm/mathops.h
similarity index 96%
rename from libavcodec/armv4l/mathops.h
rename to libavutil/arm/mathops.h
index f8a3d6d..5a9f9fa 100644
--- a/libavcodec/armv4l/mathops.h
+++ b/libavutil/arm/mathops.h
@@ -19,8 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_ARMV4L_MATHOPS_H
-#define AVCODEC_ARMV4L_MATHOPS_H
+#ifndef AVUTIL_ARM_MATHOPS_H
+#define AVUTIL_ARM_MATHOPS_H
 
 #include <stdint.h>
 #include "libavutil/common.h"
@@ -90,4 +90,4 @@ static inline av_const MUL16(int ra, int rb)
 
 #endif
 
-#endif /* AVCODEC_ARMV4L_MATHOPS_H */
+#endif /* AVUTIL_ARM_MATHOPS_H */
diff --git a/libavcodec/bfin/mathops.h b/libavutil/bfin/mathops.h
similarity index 95%
rename from libavcodec/bfin/mathops.h
rename to libavutil/bfin/mathops.h
index 1dd9338..6ffb6e4 100644
--- a/libavcodec/bfin/mathops.h
+++ b/libavutil/bfin/mathops.h
@@ -19,8 +19,8 @@
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
-#ifndef AVCODEC_BFIN_MATHOPS_H
-#define AVCODEC_BFIN_MATHOPS_H
+#ifndef AVUTIL_BFIN_MATHOPS_H
+#define AVUTIL_BFIN_MATHOPS_H
 
 #ifdef CONFIG_MPEGAUDIO_HP
 #define MULH(X,Y) ({ int xxo;                           \
@@ -49,4 +49,4 @@
        : "=W" (xxo) : "d" (a), "d" (b) : "A1");         \
     xxo; })
 
-#endif /* AVCODEC_BFIN_MATHOPS_H */
+#endif /* AVUTIL_BFIN_MATHOPS_H */
diff --git a/libavcodec/mathops.h b/libavutil/mathops.h
similarity index 91%
rename from libavcodec/mathops.h
rename to libavutil/mathops.h
index 817e452..d1b953a 100644
--- a/libavcodec/mathops.h
+++ b/libavutil/mathops.h
@@ -19,18 +19,18 @@
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
-#ifndef AVCODEC_MATHOPS_H
-#define AVCODEC_MATHOPS_H
+#ifndef AVUTIL_MATHOPS_H
+#define AVUTIL_MATHOPS_H
 
-#include "libavutil/common.h"
+#include "common.h"
 
 #ifdef ARCH_X86_32
 
-#include "i386/mathops.h"
+#include "x86/mathops.h"
 
 #elif defined(ARCH_ARMV4L)
 
-#include "armv4l/mathops.h"
+#include "arm/mathops.h"
 
 #elif defined(ARCH_POWERPC)
 
@@ -83,5 +83,5 @@ static av_always_inline int MULH(int a, int b){
 #   define MLS16(rt, ra, rb) ((rt) -= (ra) * (rb))
 #endif
 
-#endif /* AVCODEC_MATHOPS_H */
+#endif /* AVUTIL_MATHOPS_H */
 
diff --git a/libavcodec/ppc/mathops.h b/libavutil/ppc/mathops.h
similarity index 92%
rename from libavcodec/ppc/mathops.h
rename to libavutil/ppc/mathops.h
index 776ee62..5e67d82 100644
--- a/libavcodec/ppc/mathops.h
+++ b/libavutil/ppc/mathops.h
@@ -20,8 +20,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_PPC_MATHOPS_H
-#define AVCODEC_PPC_MATHOPS_H
+#ifndef AVUTIL_PPC_MATHOPS_H
+#define AVUTIL_PPC_MATHOPS_H
 
 #if defined(ARCH_POWERPC_405)
 /* signed 16x16 -> 32 multiply add accumulate */
@@ -35,4 +35,4 @@
     __rt; })
 #endif
 
-#endif /* AVCODEC_PPC_MATHOPS_H */
+#endif /* AVUTIL_PPC_MATHOPS_H */
diff --git a/libavcodec/i386/mathops.h b/libavutil/x86/mathops.h
similarity index 93%
rename from libavcodec/i386/mathops.h
rename to libavutil/x86/mathops.h
index 77c72d8..97d9d0b 100644
--- a/libavcodec/i386/mathops.h
+++ b/libavutil/x86/mathops.h
@@ -19,8 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_I386_MATHOPS_H
-#define AVCODEC_I386_MATHOPS_H
+#ifndef AVUTIL_X86_MATHOPS_H
+#define AVUTIL_X86_MATHOPS_H
 
 #define MULL(ra, rb, shift) \
         ({ int rt, dummy; __asm__ (\
@@ -40,4 +40,4 @@
      __asm__ ("imull %2\n\t" : "=A"(rt) : "a" ((int)ra), "g" ((int)rb));\
      rt; })
 
-#endif /* AVCODEC_I386_MATHOPS_H */
+#endif /* AVUTIL_X86_MATHOPS_H */
-- 
1.6.0.4





More information about the ffmpeg-devel mailing list