summaryrefslogtreecommitdiff
path: root/libavfilter/x86
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-12-06 00:14:15 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-12-06 00:14:15 +0000
commit90f1f3bf0010e9a157df775e188811fe37c6b371 (patch)
treea47d84617c25687848f289605fe21779d78939b7 /libavfilter/x86
parent28b4eb95bca07a84b740e9f91672b73a088184ab (diff)
In yadif filter, declare asm constants directly to avoid dependency on libavcodec
Originally committed as revision 25895 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/x86')
-rw-r--r--libavfilter/x86/yadif.c4
-rw-r--r--libavfilter/x86/yadif_template.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/libavfilter/x86/yadif.c b/libavfilter/x86/yadif.c
index 8fda59ae37..2b55c00763 100644
--- a/libavfilter/x86/yadif.c
+++ b/libavfilter/x86/yadif.c
@@ -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
diff --git a/libavfilter/x86/yadif_template.c b/libavfilter/x86/yadif_template.c
index 5788a08e3a..3e520cb1e8 100644
--- a/libavfilter/x86/yadif_template.c
+++ b/libavfilter/x86/yadif_template.c
@@ -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_t *dst,
"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\