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:
authorCasimir666 <casimir666@users.sourceforge.net>2008-08-24 18:17:18 +0400
committerCasimir666 <casimir666@users.sourceforge.net>2008-08-24 18:17:18 +0400
commit86abba5bc0b4e11513834dae2a3fb4bcdfe88d6c (patch)
tree78a540e6e7e14204c97bae67505d2c462e335181 /src/subtitles/Rasterizer.cpp
parent4b87d1475576305cad034bc7e8079d8eab1ed6a9 (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.cpp18
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