diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2009-11-11 22:16:30 +0300 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2009-11-11 22:16:30 +0300 |
commit | ac39f6c9f79c7e4e2d0112cb0a53409c9c5087ea (patch) | |
tree | 49e793a53d910b555be7556d1c50e886a498efea /src/subtitles/Rasterizer.cpp | |
parent | 24db6e20e4de08e7b0b2890423b6dca53a7670b6 (diff) |
Added : support for DVB subtitles
Fixed : several issues for HDMV subtitle display (better support for transparent subtitles, memory leak)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1335 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/Rasterizer.cpp')
-rw-r--r-- | src/subtitles/Rasterizer.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/subtitles/Rasterizer.cpp b/src/subtitles/Rasterizer.cpp index fd97f1331..934a9d012 100644 --- a/src/subtitles/Rasterizer.cpp +++ b/src/subtitles/Rasterizer.cpp @@ -1155,6 +1155,7 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x }
+#if 0
void Rasterizer::FillSolidRect(SubPicDesc& spd, int x, int y, int nWidth, int nHeight, DWORD lColor)
{
bool fSSE2 = !!(g_cpuid.m_flags & CCpuID::sse2);
@@ -1167,3 +1168,21 @@ void Rasterizer::FillSolidRect(SubPicDesc& spd, int x, int y, int nWidth, int nH memsetd(dst, lColor, nWidth*4);
}
}
+#else
+void Rasterizer::FillSolidRect(SubPicDesc& spd, int x, int y, int nWidth, int nHeight, DWORD lColor)
+{
+ bool fSSE2 = !!(g_cpuid.m_flags & CCpuID::sse2);
+
+ for (int wy=y; wy<y+nHeight; wy++)
+ {
+ DWORD* dst = (DWORD*)((BYTE*)spd.bits + spd.pitch * wy) + x;
+
+ if(fSSE2)
+ for(int wt=0; wt<nWidth; ++wt)
+ pixmix_sse2(&dst[wt], lColor, 0x40); // 0x40 because >> 6 in pixmix (to preserve tranparency)
+ else
+ for(int wt=0; wt<nWidth; ++wt)
+ pixmix(&dst[wt], lColor, 0x40);
+ }
+}
+#endif
\ No newline at end of file |