diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-08-23 22:08:51 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-08-23 22:08:51 +0400 |
commit | 4b87d1475576305cad034bc7e8079d8eab1ed6a9 (patch) | |
tree | d002d4dc736d8492943e0072143888b892f48e0a /src/subtitles/HdmvSub.h | |
parent | cbc6407400cce9b28b5a1a09669492da5c4b3615 (diff) |
Fix : incorrect palette management in PGS
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@752 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/HdmvSub.h')
-rw-r--r-- | src/subtitles/HdmvSub.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/subtitles/HdmvSub.h b/src/subtitles/HdmvSub.h index b74209862..d9a5d535f 100644 --- a/src/subtitles/HdmvSub.h +++ b/src/subtitles/HdmvSub.h @@ -66,6 +66,15 @@ public: BYTE bReserved : 8;
};
+ struct HDMV_PALETTE
+ {
+ BYTE entry_id;
+ BYTE Y;
+ BYTE Cr;
+ BYTE Cb;
+ BYTE T;
+ };
+
class CompositionObject : Rasterizer
{
public :
@@ -97,8 +106,7 @@ public: bool IsRLEUncomplete() { return m_nRLEPos != 0; };
void Render(SubPicDesc& spd);
void WriteSeg (SubPicDesc& spd, SHORT nX, SHORT nY, SHORT nCount, SHORT nPaletteIndex);
- void SetColors (int nColorNumber, long* pColors);
- long GetColor(int nIndex);
+ void SetPalette (int nNbEntry, HDMV_PALETTE* pPalette);
private :
CHdmvSub* m_pSub;
@@ -106,16 +114,7 @@ public: int m_nRLEDataSize;
int m_nRLEPos;
int m_nColorNumber;
- long* m_pColors;
- };
-
- struct HDMV_PALETTE
- {
- BYTE entry_id;
- BYTE Y;
- BYTE Cr;
- BYTE Cb;
- BYTE T;
+ long m_Colors[256];
};
CHdmvSub();
@@ -158,7 +157,6 @@ private : CAtlList<CompositionObject*> m_pObjects;
int m_nColorNumber;
- long* m_pColors;
int ParsePresentationSegment(CGolombBuffer* pGBuffer);
@@ -170,7 +168,6 @@ private : void ParseCompositionObject(CGolombBuffer* pGBuffer, CompositionObject* pCompositionObject);
void AllocSegment(int nSize);
- void WriteSeg (SubPicDesc& spd, SHORT nX, SHORT nY, SHORT nCount, SHORT nPaletteIndex);
CompositionObject* FindObject(REFERENCE_TIME rt);
};
|