[Ffmpeg-cvslog] r5595 - in trunk: libavcodec/dct-test.c libavcodec/i386/dsputil_mmx.c libavcodec/i386/mmx.h libavcodec/i386/motion_est_mmx.c libavcodec/i386/mpegvideo_mmx.c libavcodec/i386/snowdsp_mmx.c libavutil/x86_cpu.h

lucabe subversion
Mon Jul 3 12:52:07 CEST 2006


Author: lucabe
Date: Mon Jul  3 12:52:07 2006
New Revision: 5595

Added:
   trunk/libavutil/x86_cpu.h
Modified:
   trunk/libavcodec/dct-test.c
   trunk/libavcodec/i386/dsputil_mmx.c
   trunk/libavcodec/i386/mmx.h
   trunk/libavcodec/i386/motion_est_mmx.c
   trunk/libavcodec/i386/mpegvideo_mmx.c
   trunk/libavcodec/i386/snowdsp_mmx.c

Log:
Move REG_* macros from libavcodec/i386/mmx.h to libavutil/x86_cpu.h


Modified: trunk/libavcodec/dct-test.c
==============================================================================
--- trunk/libavcodec/dct-test.c	(original)
+++ trunk/libavcodec/dct-test.c	Mon Jul  3 12:52:07 2006
@@ -12,7 +12,6 @@
 
 #include "dsputil.h"
 
-#include "i386/mmx.h"
 #include "simple_idct.h"
 #include "faandct.h"
 

Modified: trunk/libavcodec/i386/dsputil_mmx.c
==============================================================================
--- trunk/libavcodec/i386/dsputil_mmx.c	(original)
+++ trunk/libavcodec/i386/dsputil_mmx.c	Mon Jul  3 12:52:07 2006
@@ -23,6 +23,7 @@
 #include "../dsputil.h"
 #include "../simple_idct.h"
 #include "../mpegvideo.h"
+#include "x86_cpu.h"
 #include "mmx.h"
 
 //#undef NDEBUG

Modified: trunk/libavcodec/i386/mmx.h
==============================================================================
--- trunk/libavcodec/i386/mmx.h	(original)
+++ trunk/libavcodec/i386/mmx.h	Mon Jul  3 12:52:07 2006
@@ -5,24 +5,6 @@
 #ifndef AVCODEC_I386MMX_H
 #define AVCODEC_I386MMX_H
 
-#ifdef ARCH_X86_64
-#  define REG_a "rax"
-#  define REG_b "rbx"
-#  define REG_c "rcx"
-#  define REG_d "rdx"
-#  define REG_D "rdi"
-#  define REG_S "rsi"
-#  define PTR_SIZE "8"
-#else
-#  define REG_a "eax"
-#  define REG_b "ebx"
-#  define REG_c "ecx"
-#  define REG_d "edx"
-#  define REG_D "edi"
-#  define REG_S "esi"
-#  define PTR_SIZE "4"
-#endif
-
 /*
  * The type of an value that fits in an MMX register (note that long
  * long constant values MUST be suffixed by LL and unsigned long long

Modified: trunk/libavcodec/i386/motion_est_mmx.c
==============================================================================
--- trunk/libavcodec/i386/motion_est_mmx.c	(original)
+++ trunk/libavcodec/i386/motion_est_mmx.c	Mon Jul  3 12:52:07 2006
@@ -20,7 +20,7 @@
  * mostly by Michael Niedermayer <michaelni at gmx.at>
  */
 #include "../dsputil.h"
-#include "mmx.h"
+#include "x86_cpu.h"
 
 static const __attribute__ ((aligned(8))) uint64_t round_tab[3]={
 0x0000000000000000ULL,

Modified: trunk/libavcodec/i386/mpegvideo_mmx.c
==============================================================================
--- trunk/libavcodec/i386/mpegvideo_mmx.c	(original)
+++ trunk/libavcodec/i386/mpegvideo_mmx.c	Mon Jul  3 12:52:07 2006
@@ -23,7 +23,7 @@
 #include "../dsputil.h"
 #include "../mpegvideo.h"
 #include "../avcodec.h"
-#include "mmx.h"
+#include "x86_cpu.h"
 
 extern uint8_t zigzag_direct_noperm[64];
 extern uint16_t inv_zigzag_direct16[64];

Modified: trunk/libavcodec/i386/snowdsp_mmx.c
==============================================================================
--- trunk/libavcodec/i386/snowdsp_mmx.c	(original)
+++ trunk/libavcodec/i386/snowdsp_mmx.c	Mon Jul  3 12:52:07 2006
@@ -19,7 +19,7 @@
 
 #include "../avcodec.h"
 #include "../snow.h"
-#include "mmx.h"
+#include "x86_cpu.h"
 
 void ff_snow_horizontal_compose97i_sse2(DWTELEM *b, int width){
     const int w2= (width+1)>>1;

Added: trunk/libavutil/x86_cpu.h
==============================================================================
--- (empty file)
+++ trunk/libavutil/x86_cpu.h	Mon Jul  3 12:52:07 2006
@@ -0,0 +1,38 @@
+#ifndef AVUTIL_X86CPU_H
+#define AVUTIL_X86CPU_H
+
+#ifdef ARCH_X86_64
+#  define REG_a "rax"
+#  define REG_b "rbx"
+#  define REG_c "rcx"
+#  define REG_d "rdx"
+#  define REG_D "rdi"
+#  define REG_S "rsi"
+#  define PTR_SIZE "8"
+
+#  define REG_SP "rsp"
+#  define REG_BP "rbp"
+#  define REGBP   rbp
+#  define REGa    rax
+#  define REGb    rbx
+#  define REGSP   rsp
+
+#else
+
+#  define REG_a "eax"
+#  define REG_b "ebx"
+#  define REG_c "ecx"
+#  define REG_d "edx"
+#  define REG_D "edi"
+#  define REG_S "esi"
+#  define PTR_SIZE "4"
+
+#  define REG_SP "esp"
+#  define REG_BP "ebp"
+#  define REGBP   ebp
+#  define REGa    eax
+#  define REGb    ebx
+#  define REGSP   esp
+#endif
+
+#endif /* AVUTIL_X86CPU_H */




More information about the ffmpeg-cvslog mailing list