[FFmpeg-cvslog] r25895 - in trunk: libavcodec/x86/dsputil_mmx.c libavfilter/x86/yadif.c libavfilter/x86/yadif_template.c

bcoudurier subversion
Mon Dec 6 01:14:16 CET 2010


Author: bcoudurier
Date: Mon Dec  6 01:14:15 2010
New Revision: 25895

Log:
In yadif filter, declare asm constants directly to avoid dependency on libavcodec

Modified:
   trunk/libavcodec/x86/dsputil_mmx.c
   trunk/libavfilter/x86/yadif.c
   trunk/libavfilter/x86/yadif_template.c

Modified: trunk/libavcodec/x86/dsputil_mmx.c
==============================================================================
--- trunk/libavcodec/x86/dsputil_mmx.c	Sun Dec  5 20:42:14 2010	(r25894)
+++ trunk/libavcodec/x86/dsputil_mmx.c	Mon Dec  6 01:14:15 2010	(r25895)
@@ -41,7 +41,6 @@ DECLARE_ALIGNED(8,  const uint64_t, ff_w
 DECLARE_ALIGNED(16, const uint64_t, ff_pdw_80000000)[2] =
 {0x8000000080000000ULL, 0x8000000080000000ULL};
 
-DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_1  ) = {0x0001000100010001ULL, 0x0001000100010001ULL};
 DECLARE_ALIGNED(8,  const uint64_t, ff_pw_3  ) = 0x0003000300030003ULL;
 DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_4  ) = {0x0004000400040004ULL, 0x0004000400040004ULL};
 DECLARE_ALIGNED(16, const xmm_reg,  ff_pw_5  ) = {0x0005000500050005ULL, 0x0005000500050005ULL};

Modified: trunk/libavfilter/x86/yadif.c
==============================================================================
--- trunk/libavfilter/x86/yadif.c	Sun Dec  5 20:42:14 2010	(r25894)
+++ trunk/libavfilter/x86/yadif.c	Mon Dec  6 01:14:15 2010	(r25895)
@@ -20,8 +20,12 @@
 
 #include "libavutil/cpu.h"
 #include "libavutil/x86_cpu.h"
+#include "libavcodec/x86/dsputil_mmx.h"
 #include "libavfilter/yadif.h"
 
+DECLARE_ASM_CONST(16, const xmm_reg, pb_1) = {0x0101010101010101ULL, 0x0101010101010101ULL};
+DECLARE_ASM_CONST(16, const xmm_reg, pw_1) = {0x0001000100010001ULL, 0x0001000100010001ULL};
+
 #if HAVE_SSSE3
 #define COMPILE_TEMPLATE_SSE 1
 #define COMPILE_TEMPLATE_SSSE3 1

Modified: trunk/libavfilter/x86/yadif_template.c
==============================================================================
--- trunk/libavfilter/x86/yadif_template.c	Sun Dec  5 20:42:14 2010	(r25894)
+++ trunk/libavfilter/x86/yadif_template.c	Mon Dec  6 01:14:15 2010	(r25895)
@@ -62,7 +62,7 @@
             MOVQ"      "MM"2, "MM"5 \n\t"\
             "pxor      "MM"3, "MM"4 \n\t"\
             "pavgb     "MM"3, "MM"5 \n\t"\
-            "pand     "MANGLE(ff_pb_1)", "MM"4 \n\t"\
+            "pand     "MANGLE(pb_1)", "MM"4 \n\t"\
             "psubusb   "MM"4, "MM"5 \n\t"\
             PSRL1(MM"5")                 \
             "punpcklbw "MM"7, "MM"5 \n\t" /* (cur[x-refs+j] + cur[x+refs-j])>>1 */\
@@ -92,7 +92,7 @@
 
 #define CHECK2 /* pretend not to have checked dir=2 if dir=1 was bad.\
                   hurts both quality and speed, but matches the C version. */\
-            "paddw    "MANGLE(ff_pw_1)", "MM"6 \n\t"\
+            "paddw    "MANGLE(pw_1)", "MM"6 \n\t"\
             "psllw     $14,   "MM"6 \n\t"\
             "paddsw    "MM"6, "MM"2 \n\t"\
             MOVQ"      "MM"0, "MM"3 \n\t"\
@@ -167,7 +167,7 @@ void RENAME(ff_yadif_filter_line)(uint8_
             "punpcklbw "MM"7, "MM"3 \n\t" /* ABS(cur[x-refs+1] - cur[x+refs+1]) */\
             "paddw     "MM"2, "MM"0 \n\t"\
             "paddw     "MM"3, "MM"0 \n\t"\
-            "psubw    "MANGLE(ff_pw_1)", "MM"0 \n\t" /* spatial_score */\
+            "psubw    "MANGLE(pw_1)", "MM"0 \n\t" /* spatial_score */\
 \
             CHECK(-2,0)\
             CHECK1\



More information about the ffmpeg-cvslog mailing list