Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2010-02-14 15:03:03 +0300
committerXhmikosR <xhmikosr@users.sourceforge.net>2010-02-14 15:03:03 +0300
commit7e956bb14bc7ee5499727fea101f91a3085d19ea (patch)
tree976d074f96f84550872ccea768630fa5f1204f00 /src/subtitles/Rasterizer.cpp
parent32d37e042950fe13c11bb2a01e225c5ce993c4d9 (diff)
-DSUtil.h: Removed linker pragma inclusion of fixed-name DSUtil.lib files to allow for more flexible project file management
-Rasterizer.cpp: Don't use MMX intrinsics in 64 bit builds -SeparableFilter.h: Fix line order for OpenMP building Patch by nielsm git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1658 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/Rasterizer.cpp')
-rw-r--r--src/subtitles/Rasterizer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/subtitles/Rasterizer.cpp b/src/subtitles/Rasterizer.cpp
index 934a9d012..7038b054d 100644
--- a/src/subtitles/Rasterizer.cpp
+++ b/src/subtitles/Rasterizer.cpp
@@ -901,13 +901,17 @@ static __forceinline void pixmix2_sse2(DWORD* dst, DWORD color, DWORD shapealpha
// Calculate a - b clamping to 0 instead of underflowing
static __forceinline DWORD safe_subtract(DWORD a, DWORD b)
{
+#ifndef _M_X64
__m64 ap = _mm_cvtsi32_si64(a);
__m64 bp = _mm_cvtsi32_si64(b);
__m64 rp = _mm_subs_pu16(ap, bp);
DWORD r = (DWORD)_mm_cvtsi64_si32(rp);
_mm_empty();
return r;
- //return (b > a) ? 0 : a - b;
+#else
+ // For whatever reason Microsoft's x64 compiler doesn't support MMX intrinsics
+ return (b > a) ? 0 : a - b;
+#endif
}
// For CPUID usage in Rasterizer::Draw
@@ -1149,7 +1153,9 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
// Remember to EMMS!
// Rendering fails in funny ways if we don't do this.
+#ifndef _M_X64
_mm_empty();
+#endif
return bbox;
}