diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2009-04-05 17:20:55 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2009-04-05 17:20:55 +0400 |
commit | 86ab27059def62214b283a6c65757556a5bd36a6 (patch) | |
tree | 21fcd003885cdd26169a3c4eb44c3ac586d04058 /src/subtitles/HdmvSub.cpp | |
parent | 7b4e3979033ade0ed237cd3966464061ee8039da (diff) |
Fixed : invalid color with some PGS subtitles
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1039 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/HdmvSub.cpp')
-rw-r--r-- | src/subtitles/HdmvSub.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/subtitles/HdmvSub.cpp b/src/subtitles/HdmvSub.cpp index c3aaf7422..ac91263e6 100644 --- a/src/subtitles/HdmvSub.cpp +++ b/src/subtitles/HdmvSub.cpp @@ -381,7 +381,7 @@ CHdmvSub::CompositionObject::CompositionObject() m_nRLEDataSize = 0;
m_nRLEPos = 0;
m_nColorNumber = 0;
- memset (m_Colors, 0, sizeof(m_Colors));
+ memsetd (m_Colors, 0xFF000000, sizeof(m_Colors));
}
CHdmvSub::CompositionObject::~CompositionObject()
@@ -396,11 +396,9 @@ void CHdmvSub::CompositionObject::SetPalette (int nNbEntry, HDMV_PALETTE* pPalet for (int i=0; i<m_nColorNumber; i++)
{
if (bIsHD)
- m_Colors[pPalette[i].entry_id] = pPalette[i].T<<24|
- YCrCbToRGB_Rec709 (pPalette[i].Y, pPalette[i].Cr, pPalette[i].Cb);
+ m_Colors[pPalette[i].entry_id] = YCrCbToRGB_Rec709 (255-pPalette[i].T, pPalette[i].Y, pPalette[i].Cr, pPalette[i].Cb);
else
- m_Colors[pPalette[i].entry_id] = pPalette[i].T<<24|
- YCrCbToRGB_Rec601 (pPalette[i].Y, pPalette[i].Cr, pPalette[i].Cb);
+ m_Colors[pPalette[i].entry_id] = YCrCbToRGB_Rec601 (255-pPalette[i].T, pPalette[i].Y, pPalette[i].Cr, pPalette[i].Cb);
// TRACE_HDMVSUB ("%03d : %08x\n", pPalette[i].entry_id, m_Colors[pPalette[i].entry_id]);
}
}
@@ -482,7 +480,7 @@ void CHdmvSub::CompositionObject::Render(SubPicDesc& spd) if (nCount>0)
{
- FillSolidRect (spd, nX, nY, nCount, 1, m_Colors[nPaletteIndex], 0xFFFFFFFF);
+ FillSolidRect (spd, nX, nY, nCount, 1, m_Colors[nPaletteIndex]);
nX += nCount;
}
else
|