summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-06-05 16:00:06 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-06-05 16:00:06 +0000
commit45488a925b73cbefa2dfd93de3588486012e6132 (patch)
tree4e97a5176fa055d8736de6448dc5e80e1f40c388 /src
parentd3e0104e88cfe385e0cfba9ac7a2ab1100029f18 (diff)
downloadxine-lib-45488a925b73cbefa2dfd93de3588486012e6132.tar.gz
xine-lib-45488a925b73cbefa2dfd93de3588486012e6132.tar.bz2
quite some hacks for gcc 2.95 compatibility
CVS patchset: 7612 CVS date: 2005/06/05 16:00:06
Diffstat (limited to 'src')
-rw-r--r--src/post/deinterlace/plugins/Makefile.am6
-rw-r--r--src/post/deinterlace/plugins/greedy2frame_template.c14
-rw-r--r--src/post/deinterlace/plugins/greedyh.asm123
-rw-r--r--src/post/deinterlace/plugins/kdetv_greedyh.c1
-rw-r--r--src/post/deinterlace/plugins/kdetv_tomsmocomp.c1
-rw-r--r--src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc4
-rw-r--r--src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc24
-rw-r--r--src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc54
-rw-r--r--src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc40
-rw-r--r--src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc16
-rw-r--r--src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc20
-rw-r--r--src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h12
-rw-r--r--src/post/deinterlace/xine_plugin.c4
13 files changed, 161 insertions, 158 deletions
diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am
index 4cf8d85cf..7c5a0770c 100644
--- a/src/post/deinterlace/plugins/Makefile.am
+++ b/src/post/deinterlace/plugins/Makefile.am
@@ -28,7 +28,9 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \
tomsmocomp/TomsMoCompAll2.inc tomsmocomp/WierdBob.inc \
tomsmocomp/tomsmocompmacros.h x86-64_macros.inc
-AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace
+# libpostproc is here so we can use their nice mangle.h
+AM_CFLAGS = -I$(top_srcdir)/src/post/deinterlace \
+ -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc
libdir = $(XINE_PLUGINDIR)/post
@@ -43,8 +45,8 @@ libdeinterlaceplugins_la_SOURCES = \
weave.c \
greedy2frame.c \
scalerbob.c \
+ kdetv_greedyh.c \
kdetv_tomsmocomp.c
-# kdetv_greedyh.c \
libdeinterlaceplugins_la_LIBADD = $(XINE_LIB)
libdeinterlaceplugins_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
diff --git a/src/post/deinterlace/plugins/greedy2frame_template.c b/src/post/deinterlace/plugins/greedy2frame_template.c
index 13db375ef..7b68d6e46 100644
--- a/src/post/deinterlace/plugins/greedy2frame_template.c
+++ b/src/post/deinterlace/plugins/greedy2frame_template.c
@@ -1,5 +1,5 @@
/*****************************************************************************
-** $Id: greedy2frame_template.c,v 1.7 2004/04/09 02:57:06 miguelfreitas Exp $
+** $Id: greedy2frame_template.c,v 1.8 2005/06/05 16:00:06 miguelfreitas Exp $
******************************************************************************
** Copyright (c) 2000 John Adcock, Tom Barry, Steve Grimm All rights reserved.
** port copyright (c) 2003 Miguel Freitas
@@ -19,6 +19,9 @@
** CVS Log
**
** $Log: greedy2frame_template.c,v $
+** Revision 1.8 2005/06/05 16:00:06 miguelfreitas
+** quite some hacks for gcc 2.95 compatibility
+**
** Revision 1.7 2004/04/09 02:57:06 miguelfreitas
** tvtime deinterlacing algorithms assumed top_field_first=1
** top_field_first=0 (aka bottom_field_first) should now work as expected
@@ -93,14 +96,7 @@
static int64_t qwGreedyTwoFrameThreshold;
#endif
-#if !defined(MANGLE)
-# if defined(__MINGW32__) || defined(__CYGWIN__) || \
- defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
-# define MANGLE(a) "_" #a
-# else
-# define MANGLE(a) #a
-# endif
-#endif
+#include <mangle.h>
#if defined(IS_SSE)
static void DeinterlaceGreedy2Frame_SSE(uint8_t *output, int outstride,
diff --git a/src/post/deinterlace/plugins/greedyh.asm b/src/post/deinterlace/plugins/greedyh.asm
index d2b3f3566..1b7561b09 100644
--- a/src/post/deinterlace/plugins/greedyh.asm
+++ b/src/post/deinterlace/plugins/greedyh.asm
@@ -17,6 +17,21 @@
/////////////////////////////////////////////////////////////////////////////
#include "x86-64_macros.inc"
+#include <mangle.h>
+
+#if !defined(MASKS_DEFINED)
+#define MASKS_DEFINED
+static const int64_t __attribute__((__used__)) YMask = 0x00ff00ff00ff00ffull; // to keep only luma
+static const int64_t __attribute__((__used__)) UVMask = 0xff00ff00ff00ff00ull; // to keep only chroma
+static const int64_t __attribute__((__used__)) ShiftMask = 0xfefffefffefffeffull; // to avoid shifting chroma to luma
+static const int64_t __attribute__((__used__)) QW256 = 0x0100010001000100ull; // 4 256's
+
+static int64_t MaxComb;
+static int64_t MotionThreshold;
+static int64_t MotionSense;
+static int64_t QW256B;
+
+#endif
static void FUNCT_NAME(uint8_t *output, int outstride,
deinterlace_frame_data_t *data,
@@ -26,16 +41,6 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
int stride = (width*2);
int InfoIsOdd = bottom_field;
- // in tight loop some vars are accessed faster in local storage
- int64_t YMask = 0x00ff00ff00ff00ffull; // to keep only luma
- int64_t UVMask = 0xff00ff00ff00ff00ull; // to keep only chroma
- int64_t ShiftMask = 0xfefffefffefffeffull; // to avoid shifting chroma to luma
- int64_t QW256 = 0x0100010001000100ull; // 4 256's
-
- int64_t MaxComb;
- int64_t MotionThreshold;
- int64_t MotionSense;
-
int Line;
long LoopCtr;
long oldbx;
@@ -49,7 +54,6 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
unsigned char* L2P; // ptr to prev Line2
unsigned char* Dest = output;
- int64_t QW256B;
int64_t LastAvg=0; //interp value from left qword
// Set up our two parms that are actually evaluated for each pixel
@@ -61,7 +65,6 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
i = GreedyMotionSense; // scale to range of 0-257
MotionSense = i << 48 | i << 32 | i << 16 | i;
-
i = 0xffffffff - 256;
QW256B = i << 48 | i << 32 | i << 16 | i; // save a couple instr on PMINSW instruct.
@@ -105,20 +108,40 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
for (Line = 0; Line < (FieldHeight - 1); ++Line) {
LoopCtr = stride / 8 - 1; // there are LineLength / 8 qwords per line but do 1 less, adj at end of loop
+/* Hans-Dieter Kosch writes:
+ *
+ * > The older compilers do not understand the syntax
+ * > __asm__ ( "command %[name0]" : : [name0] "x"(arg0) )
+ * > They only understand
+ * > __asm__ ( "command %0" : : "x"(arg0) )
+ *
+ * now we define the arguments to make the asm code less ugly.
+ */
+#ifndef asmLastAvg
+#define asmLastAvg "%0"
+#define asmL1 "%1"
+#define asmL3 "%2"
+#define asmL2P "%3"
+#define asmL2 "%4"
+#define asmDest "%5"
+#define asmLoopCtr "%6"
+#define asmoldbx "%7"
+#endif
+
// For ease of reading, the comments below assume that we're operating on an odd
// field (i.e., that InfoIsOdd is true). Assume the obvious for even lines..
__asm__ __volatile__
(
// save ebx (-fPIC)
- MOVX" %%"XBX", %[oldbx]\n\t"
+ MOVX" %%"XBX", "asmoldbx"\n\t"
- MOVX" %[L1], %%"XAX"\n\t"
+ MOVX" "asmL1", %%"XAX"\n\t"
LEAX" 8(%%"XAX"), %%"XBX"\n\t" // next qword needed by DJR
- MOVX" %[L3], %%"XCX"\n\t"
+ MOVX" "asmL3", %%"XCX"\n\t"
SUBX" %%"XAX", %%"XCX"\n\t" // carry L3 addr as an offset
- MOVX" %[L2P], %%"XDX"\n\t"
- MOVX" %[L2], %%"XSI"\n\t"
- MOVX" %[Dest], %%"XDI"\n\t" // DL1 if Odd or DL2 if Even
+ MOVX" "asmL2P", %%"XDX"\n\t"
+ MOVX" "asmL2", %%"XSI"\n\t"
+ MOVX" "asmDest", %%"XDI"\n\t" // DL1 if Odd or DL2 if Even
".align 8\n\t"
"1:\n\t"
@@ -129,15 +152,15 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
"movq (%%"XAX", %%"XCX"), %%mm3\n\t" // L3, next odd row
"movq %%mm1, %%mm6\n\t" // L1 - get simple single pixel interp
// pavgb mm6, mm3 // use macro below
- V_PAVGB ("%%mm6", "%%mm3", "%%mm4", "%[ShiftMask]")
+ V_PAVGB ("%%mm6", "%%mm3", "%%mm4", MANGLE(ShiftMask))
// DJR - Diagonal Jaggie Reduction
// In the event that we are going to use an average (Bob) pixel we do not want a jagged
// stair step effect. To combat this we avg in the 2 horizontally adjacen pixels into the
// interpolated Bob mix. This will do horizontal smoothing for only the Bob'd pixels.
- "movq %[LastAvg], %%mm4\n\t" // the bob value from prev qword in row
- "movq %%mm6, %[LastAvg]\n\t" // save for next pass
+ "movq "asmLastAvg", %%mm4\n\t" // the bob value from prev qword in row
+ "movq %%mm6, "asmLastAvg"\n\t" // save for next pass
"psrlq $48, %%mm4\n\t" // right justify 1 pixel
"movq %%mm6, %%mm7\n\t" // copy of simple bob pixel
"psllq $16, %%mm7\n\t" // left justify 3 pixels
@@ -145,22 +168,22 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
"movq (%%"XBX"), %%mm5\n\t" // next horiz qword from L1
// pavgb mm5, qword ptr[ebx+ecx] // next horiz qword from L3, use macro below
- V_PAVGB ("%%mm5", "(%%"XBX",%%"XCX")", "%%mm7", "%[ShiftMask]")
+ V_PAVGB ("%%mm5", "(%%"XBX",%%"XCX")", "%%mm7", MANGLE(ShiftMask))
"psllq $48, %%mm5\n\t" // left just 1 pixel
"movq %%mm6, %%mm7\n\t" // another copy of simple bob pixel
"psrlq $16, %%mm7\n\t" // right just 3 pixels
"por %%mm7, %%mm5\n\t" // combine
// pavgb mm4, mm5 // avg of forward and prev by 1 pixel, use macro
- V_PAVGB ("%%mm4", "%%mm5", "%%mm5", "%[ShiftMask]") // mm5 gets modified if MMX
+ V_PAVGB ("%%mm4", "%%mm5", "%%mm5", MANGLE(ShiftMask)) // mm5 gets modified if MMX
// pavgb mm6, mm4 // avg of center and surround interp vals, use macro
- V_PAVGB ("%%mm6", "%%mm4", "%%mm7", "%[ShiftMask]")
+ V_PAVGB ("%%mm6", "%%mm4", "%%mm7", MANGLE(ShiftMask))
// Don't do any more averaging than needed for mmx. It hurts performance and causes rounding errors.
#ifndef IS_MMX
// pavgb mm4, mm6 // 1/4 center, 3/4 adjacent
- V_PAVGB ("%%mm4", "%%mm6", "%%mm7", "%[ShiftMask]")
+ V_PAVGB ("%%mm4", "%%mm6", "%%mm7", MANGLE(ShiftMask))
// pavgb mm6, mm4 // 3/8 center, 5/8 adjacent
- V_PAVGB ("%%mm6", "%%mm4", "%%mm7", "%[ShiftMask]")
+ V_PAVGB ("%%mm6", "%%mm4", "%%mm7", MANGLE(ShiftMask))
#endif
// get abs value of possible L2 comb
@@ -213,34 +236,34 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
// pminub mm5, mm3 // now = Min(L1,L3), use macro
V_PMINUB ("%%mm5", "%%mm3", "%%mm7")
// allow the value to be above the high or below the low by amt of MaxComb
- "psubusb %[MaxComb], %%mm5\n\t" // lower min by diff
- "paddusb %[MaxComb], %%mm2\n\t" // increase max by diff
+ "psubusb "MANGLE(MaxComb)", %%mm5\n\t" // lower min by diff
+ "paddusb "MANGLE(MaxComb)", %%mm2\n\t" // increase max by diff
// pmaxub mm4, mm5 // now = Max(best,Min(L1,L3) use macro
V_PMAXUB ("%%mm4", "%%mm5")
// pminub mm4, mm2 // now = Min( Max(best, Min(L1,L3), L2 )=L2 clipped
V_PMINUB ("%%mm4", "%%mm2", "%%mm7")
// Blend weave pixel with bob pixel, depending on motion val in mm0
- "psubusb %[MotionThreshold], %%mm0\n\t"// test Threshold, clear chroma change >>>??
- "pmullw %[MotionSense], %%mm0\n\t" // mul by user factor, keep low 16 bits
- "movq %[QW256], %%mm7\n\t"
+ "psubusb "MANGLE(MotionThreshold)", %%mm0\n\t"// test Threshold, clear chroma change >>>??
+ "pmullw "MANGLE(MotionSense)", %%mm0\n\t" // mul by user factor, keep low 16 bits
+ "movq "MANGLE(QW256)", %%mm7\n\t"
#ifdef IS_SSE
"pminsw %%mm7, %%mm0\n\t" // max = 256
#else
- "paddusw %[QW256B], %%mm0\n\t" // add, may sat at fff..
- "psubusw %[QW256B], %%mm0\n\t" // now = Min(L1,256)
+ "paddusw "MANGLE(QW256B)", %%mm0\n\t" // add, may sat at fff..
+ "psubusw "MANGLE(QW256B)", %%mm0\n\t" // now = Min(L1,256)
#endif
"psubusw %%mm0, %%mm7\n\t" // so the 2 sum to 256, weighted avg
"movq %%mm4, %%mm2\n\t" // save weave chroma info before trashing
- "pand %[YMask], %%mm4\n\t" // keep only luma from calc'd value
+ "pand "MANGLE(YMask)", %%mm4\n\t" // keep only luma from calc'd value
"pmullw %%mm7, %%mm4\n\t" // use more weave for less motion
- "pand %[YMask], %%mm6\n\t" // keep only luma from calc'd value
+ "pand "MANGLE(YMask)", %%mm6\n\t" // keep only luma from calc'd value
"pmullw %%mm0, %%mm6\n\t" // use more bob for large motion
"paddusw %%mm6, %%mm4\n\t" // combine
"psrlw $8, %%mm4\n\t" // div by 256 to get weighted avg
// chroma comes from weave pixel
- "pand %[UVMask], %%mm2\n\t" // keep chroma
+ "pand "MANGLE(UVMask)", %%mm2\n\t" // keep chroma
"por %%mm4, %%mm2\n\t" // and combine
V_MOVNTQ ("(%%"XDI")", "%%mm2") // move in our clipped best, use macro
@@ -251,7 +274,7 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
LEAX" 8(%%"XDX"), %%"XDX"\n\t"
LEAX" 8(%%"XDI"), %%"XDI"\n\t"
LEAX" 8(%%"XSI"), %%"XSI"\n\t"
- DECX" %[LoopCtr]\n\t"
+ DECX" "asmLoopCtr"\n\t"
"jg 1b\n\t" // loop if not to last line
// note P-III default assumes backward branches taken
"jl 1f\n\t" // done
@@ -259,26 +282,18 @@ static void FUNCT_NAME(uint8_t *output, int outstride,
"jmp 1b\n\t"
"1:\n\t"
- MOVX" %[oldbx], %%"XBX"\n\t"
+ MOVX" "asmoldbx", %%"XBX"\n\t"
: /* no outputs */
- : [LastAvg] "m"(LastAvg),
- [L1] "m"(L1),
- [L3] "m"(L3),
- [L2P] "m"(L2P),
- [L2] "m"(L2),
- [Dest] "m"(Dest),
- [ShiftMask] "m"(ShiftMask),
- [MaxComb] "m"(MaxComb),
- [MotionThreshold] "m"(MotionThreshold),
- [MotionSense] "m"(MotionSense),
- [QW256B] "m"(QW256B),
- [YMask] "m"(YMask),
- [UVMask] "m"(UVMask),
- [LoopCtr] "m"(LoopCtr),
- [QW256] "m"(QW256),
- [oldbx] "m"(oldbx)
+ : "m"(LastAvg),
+ "m"(L1),
+ "m"(L3),
+ "m"(L2P),
+ "m"(L2),
+ "m"(Dest),
+ "m"(LoopCtr),
+ "m"(oldbx)
: XAX, XCX, XDX, XSI, XDI,
#ifdef ARCH_X86
diff --git a/src/post/deinterlace/plugins/kdetv_greedyh.c b/src/post/deinterlace/plugins/kdetv_greedyh.c
index 91c8fbac7..b45917e0d 100644
--- a/src/post/deinterlace/plugins/kdetv_greedyh.c
+++ b/src/post/deinterlace/plugins/kdetv_greedyh.c
@@ -36,6 +36,7 @@
#include "deinterlace.h"
#include "speedtools.h"
#include "speedy.h"
+#include "plugins.h"
#if defined (ARCH_X86) || defined (ARCH_X86_64)
diff --git a/src/post/deinterlace/plugins/kdetv_tomsmocomp.c b/src/post/deinterlace/plugins/kdetv_tomsmocomp.c
index d29a4ec34..3b1665e3c 100644
--- a/src/post/deinterlace/plugins/kdetv_tomsmocomp.c
+++ b/src/post/deinterlace/plugins/kdetv_tomsmocomp.c
@@ -36,6 +36,7 @@
#include "deinterlace.h"
#include "speedtools.h"
#include "speedy.h"
+#include "plugins.h"
#if defined (ARCH_X86) || defined (ARCH_X86_64)
diff --git a/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc b/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc
index b1d9aeca7..844c6f91a 100644
--- a/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc
+++ b/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc
@@ -7,9 +7,9 @@
// up by a little, and adjust later
#ifdef IS_SSE2
- "paddusb "_ONES", %%xmm7\n\t" // bias toward no motion
+ "paddusb "MANGLE(ONES)", %%xmm7\n\t" // bias toward no motion
#else
- "paddusb "_ONES", %%mm7\n\t" // bias toward no motion
+ "paddusb "MANGLE(ONES)", %%mm7\n\t" // bias toward no motion
#endif
MERGE4PIXavg("(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")") // center, in old and new
diff --git a/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc b/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc
index 4f11db4af..d0a749429 100644
--- a/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc
+++ b/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc
@@ -18,7 +18,7 @@
// Use the best weave if diffs less than 10 as that
// means the image is still or moving cleanly
// if there is motion we will clip which will catch anything
- "psubusb "_FOURS", %%mm7\n\t" // sets bits to zero if weave diff < 4
+ "psubusb "MANGLE(FOURS)", %%mm7\n\t" // sets bits to zero if weave diff < 4
"pxor %%mm0, %%mm0\n\t"
"pcmpeqb %%mm0, %%mm7\n\t" // all ff where weave better, else 00
"pcmpeqb %%mm7, %%mm0\n\t" // all ff where bob better, else 00
@@ -28,10 +28,10 @@
#else
// Use the better of bob or weave
// pminub mm4, TENS // the most we care about
- V_PMINUB ("%%mm4", _TENS, "%%mm0") // the most we care about
+ V_PMINUB ("%%mm4", MANGLE(TENS), "%%mm0") // the most we care about
"psubusb %%mm4, %%mm7\n\t" // foregive that much from weave est?
- "psubusb "_FOURS", %%mm7\n\t" // bias it a bit toward weave
+ "psubusb "MANGLE(FOURS)", %%mm7\n\t" // bias it a bit toward weave
"pxor %%mm0, %%mm0\n\t"
"pcmpeqb %%mm0, %%mm7\n\t" // all ff where weave better, else 00
"pcmpeqb %%mm7, %%mm0\n\t" // all ff where bob better, else 00
@@ -42,9 +42,9 @@
// pminub mm0, Max_Vals // but clip to catch the stray error
- V_PMINUB ("%%mm0", _Max_Vals, "%%mm1") // but clip to catch the stray error
+ V_PMINUB ("%%mm0", MANGLE(Max_Vals), "%%mm1") // but clip to catch the stray error
// pmaxub mm0, Min_Vals
- V_PMAXUB ("%%mm0", _Min_Vals)
+ V_PMAXUB ("%%mm0", MANGLE(Min_Vals))
#endif
@@ -54,11 +54,11 @@
#ifdef USE_VERTICAL_FILTER
"movq %%mm0, %%mm1\n\t"
// pavgb mm0, qword ptr["XBX"]
- V_PAVGB ("%%mm0", "(%%"XBX")", "%%mm2", _ShiftMask)
+ V_PAVGB ("%%mm0", "(%%"XBX")", "%%mm2", MANGLE(ShiftMask))
// movntq qword ptr["XAX"+"XDX"], mm0
V_MOVNTQ ("(%"XAX", %%"XDX")", "%%mm0")
// pavgb mm1, qword ptr["XBX"+"XCX"]
- V_PAVGB ("%%mm1", "(%%"XBX", %%"XCX")", "%%mm2", _ShiftMask)
+ V_PAVGB ("%%mm1", "(%%"XBX", %%"XCX")", "%%mm2", MANGLE(ShiftMask))
"addq "_dst_pitchw", %%"XBX
// movntq qword ptr["XAX"+"XDX"], mm1
V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm1")
@@ -79,22 +79,12 @@
: "m"(pBob),
"m"(src_pitch2),
- "m"(ShiftMask),
"m"(pDest),
"m"(dst_pitchw),
"m"(Last8),
"m"(pSrc),
"m"(pSrcP),
"m"(pBobP),
- "m"(DiffThres),
- "m"(Min_Vals),
- "m"(Max_Vals),
- "m"(FOURS),
- "m"(TENS),
- "m"(ONES),
- "m"(UVMask),
- "m"(Max_Mov),
- "m"(YMask),
"m"(oldbx)
: XAX, XCX, XDX, XSI, XDI,
diff --git a/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc b/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc
index 17a3616ee..38140909a 100644
--- a/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc
+++ b/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc
@@ -6,17 +6,6 @@ const unsigned char* pSrc;
const unsigned char* pBob;
const unsigned char* pBobP;
-int64_t Max_Mov = 0x0404040404040404ull;
-int64_t DiffThres = 0x0f0f0f0f0f0f0f0full;
-int64_t YMask = 0x00ff00ff00ff00ffull; // keeps only luma
-int64_t UVMask = 0xff00ff00ff00ff00ull; // keeps only chroma
-int64_t TENS = 0x0a0a0a0a0a0a0a0aull;
-int64_t FOURS = 0x0404040404040404ull;
-int64_t ONES = 0x0101010101010101ull;
-int64_t Min_Vals = 0x0000000000000000ull;
-int64_t Max_Vals = 0x0000000000000000ull;
-int64_t ShiftMask = 0xfefffefffefffeffull;
-
// long is int32 on ARCH_368, int64 on ARCH_AMD64. Declaring it this way
// saves a lot of xor's to delete 64bit garbage.
@@ -71,25 +60,18 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref
#ifndef _pBob
#define _pBob "%0"
#define _src_pitch2 "%1"
-#define _ShiftMask "%2"
-#define _pDest "%3"
-#define _dst_pitchw "%4"
-#define _Last8 "%5"
-#define _pSrc "%6"
-#define _pSrcP "%7"
-#define _pBobP "%8"
-#define _DiffThres "%9"
-#define _Min_Vals "%10"
-#define _Max_Vals "%11"
-#define _FOURS "%12"
-#define _TENS "%13"
-#define _ONES "%14"
-#define _UVMask "%15"
-#define _Max_Mov "%16"
-#define _YMask "%17"
-#define _oldbx "%18"
+#define _pDest "%2"
+#define _dst_pitchw "%3"
+#define _Last8 "%4"
+#define _pSrc "%5"
+#define _pSrcP "%6"
+#define _pBobP "%7"
+#define _oldbx "%8"
#endif
+ Min_Vals = 0x0000000000000000ull;
+ Max_Vals = 0x0000000000000000ull;
+
for (y=1; y < FldHeight-1; y++)
{
// pretend it's indented -->>
@@ -120,9 +102,9 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref
"movq (%%"XBX"), %%mm0\n\t"
"movq (%%"XBX", %%"XCX"), %%mm1\n\t" //, qword ptr["XBX"+"XCX"]
"movq %%mm0, %%mm2\n\t"
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // halfway between
- V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask) // 1/4 way
- V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask) // 3/4 way
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // halfway between
+ V_PAVGB ("%%mm0", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 1/4 way
+ V_PAVGB ("%%mm1", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 3/4 way
MOVX" "_pDest", %%"XDI"\n\t"
MOVX" "_dst_pitchw", %%"XAX"\n\t"
V_MOVNTQ ("(%%"XDI")", "%%mm0")
@@ -134,9 +116,9 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref
"movq (%%"XSI"), %%mm0\n\t"
"movq (%%"XSI", %%"XCX"), %%mm1\n\t" // qword ptr["XSI"+"XCX"]
"movq %%mm0, %%mm2\n\t"
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // halfway between
- V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask) // 1/4 way
- V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask) // 3/4 way
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // halfway between
+ V_PAVGB ("%%mm0", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 1/4 way
+ V_PAVGB ("%%mm1", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 3/4 way
ADDX" %%"XDX", %%"XDI"\n\t" // last 8 bytes of dest
V_MOVNTQ ("%%"XDI"", "%%mm0")
V_MOVNTQ ("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1)
@@ -144,7 +126,7 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref
#else
"movq (%%"XBX"), %%mm0\n\t"
// pavgb mm0, qword ptr["XBX"+"XCX"]
- V_PAVGB ("%%mm0", "(%%"XBX", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XBX"+"XCX"], mm2, ShiftMask)
+ V_PAVGB ("%%mm0", "(%%"XBX", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) // qword ptr["XBX"+"XCX"], mm2, ShiftMask)
MOVX" "_pDest", %%"XDI"\n\t"
V_MOVNTQ ("(%%"XDI")", "%%mm0")
@@ -153,7 +135,7 @@ long dst_pitchw = dst_pitch; // local stor so asm can ref
LEAX" (%%"XBX", %%"XDX"), %%"XSI"\n\t" //"XSI", ["XBX"+"XDX"]
"movq (%%"XSI"), %%mm0\n\t"
// pavgb mm0, qword ptr["XSI"+"XCX"]
- V_PAVGB ("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XSI"+"XCX"], mm2, ShiftMask)
+ V_PAVGB ("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) // qword ptr["XSI"+"XCX"], mm2, ShiftMask)
V_MOVNTQ ("(%%"XDI", %%"XDX")", "%%mm0") // qword ptr["XDI"+"XDX"], mm0)
#endif
// now loop and get the middle qwords
diff --git a/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc b/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc
index c1d2b5b71..1d4750b90 100644
--- a/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc
+++ b/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc
@@ -39,7 +39,7 @@
"psubusb %%mm0, %%mm1\n\t"
"por %%mm1, %%mm3\n\t" // abs(a,m)
- "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(a,m) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(a,m) > Thres else 0
"pxor %%mm4, %%mm4\n\t"
"pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(a,m) < Thres, else 00
"pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(a,m) > Thres, else 00
@@ -55,7 +55,7 @@
"por %%mm1, %%mm0\n\t" // abs(j,n)
"movq %%mm0, %%mm1\n\t"
- "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(j,n) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(j,n) > Thres else 0
"pxor %%mm3, %%mm3\n\t"
"pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(j,n) < Thres, else 00
@@ -83,7 +83,7 @@
"psubusb %%mm0, %%mm1\n\t"
"por %%mm1, %%mm3\n\t" // abs(c,n)
- "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(c,n) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(c,n) > Thres else 0
"pxor %%mm4, %%mm4\n\t"
"pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(c,n) < Thres, else 00
"pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(c,n) > Thres, else 00
@@ -92,14 +92,14 @@
"movq 4(%%"XBX"), %%mm0\n\t" // value k
"movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value m
"movq %%mm0, %%mm2\n\t"
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(k,m)
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(k,m)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm0\n\t"
"psubusb %%mm3, %%mm1\n\t"
"por %%mm1, %%mm0\n\t" // abs(k,m)
"movq %%mm0, %%mm1\n\t"
- "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(k,m) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(k,m) > Thres else 0
"pxor %%mm3, %%mm3\n\t"
"pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(k,m) < Thres, else 00
@@ -128,7 +128,7 @@
"psubusb %%mm0, %%mm1\n\t"
"por %%mm1, %%mm3\n\t" // abs(b,f)
- "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(b,f) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(b,f) > Thres else 0
"pxor %%mm4, %%mm4\n\t"
"pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(b,f) < Thres, else 00
"pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(b,f) > Thres, else 00
@@ -136,14 +136,14 @@
"movq 2(%%"XBX"), %%mm0\n\t" // value c
"movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value d
"movq %%mm0, %%mm2\n\t"
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(c,d)
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(c,d)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm0\n\t"
"psubusb %%mm3, %%mm1\n\t"
"por %%mm1, %%mm0\n\t" // abs(c,d)
"movq %%mm0, %%mm1\n\t"
- "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(c,d) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(c,d) > Thres else 0
"pxor %%mm3, %%mm3\n\t"
"pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(c,d) < Thres, else 00
@@ -171,7 +171,7 @@
"psubusb %%mm0, %%mm1\n\t"
"por %%mm1, %%mm3\n\t" // abs(b,d)
- "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(b,d) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(b,d) > Thres else 0
"pxor %%mm4, %%mm4\n\t"
"pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(b,d) < Thres, else 00
"pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(b,d) > Thres, else 00
@@ -179,14 +179,14 @@
"movq -2(%%"XBX"), %%mm0\n\t" // value a
"movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f
"movq %%mm0, %%mm2\n\t"
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(a,f)
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(a,f)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm0\n\t"
"psubusb %%mm3, %%mm1\n\t"
"por %%mm1, %%mm0\n\t" // abs(a,f)
"movq %%mm0, %%mm1\n\t"
- "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(a,f) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(a,f) > Thres else 0
"pxor %%mm3, %%mm3\n\t"
"pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(a,f) < Thres, else 00
@@ -205,22 +205,22 @@
"por %%mm2, %%mm6\n\t"
"por %%mm0, %%mm7\n\t"
- "pand "_YMask", %%mm5\n\t" // mask out chroma from here
- "pand "_YMask", %%mm6\n\t" // mask out chroma from here
- "pand "_YMask", %%mm7\n\t" // mask out chroma from here
+ "pand "MANGLE(YMask)", %%mm5\n\t" // mask out chroma from here
+ "pand "MANGLE(YMask)", %%mm6\n\t" // mask out chroma from here
+ "pand "MANGLE(YMask)", %%mm7\n\t" // mask out chroma from here
// b,e
"movq (%%"XBX"), %%mm0\n\t" // value b from top
"movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom
"movq %%mm0, %%mm2\n\t"
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e)
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm0\n\t"
"psubusb %%mm3, %%mm1\n\t"
"por %%mm1, %%mm0\n\t" // abs(b,e)
"movq %%mm0, %%mm1\n\t"
- "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(b,e) > Thres else 0
+ "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(b,e) > Thres else 0
"pxor %%mm3, %%mm3\n\t"
"pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(b,e) < Thres, else 00
@@ -271,7 +271,7 @@
"por %%mm2, %%mm3\n\t" // abs diff
// pmaxub %%mm3, %%mm4 // top or bottom pixel moved most
V_PMAXUB ("%%mm3", "%%mm4") // top or bottom pixel moved most
- "psubusb "_DiffThres", %%mm3\n\t" // moved more than allowed? or goes to 0?
+ "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // moved more than allowed? or goes to 0?
"pxor %%mm4, %%mm4\n\t"
"pcmpeqb %%mm4, %%mm3\n\t" // now ff where low motion, else high motion
@@ -283,19 +283,19 @@
V_PMAXUB ("%%mm6", "%%mm2")
"psubusb %%mm3, %%mm2\n\t" // maybe decrease it to 0000.. if no surround motion
- "movq %%mm2, "_Min_Vals"\n\t"
+ "movq %%mm2, "MANGLE(Min_Vals)"\n\t"
"movq %%mm0, %%mm2\n\t"
V_PMAXUB ("%%mm2", "%%mm1")
// pminub %%mm6, %%mm2 // clip our current results so far to be below this
V_PMINUB ("%%mm6", "%%mm2", "%%mm4")
"paddusb %%mm3, %%mm2\n\t" // maybe increase it to ffffff if no surround motion
- "movq %%mm2, "_Max_Vals"\n\t"
+ "movq %%mm2, "MANGLE(Max_Vals)"\n\t"
#endif
"movq %%mm0, %%mm2\n\t"
// pavgb %%mm2, %%mm1 // avg(b,e)
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e)
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm3\n\t"
diff --git a/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc b/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc
index 4a223138b..80f96b7bd 100644
--- a/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc
+++ b/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc
@@ -21,6 +21,22 @@
// See www.eff.org for details
/////////////////////////////////////////////////////////////////////////////
+#include <mangle.h>
+
+#if !defined(MASKS_DEFINED)
+#define MASKS_DEFINED
+static const int64_t __attribute__((__used__)) Max_Mov = 0x0404040404040404ull;
+static const int64_t __attribute__((__used__)) DiffThres = 0x0f0f0f0f0f0f0f0full;
+static const int64_t __attribute__((__used__)) YMask = 0x00ff00ff00ff00ffull; // keeps only luma
+static const int64_t __attribute__((__used__)) UVMask = 0xff00ff00ff00ff00ull; // keeps only chroma
+static const int64_t __attribute__((__used__)) TENS = 0x0a0a0a0a0a0a0a0aull;
+static const int64_t __attribute__((__used__)) FOURS = 0x0404040404040404ull;
+static const int64_t __attribute__((__used__)) ONES = 0x0101010101010101ull;
+static const int64_t __attribute__((__used__)) ShiftMask = 0xfefffefffefffeffull;
+static int64_t Min_Vals = 0x0000000000000000ull;
+static int64_t Max_Vals = 0x0000000000000000ull;
+#endif
+
#ifndef TopFirst
#define TopFirst IsOdd
#endif
diff --git a/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc b/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc
index b6a8e615f..b5d052714 100644
--- a/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc
+++ b/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc
@@ -18,7 +18,7 @@
"movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right
"movq %%mm0, %%mm6\n\t"
// pavgb %%mm6, %%mm1 // avg(a,f), also best so far
- V_PAVGB ("%%mm6", "%%mm1", "%%mm7", _ShiftMask) // avg(a,f), also best so far
+ V_PAVGB ("%%mm6", "%%mm1", "%%mm7", MANGLE(ShiftMask)) // avg(a,f), also best so far
"movq %%mm0, %%mm7\n\t"
"psubusb %%mm1, %%mm7\n\t"
"psubusb %%mm0, %%mm1\n\t"
@@ -29,7 +29,7 @@
"movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right
"movq %%mm0, %%mm2\n\t"
// pavgb %%mm2, %%mm1 // avg(c,d)
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(c,d)
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(c,d)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm3\n\t"
"psubusb %%mm0, %%mm1\n\t"
@@ -49,15 +49,15 @@
"por %%mm2, %%mm6\n\t" // and merge new & old vals keeping best
"por %%mm1, %%mm7\n\t"
- "por "_UVMask", %%mm7\n\t" // but we know chroma is worthless so far
- "pand "_YMask", %%mm5\n\t" // mask out chroma from here also
+ "por "MANGLE(UVMask)", %%mm7\n\t" // but we know chroma is worthless so far
+ "pand "MANGLE(YMask)", %%mm5\n\t" // mask out chroma from here also
// j,n
"movq -4(%%"XBX"), %%mm0\n\t" // value j from top left
"movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom right
"movq %%mm0, %%mm2\n\t"
// pavgb %%mm2, %%mm1 // avg(j,n)
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(j,n)
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(j,n)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm3\n\t"
"psubusb %%mm0, %%mm1\n\t"
@@ -83,7 +83,7 @@
"movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom left
"movq %%mm0, %%mm4\n\t"
// pavgb %%mm4, %%mm1 // avg(k,m)
- V_PAVGB ("%%mm4", "%%mm1", "%%mm3", _ShiftMask) // avg(k,m)
+ V_PAVGB ("%%mm4", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(k,m)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm3\n\t"
@@ -140,7 +140,7 @@
"por %%mm2, %%mm3\n\t" // abs diff
// pmaxub %%mm3, %%mm4 // top or bottom pixel moved most
V_PMAXUB ("%%mm3", "%%mm4") // top or bottom pixel moved most
- "psubusb "_Max_Mov", %%mm3\n\t" // moved more than allowed? or goes to 0?
+ "psubusb "MANGLE(Max_Mov)", %%mm3\n\t" // moved more than allowed? or goes to 0?
"pxor %%mm4, %%mm4\n\t"
"pcmpeqb %%mm4, %%mm3\n\t" // now ff where low motion, else high motion
@@ -152,19 +152,19 @@
V_PMAXUB ("%%mm6", "%%mm2")
"psubusb %%mm3, %%mm2\n\t" // maybe decrease it to 0000.. if no surround motion
- "movq %%mm2, "_Min_Vals"\n\t"
+ "movq %%mm2, "MANGLE(Min_Vals)"\n\t"
"movq %%mm0, %%mm2\n\t"
V_PMAXUB ("%%mm2", "%%mm1")
// pminub %%mm6, %%mm2 // clip our current results so far to be below this
V_PMINUB ("%%mm6", "%%mm2", "%%mm4")
"paddusb %%mm3, %%mm2\n\t" // maybe increase it to ffffff if no surround motion
- "movq %%mm2, "_Max_Vals"\n\t"
+ "movq %%mm2, "MANGLE(Max_Vals)"\n\t"
#endif
"movq %%mm0, %%mm2\n\t"
// pavgb %%mm2, %%mm1 // avg(b,e)
- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e)
+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e)
"movq %%mm0, %%mm3\n\t"
"psubusb %%mm1, %%mm3\n\t"
diff --git a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h
index e8e57cac5..574d64842 100644
--- a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h
+++ b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h
@@ -113,7 +113,7 @@
"por %%xmm0, %%xmm5\n\t" /* and merge new & old vals */ \
"por %%xmm2, %%xmm7\n\t"
-#define RESET_CHROMA "por "_UVMask", %%xmm7\n\t"
+#define RESET_CHROMA "por "MANGLE(UVMask)", %%xmm7\n\t"
#else // ifdef IS_SSE2
@@ -125,7 +125,7 @@
"psubusb %%mm1, %%mm2\n\t" \
"psubusb %%mm0, %%mm3\n\t" \
"por %%mm3, %%mm2\n\t" \
- V_PAVGB ("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \
+ V_PAVGB ("%%mm0", "%%mm1", "%%mm3", MANGLE(ShiftMask)) /* avg of 2 pixels */ \
"movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \
"pxor %%mm1, %%mm1\n\t" \
"psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \
@@ -143,14 +143,14 @@
"movq "PADDR2A", %%mm1\n\t" /* our pixel2 value */ \
"movq "PADDR1B", %%mm2\n\t" /* our 4 pixels */ \
"movq "PADDR2B", %%mm3\n\t" /* our pixel2 value */ \
- V_PAVGB("%%mm0", "%%mm2", "%%mm2", _ShiftMask) \
- V_PAVGB("%%mm1", "%%mm3", "%%mm3", _ShiftMask) \
+ V_PAVGB("%%mm0", "%%mm2", "%%mm2", MANGLE(ShiftMask)) \
+ V_PAVGB("%%mm1", "%%mm3", "%%mm3", MANGLE(ShiftMask)) \
"movq %%mm0, %%mm2\n\t" /* another copy of our pixel1 value */ \
"movq %%mm1, %%mm3\n\t" /* another copy of our pixel1 value */ \
"psubusb %%mm1, %%mm2\n\t" \
"psubusb %%mm0, %%mm3\n\t" \
"por %%mm3, %%mm2\n\t" \
- V_PAVGB("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \
+ V_PAVGB("%%mm0", "%%mm1", "%%mm3", MANGLE(ShiftMask)) /* avg of 2 pixels */ \
"movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \
"pxor %%mm1, %%mm1\n\t" \
"psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \
@@ -163,7 +163,7 @@
"por %%mm0, %%mm5\n\t" /* and merge new & old vals */ \
"por %%mm2, %%mm7\n\t"
-#define RESET_CHROMA "por "_UVMask", %%mm7\n\t"
+#define RESET_CHROMA "por "MANGLE(UVMask)", %%mm7\n\t"
#endif
diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c
index 4582ca833..659947e3f 100644
--- a/src/post/deinterlace/xine_plugin.c
+++ b/src/post/deinterlace/xine_plugin.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_plugin.c,v 1.43 2005/06/03 16:58:24 miguelfreitas Exp $
+ * $Id: xine_plugin.c,v 1.44 2005/06/05 16:00:06 miguelfreitas Exp $
*
* advanced video deinterlacer plugin
* Jun/2003 by Miguel Freitas
@@ -315,7 +315,7 @@ static void *deinterlace_init_plugin(xine_t *xine, void *data)
register_deinterlace_method( double_get_method() );
register_deinterlace_method( vfir_get_method() );
register_deinterlace_method( scalerbob_get_method() );
- /* register_deinterlace_method( dscaler_greedyh_get_method() ); */
+ register_deinterlace_method( dscaler_greedyh_get_method() );
register_deinterlace_method( dscaler_tomsmocomp_get_method() );
filter_deinterlace_methods( config_flags, 5 /*fieldsavailable*/ );