diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-08-24 18:17:18 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-08-24 18:17:18 +0400 |
commit | 86abba5bc0b4e11513834dae2a3fb4bcdfe88d6c (patch) | |
tree | 78a540e6e7e14204c97bae67505d2c462e335181 /src/subtitles/Rasterizer.cpp | |
parent | 4b87d1475576305cad034bc7e8079d8eab1ed6a9 (diff) |
NEW : Support for M2TS presentation graphics streams (subtitles)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@753 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/Rasterizer.cpp')
-rw-r--r-- | src/subtitles/Rasterizer.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/subtitles/Rasterizer.cpp b/src/subtitles/Rasterizer.cpp index c47afb5c3..930d07fd6 100644 --- a/src/subtitles/Rasterizer.cpp +++ b/src/subtitles/Rasterizer.cpp @@ -1152,3 +1152,21 @@ CRect Rasterizer::Draw(SubPicDesc& spd, CRect& clipRect, byte* pAlphaMask, int x return bbox;
}
+
+
+void Rasterizer::FillSolidRect(SubPicDesc& spd, int x, int y, int nWidth, int nHeight, long lColor, long lAlpha)
+{
+ 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, lAlpha);
+ else
+ for(int wt=0; wt<nWidth; ++wt)
+ pixmix(&dst[wt], lColor, lAlpha);
+ }
+}
\ No newline at end of file |