OSDN Git Service

Redo the filters based on assumptions discussed in mingw-dvlpr list.
[mingw/mingw-org-wsl.git] / include / vmr9.h
1 /**
2  * @file vmr9.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _VMR9_H
25 #define _VMR9_H
26 #pragma GCC system_header
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 /*--- DirectShow Reference - DirectShow Enumerated Types */
33 typedef enum _VMR9_SampleFormat {
34         VMR9_SampleReserved = 1,
35         VMR9_SampleProgressiveFrame = 2,
36         VMR9_SampleFieldInterleavedEvenFirst = 3,
37         VMR9_SampleFieldInterleavedOddFirst = 4,
38         VMR9_SampleFieldSingleEven = 5,
39         VMR9_SampleFieldSingleOdd = 6
40 } VMR9_SampleFormat;
41 typedef enum {
42         VMR9AlphaBitmap_Disable = 0x00000001,
43         VMR9AlphaBitmap_hDC = 0x00000002,
44         VMR9AlphaBitmap_EntireDDS = 0x00000004,
45         VMR9AlphaBitmap_SrcColorKey = 0x00000008,
46         VMR9AlphaBitmap_SrcRect = 0x00000010,
47         VMR9AlphaBitmap_FilterMode = 0x00000020
48 } VMR9AlphaBitmapFlags;
49 typedef enum {
50         VMR9ARMode_None,
51         VMR9ARMode_LetterBox
52 } VMR9AspectRatioMode;
53 typedef enum {
54         DeinterlacePref9_NextBest = 0x01,
55         DeinterlacePref9_BOB = 0x02,
56         DeinterlacePref9_Weave = 0x04,
57         DeinterlacePref9_Mask = 0x07
58 } VMR9DeinterlacePrefs;
59 typedef enum {
60         DeinterlaceTech9_Unknown = 0x0000,
61         DeinterlaceTech9_BOBLineReplicate = 0x0001,
62         DeinterlaceTech9_BOBVerticalStretch = 0x0002,
63         DeinterlaceTech9_MedianFiltering = 0x0004,
64         DeinterlaceTech9_EdgeFiltering = 0x0010,
65         DeinterlaceTech9_FieldAdaptive = 0x0020,
66         DeinterlaceTech9_PixelAdaptive = 0x0040,
67         DeinterlaceTech9_MotionVectorSteered = 0x0080
68 } VMR9DeinterlaceTech;
69 typedef enum {
70         MixerPref9_NoDecimation = 0x00000001,
71         MixerPref9_DecimateOutput = 0x00000002,
72         MixerPref9_ARAdjustXorY = 0x00000004,
73         MixerPref9_NonSquareMixing = 0x00000008,
74         MixerPref9_DecimateMask = 0x0000000F,
75         MixerPref9_BiLinearFiltering = 0x00000010,
76         MixerPref9_PointFiltering = 0x00000020,
77         MixerPref9_AnisotropicFiltering = 0x00000040,
78         MixerPref9_PyramidalQuadFiltering = 0x00000080,
79         MixerPref9_GaussianQuadFiltering = 0x00000100,
80         MixerPref9_FilteringReserved = 0x00000E00,
81         MixerPref9_FilteringMask = 0x00000FF0,
82         MixerPref9_RenderTargetRGB = 0x00001000,
83         MixerPref9_RenderTargetYUV = 0x00002000,
84         MixerPref9_RenderTargetReserved = 0x000FC000,
85         MixerPref9_RenderTargetMask = 0x000FF000
86         MixerPref9_DynamicSwitchToBOB = 0x00100000,
87         MixerPref9_DynamicDecimateBy2 = 0x00200000,
88         MixerPref9_DynamicReserved = 0x00C00000,
89         MixerPref9_DynamicMask = 0x00F00000
90 } VMR9MixerPrefs;
91 typedef enum VMR9Mode {
92         VMR9Mode_Windowed = 0x00000001,
93         VMR9Mode_Windowless = 0x00000002,
94         VMR9Mode_Renderless = 0x00000004,
95         VMR9Mode_Mask = 0x00000007
96 };
97 typedef enum {
98         VMR9Sample_SyncPoint = 0x00000001,
99         VMR9Sample_Preroll = 0x00000002,
100         VMR9Sample_Discontinuity = 0x00000004,
101         VMR9Sample_TimeValid = 0x00000008
102 } VMR9PresentationFlags;
103 typedef enum {
104         ProcAmpControl9_Brightness = 0x00000001,
105         ProcAmpControl9_Contrast = 0x00000002,
106         ProcAmpControl9_Hue = 0x00000004,
107         ProcAmpControl9_Saturation = 0x00000008,
108         ProcAmpControl9_Mask = 0x0000000F
109 } VMR9ProcAmpControlFlags;
110 typedef enum VMR9RenderPrefs {
111         RenderPrefs9_DoNotRenderBorder = 0x00000001,
112         RenderPrefs9_Mask = 0x00000001
113 };
114 typedef enum {
115         VMR9AllocFlag_3DRenderTarget = 0x0001,
116         VMR9AllocFlag_DXVATarget = 0x0002,
117         VMR9AllocFlag_TextureSurface = 0x0004,
118         VMR9AllocFlag_OffscreenSurface = 0x0008,
119         VMR9AllocFlag_UsageReserved = 0x00F0,
120         VMR9AllocFlag_UsageMask = 0x00FF
121 } VMR9SurfaceAllocationFlags;
122 /*--- DirectShow Reference - DirectShow Structures */
123 /**********
124 typedef struct VMR9AllocationInfo{
125         DWORD dwFlags;
126         DWORD dwWidth;
127         DWORD dwHeight;
128         D3DFORMAT Format;
129         D3DPOOL Pool;
130         DWORD MinBuffers;
131         SIZE szAspectRatio;
132         SIZE szNativeSize;
133 };
134 **********/
135 typedef struct _VMR9DeinterlaceCaps {
136         DWORD dwSize;
137         DWORD dwNumPreviousOutputFrames;
138         DWORD dwNumForwardRefSamples;
139         DWORD dwNumBackwardRefSamples;
140         VMRDeinterlaceTech DeinterlaceTechnology;
141 } VMR9DeinterlaceCaps;
142 typedef struct _VMR9Frequency {
143         DWORD dwNumerator;
144         DWORD dwDenominator;
145 } VMR9Frequency;
146 typedef struct {
147         UINT uDevID;
148         RECT rcMonitor;
149         HMONITOR hMon;
150         DWORD dwFlags;
151         wchar_t szDevice[32];
152         wchar_t szDescription[512]
153         LARGE_INTEGER liDriverVersion;
154         DWORD dwVendorId;
155         DWORD dwDeviceId;
156         DWORD dwSubSysId;
157         DWORD dwRevision;
158 } VMR9MonitorInfo;
159 typedef struct VMR9NormalizedRect{
160         float left;
161         float top;
162         float right;
163         float bottom;
164 };
165 /**********
166 typedef struct {
167         DWORD dwFlags;
168         IDirect3DSurface9 *lpSurf;
169         REFERENCE_TIME rtStart;
170         REFERENCE_TIME rtEnd;
171         SIZE szAspectRatio;
172         RECT rcSrc;
173         RECT rcDst;
174         DWORD dwReserved1;
175         DWORD dwReserved2;
176 } VMR9PresentationInfo;
177 **********/
178 typedef struct _VMR9ProcAmpControl
179 {
180         DWORD dwSize;
181         DWORD dwFlags;
182         float Contrast;
183         float Brightness;
184         float Hue;
185         float Saturation;
186 } VMR9ProcAmpControl;
187 typedef struct _VMR9ProcAmpControlRange
188 {
189         DWORD dwSize;
190         VMR9ProcAmpControlFlags dwProperty;
191         float MinValue;
192         float MaxValue;
193         float DefaultValue;
194         float StepSize;
195 } VMR9ProcAmpControlRange;
196 typedef struct _VMR9VideoDesc {
197         DWORD dwSize;
198         DWORD dwSampleWidth;
199         DWORD dwSampleHeight;
200         VMR9_SampleFormat SampleFormat;
201         DWORD dwFourCC;
202         VMR9Frequency InputSampleFreq;
203         VMR9Frequency OutputFrameFreq;
204 } VMR9VideoDesc;
205 /**********
206 typedef struct VMR9VideoStreamInfo{
207         IDirect3DSurface9 *pddsVideoSurface;
208         DWORD dwWidth;
209         DWORD dwHeight;
210         DWORD dwStrmID;
211         FLOAT fAlpha;
212         VMR9NormalizedRect rNormal;
213         REFERENCE_TIME rtStart;
214         REFERENCE_TIME rtEnd;
215         VMR9_SampleFormat SampleFormat;
216 };
217 typedef struct VMR9AlphaBitmap{
218         DWORD dwFlags;
219         HDC hdc;
220         IDirect3DSurface9 *pDDS;
221         RECT rSrc;
222         VMR9NormalizedRect rDest;
223         FLOAT fAlpha;
224         COLORREF clrSrcKey;
225         DWORD dwFilterMode;
226 };
227 **********/
228
229 #ifdef __cplusplus
230 }
231 #endif
232 #endif