2 * (C) 2006-2012 see Authors.txt
4 * This file is part of MPC-HC.
6 * MPC-HC is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * MPC-HC is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "Rasterizer.h"
31 BYTE T
; // HDMV rule : 0 transparent, 255 opaque (compatible DirectX)
36 class CompositionObject
: Rasterizer
39 short m_object_id_ref
;
41 bool m_object_cropped_flag
;
42 bool m_forced_on_flag
;
43 BYTE m_version_number
;
45 short m_horizontal_position
;
46 short m_vertical_position
;
50 short m_cropping_horizontal_position
;
51 short m_cropping_vertical_position
;
52 short m_cropping_width
;
53 short m_cropping_height
;
58 void SetRLEData(const BYTE
* pBuffer
, int nSize
, int nTotalSize
);
59 void AppendRLEData(const BYTE
* pBuffer
, int nSize
);
60 const BYTE
* GetRLEData() { return m_pRLEData
; };
61 int GetRLEDataSize() { return m_nRLEDataSize
; };
62 bool IsRLEComplete() { return m_nRLEPos
>= m_nRLEDataSize
; };
63 void RenderHdmv(SubPicDesc
& spd
);
64 void RenderDvb(SubPicDesc
& spd
, short nX
, short nY
);
65 void WriteSeg(SubPicDesc
& spd
, short nX
, short nY
, short nCount
, short nPaletteIndex
);
66 void InitColor(const SubPicDesc
& spd
);
67 void SetPalette(int nNbEntry
, HDMV_PALETTE
* pPalette
, bool bIsHD
);
68 void SetPalette(int nNbEntry
, DWORD
* dwColors
);
70 return !m_Palette
.IsEmpty();
78 CAtlArray
<HDMV_PALETTE
> m_Palette
;
86 ColorType m_OriginalColorType
;
91 void DvbRenderField(SubPicDesc
& spd
, CGolombBuffer
& gb
, short nXStart
, short nYStart
, short nLength
);
92 void Dvb2PixelsCodeString(SubPicDesc
& spd
, CGolombBuffer
& gb
, short& nX
, short& nY
);
93 void Dvb4PixelsCodeString(SubPicDesc
& spd
, CGolombBuffer
& gb
, short& nX
, short& nY
);
94 void Dvb8PixelsCodeString(SubPicDesc
& spd
, CGolombBuffer
& gb
, short& nX
, short& nY
);