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:
authorAleksoid <aleksoid@users.sourceforge.net>2008-07-29 09:09:35 +0400
committerAleksoid <aleksoid@users.sourceforge.net>2008-07-29 09:09:35 +0400
commitba1d37d8b80dfc5d25dc2cd574973b0fd82f36fd (patch)
treece03b615e26b336b87d39cb5141dc963707a7fbd /src/subtitles/Rasterizer.cpp
parentd1f8f883dcce08cfa245f820238f474bc6f9bb9b (diff)
another change (Subtitle engine) for x64 version. Thanks to drevil_xxl.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@703 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/Rasterizer.cpp')
-rw-r--r--src/subtitles/Rasterizer.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/subtitles/Rasterizer.cpp b/src/subtitles/Rasterizer.cpp
index 3942b08a0..c47afb5c3 100644
--- a/src/subtitles/Rasterizer.cpp
+++ b/src/subtitles/Rasterizer.cpp
@@ -896,8 +896,6 @@ static __forceinline void pixmix2_sse2(DWORD* dst, DWORD color, DWORD shapealpha
*dst = (DWORD)_mm_cvtsi128_si32(r);
}
-#ifndef WIN64
-
#include <mmintrin.h>
// Calculate a - b clamping to 0 instead of underflowing
@@ -910,7 +908,6 @@ static __forceinline DWORD safe_subtract(DWORD a, DWORD b)
_mm_empty();
return r;
}
-#endif
// For CPUID usage in Rasterizer::Draw
#include "../dsutil/vd.h"
@@ -1016,18 +1013,10 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
// subtraction must be saturating since the widened region
// pixel value can be smaller than the fill value.
// This happens when blur edges is used.
-#ifdef WIN64
- pixmix_sse2(&dst[wt], color, (src[wt*2+1] - src[wt*2])<<6);
-#else
pixmix_sse2(&dst[wt], color, safe_subtract(src[wt*2+1], src[wt*2]));
-#endif
else
for(int wt=0; wt<w; ++wt)
-#ifdef WIN64
- pixmix(&dst[wt], color, (src[wt*2+1] - src[wt*2])<<6);
-#else
pixmix(&dst[wt], color, safe_subtract(src[wt*2+1], src[wt*2]));
-#endif
}
}
// not (switchpts[1] == 0xffffffff)
@@ -1061,22 +1050,13 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
for(int wt=0; wt<w; ++wt)
{
if(wt+xo >= sw[1]) {while(wt+xo >= sw[1]) sw += 2; color = sw[-2];}
-#ifdef WIN64
- pixmix_sse2(&dst[wt], color, (src[wt*2+1] - src[wt*2])<<6);
-#else
pixmix_sse2(&dst[wt], color, safe_subtract(src[wt*2+1], src[wt*2]));
-#endif
-
}
else
for(int wt=0; wt<w; ++wt)
{
if(wt+xo >= sw[1]) {while(wt+xo >= sw[1]) sw += 2; color = sw[-2];}
-#ifdef WIN64
- pixmix(&dst[wt], color, (src[wt*2+1] - src[wt*2])<<6);
-#else
pixmix(&dst[wt], color, safe_subtract(src[wt*2+1], src[wt*2]));
-#endif
}
}
}
@@ -1104,18 +1084,10 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
{
if(fSSE2)
for(int wt=0; wt<w; ++wt)
-#ifdef WIN64
- pixmix_sse2(&dst[wt], color, (src[wt*2+1] - src[wt*2]) * am[wt]);
-#else
pixmix2_sse2(&dst[wt], color, safe_subtract(src[wt*2+1], src[wt*2]), am[wt]);
-#endif
else
for(int wt=0; wt<w; ++wt)
-#ifdef WIN64
- pixmix(&dst[wt], color, (src[wt*2+1] - src[wt*2]) * am[wt]);
-#else
pixmix2(&dst[wt], color, safe_subtract(src[wt*2+1], src[wt*2]), am[wt]);
-#endif
}
}
else
@@ -1152,11 +1124,7 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
while(wt+xo >= sw[1])
sw += 2; color = sw[-2];
}
-#ifdef WIN64
- pixmix_sse2(&dst[wt], color, (src[wt*2+1] - src[wt*2]) * am[wt]);
-#else
pixmix2_sse2(&dst[wt], color, safe_subtract(src[wt*2+1], src[wt*2]), am[wt]);
-#endif
}
else
for(int wt=0; wt<w; ++wt)
@@ -1165,11 +1133,7 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x
while(wt+xo >= sw[1])
sw += 2; color = sw[-2];
}
-#ifdef WIN64
- pixmix(&dst[wt], color, (src[wt*2+1] - src[wt*2]) * am[wt]);
-#else
pixmix2(&dst[wt], color, safe_subtract(src[wt*2+1], src[wt*2]), am[wt]);
-#endif
}
}
}
@@ -1184,9 +1148,7 @@ 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 WIN64
_mm_empty();
-#endif
return bbox;
}