diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2009-04-08 22:15:14 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2009-04-08 22:15:14 +0400 |
commit | b797f92a98b164d49c1896507fed394f3531af1c (patch) | |
tree | 3076ace280b724ac2e2b1bcacc8d003ea0ae862e /src/subtitles/HdmvSub.cpp | |
parent | 3752631e87104e9a503a425a9ef7cb16f413733b (diff) |
Fixed : ugly background on PGS subtitles
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1043 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/HdmvSub.cpp')
-rw-r--r-- | src/subtitles/HdmvSub.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/subtitles/HdmvSub.cpp b/src/subtitles/HdmvSub.cpp index ac91263e6..582fdbd3f 100644 --- a/src/subtitles/HdmvSub.cpp +++ b/src/subtitles/HdmvSub.cpp @@ -395,10 +395,13 @@ 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] = YCrCbToRGB_Rec709 (255-pPalette[i].T, pPalette[i].Y, pPalette[i].Cr, pPalette[i].Cb);
- else
- m_Colors[pPalette[i].entry_id] = YCrCbToRGB_Rec601 (255-pPalette[i].T, pPalette[i].Y, pPalette[i].Cr, pPalette[i].Cb);
+ if (pPalette[i].T != 0) // Prevent ugly background when Alpha=0 (but RGB different from 0)
+ {
+ if (bIsHD)
+ 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] = 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]);
}
}
|