Merge MPC-HC code(01b8dbf34d6a486fa1cd02d7a123249fec1e4160) [PART 2] (HdmvSub)
[xy_vsfilter.git] / src / subpic / SimpleSubpicImpl.h
blob52e5c70e70b66ff5053a17382e00e956a6849e04
1 #pragma once
3 #include "ISimpleSubPic.h"
5 struct IXySubRenderFrame;
7 class SimpleSubpic : public CUnknown, public ISimpleSubPic
9 public:
10 SimpleSubpic(IXySubRenderFrame*sub_render_frame, int alpha_blt_dst_type);
11 ~SimpleSubpic();
12 public:
13 DECLARE_IUNKNOWN;
14 STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
16 STDMETHODIMP AlphaBlt(SubPicDesc* target);
17 private:
18 struct Bitmap
20 ULONGLONG id;
21 LPCVOID pixels;
22 POINT pos;
23 SIZE size;
24 int pitch;
25 XyPlannerFormatExtra extra;
27 private:
28 SimpleSubpic(const SimpleSubpic&);
29 void operator=(const SimpleSubpic&)const;
31 HRESULT AlphaBltAnv12_P010( SubPicDesc* target, const Bitmap& src );
32 HRESULT AlphaBltAnv12_Nv12(SubPicDesc* target, const Bitmap& src);
33 HRESULT AlphaBlt(SubPicDesc* target, const Bitmap& src);
34 HRESULT ConvertColorSpace();
35 void SubsampleAndInterlace(int index, Bitmap*bitmap, bool u_first );
36 private:
37 CComPtr<IXySubRenderFrame> m_sub_render_frame;
39 CAtlArray<Bitmap> m_bitmap;
40 CAtlArray<BYTE*> m_buffers;
42 int m_bitmap_count;
43 int m_alpha_blt_dst_type;