1 | /*
|
---|
2 | * Copyright (C) 2023 Oracle and/or its affiliates.
|
---|
3 | *
|
---|
4 | * This file is part of VirtualBox base platform packages, as
|
---|
5 | * available from https://www.alldomusa.eu.org.
|
---|
6 | *
|
---|
7 | * This program is free software; you can redistribute it and/or
|
---|
8 | * modify it under the terms of the GNU General Public License
|
---|
9 | * as published by the Free Software Foundation, in version 3 of the
|
---|
10 | * License.
|
---|
11 | *
|
---|
12 | * This program is distributed in the hope that it will be useful, but
|
---|
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
15 | * General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
19 | *
|
---|
20 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
21 | */
|
---|
22 |
|
---|
23 | #ifndef VBOX_INCLUDED_SRC_Graphics_vmsvga_include_vbsvga3d_dx_h
|
---|
24 | #define VBOX_INCLUDED_SRC_Graphics_vmsvga_include_vbsvga3d_dx_h
|
---|
25 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
26 | # pragma once
|
---|
27 | #endif
|
---|
28 |
|
---|
29 | #include "svga3d_dx.h"
|
---|
30 |
|
---|
31 | typedef uint32 VBSVGA3dVideoProcessorId;
|
---|
32 | typedef uint32 VBSVGA3dVideoDecoderOutputViewId;
|
---|
33 | typedef uint32 VBSVGA3dVideoDecoderId;
|
---|
34 | typedef uint32 VBSVGA3dVideoProcessorInputViewId;
|
---|
35 | typedef uint32 VBSVGA3dVideoProcessorOutputViewId;
|
---|
36 |
|
---|
37 | #define VBSVGA3D_VIDEO_FRAME_FORMAT_PROGRESSIVE 0
|
---|
38 | #define VBSVGA3D_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST 1
|
---|
39 | #define VBSVGA3D_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST 2
|
---|
40 | typedef uint32 VBSVGA3dVideoFrameFormat;
|
---|
41 |
|
---|
42 | #define VBSVGA3D_VIDEO_USAGE_PLAYBACK_NORMAL 0
|
---|
43 | #define VBSVGA3D_VIDEO_USAGE_OPTIMAL_SPEED 1
|
---|
44 | #define VBSVGA3D_VIDEO_USAGE_OPTIMAL_QUALITY 2
|
---|
45 | typedef uint32 VBSVGA3dVideoUsage;
|
---|
46 |
|
---|
47 | #define VBSVGA3D_VP_OUTPUT_RATE_NORMAL 0
|
---|
48 | #define VBSVGA3D_VP_OUTPUT_RATE_HALF 1
|
---|
49 | #define VBSVGA3D_VP_OUTPUT_RATE_CUSTOM 2
|
---|
50 | typedef uint32 VBSVGA3dVideoProcessorOutputRate;
|
---|
51 |
|
---|
52 | #define VBSVGA3D_VDOV_DIMENSION_UNKNOWN 0
|
---|
53 | #define VBSVGA3D_VDOV_DIMENSION_TEXTURE2D 1
|
---|
54 | typedef uint32 VBSVGA3dVDOVDimension;
|
---|
55 |
|
---|
56 | #define VBSVGA3D_VPIV_DIMENSION_UNKNOWN 0
|
---|
57 | #define VBSVGA3D_VPIV_DIMENSION_TEXTURE2D 1
|
---|
58 | typedef uint32 VBSVGA3dVPIVDimension;
|
---|
59 |
|
---|
60 | #define VBSVGA3D_VPOV_DIMENSION_UNKNOWN 0
|
---|
61 | #define VBSVGA3D_VPOV_DIMENSION_TEXTURE2D 1
|
---|
62 | #define VBSVGA3D_VPOV_DIMENSION_TEXTURE2DARRAY 2
|
---|
63 | typedef uint32 VBSVGA3dVPOVDimension;
|
---|
64 |
|
---|
65 | #define VBSVGA3D_VD_BUFFER_PICTURE_PARAMETERS 0
|
---|
66 | #define VBSVGA3D_VD_BUFFER_MACROBLOCK_CONTROL 1
|
---|
67 | #define VBSVGA3D_VD_BUFFER_RESIDUAL_DIFFERENCE 2
|
---|
68 | #define VBSVGA3D_VD_BUFFER_DEBLOCKING_CONTROL 3
|
---|
69 | #define VBSVGA3D_VD_BUFFER_INVERSE_QUANTIZATION_MATRIX 4
|
---|
70 | #define VBSVGA3D_VD_BUFFER_SLICE_CONTROL 5
|
---|
71 | #define VBSVGA3D_VD_BUFFER_BITSTREAM 6
|
---|
72 | #define VBSVGA3D_VD_BUFFER_MOTION_VECTOR 7
|
---|
73 | #define VBSVGA3D_VD_BUFFER_FILM_GRAIN 8
|
---|
74 | typedef uint32 VBSVGA3dVideoDecoderBufferType;
|
---|
75 |
|
---|
76 | #define VBSVGA3D_VP_ALPHA_FILL_MODE_OPAQUE 0
|
---|
77 | #define VBSVGA3D_VP_ALPHA_FILL_MODE_BACKGROUND 1
|
---|
78 | #define VBSVGA3D_VP_ALPHA_FILL_MODE_DESTINATION 2
|
---|
79 | #define VBSVGA3D_VP_ALPHA_FILL_MODE_SOURCE_STREAM 3
|
---|
80 | typedef uint32 VBSVGA3dVideoProcessorAlphaFillMode;
|
---|
81 |
|
---|
82 | #define VBSVGA3D_VP_STEREO_FORMAT_MONO 0
|
---|
83 | #define VBSVGA3D_VP_STEREO_FORMAT_HORIZONTAL 1
|
---|
84 | #define VBSVGA3D_VP_STEREO_FORMAT_VERTICAL 2
|
---|
85 | #define VBSVGA3D_VP_STEREO_FORMAT_SEPARATE 3
|
---|
86 | #define VBSVGA3D_VP_STEREO_FORMAT_MONO_OFFSET 4
|
---|
87 | #define VBSVGA3D_VP_STEREO_FORMAT_ROW_INTERLEAVED 5
|
---|
88 | #define VBSVGA3D_VP_STEREO_FORMAT_COLUMN_INTERLEAVED 6
|
---|
89 | #define VBSVGA3D_VP_STEREO_FORMAT_CHECKERBOARD 7
|
---|
90 | typedef uint32 VBSVGA3dVideoProcessorStereoFormat;
|
---|
91 |
|
---|
92 | #define VBSVGA3D_VP_STEREO_FLIP_NONE 0
|
---|
93 | #define VBSVGA3D_VP_STEREO_FLIP_FRAME0 1
|
---|
94 | #define VBSVGA3D_VP_STEREO_FLIP_FRAME1 2
|
---|
95 | typedef uint32 VBSVGA3dVideoProcessorStereoFlipMode;
|
---|
96 |
|
---|
97 | #define VBSVGA3D_VP_FILTER_BRIGHTNESS 0
|
---|
98 | #define VBSVGA3D_VP_FILTER_CONTRAST 1
|
---|
99 | #define VBSVGA3D_VP_FILTER_HUE 2
|
---|
100 | #define VBSVGA3D_VP_FILTER_SATURATION 3
|
---|
101 | #define VBSVGA3D_VP_FILTER_NOISE_REDUCTION 4
|
---|
102 | #define VBSVGA3D_VP_FILTER_EDGE_ENHANCEMENT 5
|
---|
103 | #define VBSVGA3D_VP_FILTER_ANAMORPHIC_SCALING 6
|
---|
104 | #define VBSVGA3D_VP_FILTER_STEREO_ADJUSTMENT 7
|
---|
105 | typedef uint32 VBSVGA3dVideoProcessorFilter;
|
---|
106 |
|
---|
107 | #define VBSVGA3D_VP_ROTATION_IDENTITY 0
|
---|
108 | #define VBSVGA3D_VP_ROTATION_90 1
|
---|
109 | #define VBSVGA3D_VP_ROTATION_180 2
|
---|
110 | #define VBSVGA3D_VP_ROTATION_270 3
|
---|
111 | typedef uint32 VBSVGA3dVideoProcessorRotation;
|
---|
112 |
|
---|
113 | #define VBSVGA3D_VIDEO_CAPABILITY_DECODE_PROFILE 0
|
---|
114 | #define VBSVGA3D_VIDEO_CAPABILITY_DECODE_CONFIG 1
|
---|
115 | typedef uint32 VBSVGA3dVideoCapability;
|
---|
116 |
|
---|
117 | typedef struct {
|
---|
118 | VBSVGA3dVideoFrameFormat InputFrameFormat;
|
---|
119 | SVGA3dFraction64 InputFrameRate;
|
---|
120 | uint32 InputWidth;
|
---|
121 | uint32 InputHeight;
|
---|
122 | SVGA3dFraction64 OutputFrameRate;
|
---|
123 | uint32 OutputWidth;
|
---|
124 | uint32 OutputHeight;
|
---|
125 | VBSVGA3dVideoUsage Usage;
|
---|
126 | } VBSVGA3dVideoProcessorDesc;
|
---|
127 |
|
---|
128 | typedef struct {
|
---|
129 | VBSVGA3dVideoProcessorDesc desc;
|
---|
130 | uint32 RateConversionCapsIndex;
|
---|
131 | uint32 pad[5];
|
---|
132 | } VBSVGACOTableDXVideoProcessorEntry;
|
---|
133 | AssertCompile(sizeof(VBSVGACOTableDXVideoProcessorEntry) == 16 * 4);
|
---|
134 |
|
---|
135 | typedef struct VBSVGA3dCmdDXDefineVideoProcessor {
|
---|
136 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
137 |
|
---|
138 | VBSVGA3dVideoProcessorDesc desc;
|
---|
139 | uint32 RateConversionCapsIndex;
|
---|
140 | } VBSVGA3dCmdDXDefineVideoProcessor;
|
---|
141 | /* VBSVGA_3D_CMD_DX_DEFINE_VIDEO_PROCESSOR */
|
---|
142 |
|
---|
143 | typedef struct {
|
---|
144 | uint32 data1;
|
---|
145 | uint16 data2;
|
---|
146 | uint16 data3;
|
---|
147 | uint8 data4[8];
|
---|
148 | } VBSVGA3dGuid;
|
---|
149 |
|
---|
150 | typedef struct {
|
---|
151 | VBSVGA3dGuid DecodeProfile;
|
---|
152 | VBSVGA3dVDOVDimension ViewDimension;
|
---|
153 | union {
|
---|
154 | struct {
|
---|
155 | uint32 ArraySlice;
|
---|
156 | } Texture2D;
|
---|
157 | uint32 pad[4];
|
---|
158 | };
|
---|
159 | } VBSVGA3dVDOVDesc;
|
---|
160 |
|
---|
161 | typedef struct {
|
---|
162 | SVGA3dSurfaceId sid;
|
---|
163 | VBSVGA3dVDOVDesc desc;
|
---|
164 | uint32 pad[6];
|
---|
165 | } VBSVGACOTableDXVideoDecoderOutputViewEntry;
|
---|
166 | AssertCompile(sizeof(VBSVGACOTableDXVideoDecoderOutputViewEntry) == 16 * 4);
|
---|
167 |
|
---|
168 | typedef struct VBSVGA3dCmdDXDefineVideoDecoderOutputView {
|
---|
169 | VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId;
|
---|
170 |
|
---|
171 | SVGA3dSurfaceId sid;
|
---|
172 |
|
---|
173 | VBSVGA3dVDOVDesc desc;
|
---|
174 | } VBSVGA3dCmdDXDefineVideoDecoderOutputView;
|
---|
175 | /* VBSVGA_3D_CMD_DX_DEFINE_VIDEO_DECODER_OUTPUT_VIEW */
|
---|
176 |
|
---|
177 | typedef struct {
|
---|
178 | VBSVGA3dGuid DecodeProfile;
|
---|
179 | uint32 SampleWidth;
|
---|
180 | uint32 SampleHeight;
|
---|
181 | SVGA3dSurfaceFormat OutputFormat;
|
---|
182 | } VBSVGA3dVideoDecoderDesc;
|
---|
183 |
|
---|
184 | typedef struct {
|
---|
185 | VBSVGA3dGuid guidConfigBitstreamEncryption;
|
---|
186 | VBSVGA3dGuid guidConfigMBcontrolEncryption;
|
---|
187 | VBSVGA3dGuid guidConfigResidDiffEncryption;
|
---|
188 | uint32 ConfigBitstreamRaw;
|
---|
189 | uint32 ConfigMBcontrolRasterOrder;
|
---|
190 | uint32 ConfigResidDiffHost;
|
---|
191 | uint32 ConfigSpatialResid8;
|
---|
192 | uint32 ConfigResid8Subtraction;
|
---|
193 | uint32 ConfigSpatialHost8or9Clipping;
|
---|
194 | uint32 ConfigSpatialResidInterleaved;
|
---|
195 | uint32 ConfigIntraResidUnsigned;
|
---|
196 | uint32 ConfigResidDiffAccelerator;
|
---|
197 | uint32 ConfigHostInverseScan;
|
---|
198 | uint32 ConfigSpecificIDCT;
|
---|
199 | uint32 Config4GroupedCoefs;
|
---|
200 | uint16 ConfigMinRenderTargetBuffCount;
|
---|
201 | uint16 ConfigDecoderSpecific;
|
---|
202 | } VBSVGA3dVideoDecoderConfig;
|
---|
203 |
|
---|
204 | typedef struct {
|
---|
205 | VBSVGA3dVideoDecoderDesc desc;
|
---|
206 | VBSVGA3dVideoDecoderConfig config;
|
---|
207 | } VBSVGACOTableDXVideoDecoderEntry;
|
---|
208 | AssertCompile(sizeof(VBSVGACOTableDXVideoDecoderEntry) == 32 * 4);
|
---|
209 |
|
---|
210 | typedef struct VBSVGA3dCmdDXDefineVideoDecoder {
|
---|
211 | VBSVGA3dVideoDecoderId videoDecoderId;
|
---|
212 |
|
---|
213 | VBSVGA3dVideoDecoderDesc desc;
|
---|
214 | VBSVGA3dVideoDecoderConfig config;
|
---|
215 | } VBSVGA3dCmdDXDefineVideoDecoder;
|
---|
216 | /* VBSVGA_3D_CMD_DX_DEFINE_VIDEO_DECODER */
|
---|
217 |
|
---|
218 | typedef struct VBSVGA3dCmdDXVideoDecoderBeginFrame {
|
---|
219 | VBSVGA3dVideoDecoderId videoDecoderId;
|
---|
220 | VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId;
|
---|
221 | } VBSVGA3dCmdDXVideoDecoderBeginFrame;
|
---|
222 | /* VBSVGA_3D_CMD_DX_VIDEO_DECODER_BEGIN_FRAME */
|
---|
223 |
|
---|
224 | typedef struct {
|
---|
225 | SVGA3dSurfaceId sidBuffer;
|
---|
226 | VBSVGA3dVideoDecoderBufferType bufferType;
|
---|
227 | uint32 dataOffset;
|
---|
228 | uint32 dataSize;
|
---|
229 | uint32 firstMBaddress;
|
---|
230 | uint32 numMBsInBuffer;
|
---|
231 | /** @todo pIV, IVSize, PartialEncryption, EncryptedBlockInfo */
|
---|
232 | } VBSVGA3dVideoDecoderBufferDesc;
|
---|
233 |
|
---|
234 | typedef struct VBSVGA3dCmdDXVideoDecoderSubmitBuffers {
|
---|
235 | VBSVGA3dVideoDecoderId videoDecoderId;
|
---|
236 | /* VBSVGA3dVideoDecoderBufferDesc[] */
|
---|
237 | } VBSVGA3dCmdDXVideoDecoderSubmitBuffers;
|
---|
238 | /* VBSVGA_3D_CMD_DX_VIDEO_DECODER_SUBMIT_BUFFERS */
|
---|
239 |
|
---|
240 | typedef struct VBSVGA3dCmdDXVideoDecoderEndFrame {
|
---|
241 | VBSVGA3dVideoDecoderId videoDecoderId;
|
---|
242 | } VBSVGA3dCmdDXVideoDecoderEndFrame;
|
---|
243 | /* VBSVGA_3D_CMD_DX_VIDEO_DECODER_END_FRAME */
|
---|
244 |
|
---|
245 | typedef struct {
|
---|
246 | uint32 FourCC;
|
---|
247 | VBSVGA3dVPIVDimension ViewDimension;
|
---|
248 | union {
|
---|
249 | struct {
|
---|
250 | uint32 MipSlice;
|
---|
251 | uint32 ArraySlice;
|
---|
252 | } Texture2D;
|
---|
253 | uint32 pad[4];
|
---|
254 | };
|
---|
255 | } VBSVGA3dVPIVDesc;
|
---|
256 |
|
---|
257 | typedef struct {
|
---|
258 | SVGA3dSurfaceId sid;
|
---|
259 | VBSVGA3dVideoProcessorDesc contentDesc;
|
---|
260 | VBSVGA3dVPIVDesc desc;
|
---|
261 | uint32 pad[15];
|
---|
262 | } VBSVGACOTableDXVideoProcessorInputViewEntry;
|
---|
263 | AssertCompile(sizeof(VBSVGACOTableDXVideoProcessorInputViewEntry) == 32 * 4);
|
---|
264 |
|
---|
265 | typedef struct VBSVGA3dCmdDXDefineVideoProcessorInputView {
|
---|
266 | VBSVGA3dVideoProcessorInputViewId videoProcessorInputViewId;
|
---|
267 |
|
---|
268 | SVGA3dSurfaceId sid;
|
---|
269 |
|
---|
270 | VBSVGA3dVideoProcessorDesc contentDesc;
|
---|
271 | VBSVGA3dVPIVDesc desc;
|
---|
272 | } VBSVGA3dCmdDXDefineVideoProcessorInputView;
|
---|
273 | /* VBSVGA_3D_CMD_DX_DEFINE_VIDEO_PROCESSOR_INPUT_VIEW */
|
---|
274 |
|
---|
275 | typedef struct {
|
---|
276 | VBSVGA3dVPOVDimension ViewDimension;
|
---|
277 | union {
|
---|
278 | struct {
|
---|
279 | uint32 MipSlice;
|
---|
280 | } Texture2D;
|
---|
281 | struct {
|
---|
282 | uint32 MipSlice;
|
---|
283 | uint32 FirstArraySlice;
|
---|
284 | uint32 ArraySize;
|
---|
285 | } Texture2DArray;
|
---|
286 | uint32 pad[4];
|
---|
287 | };
|
---|
288 | } VBSVGA3dVPOVDesc;
|
---|
289 |
|
---|
290 | typedef struct {
|
---|
291 | SVGA3dSurfaceId sid;
|
---|
292 | VBSVGA3dVideoProcessorDesc contentDesc;
|
---|
293 | VBSVGA3dVPOVDesc desc;
|
---|
294 | uint32 pad[15];
|
---|
295 | } VBSVGACOTableDXVideoProcessorOutputViewEntry;
|
---|
296 | AssertCompile(sizeof(VBSVGACOTableDXVideoProcessorInputViewEntry) == 32 * 4);
|
---|
297 |
|
---|
298 | typedef struct VBSVGA3dCmdDXDefineVideoProcessorOutputView {
|
---|
299 | VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId;
|
---|
300 |
|
---|
301 | SVGA3dSurfaceId sid;
|
---|
302 |
|
---|
303 | VBSVGA3dVideoProcessorDesc contentDesc;
|
---|
304 | VBSVGA3dVPOVDesc desc;
|
---|
305 | } VBSVGA3dCmdDXDefineVideoProcessorOutputView;
|
---|
306 | /* VBSVGA_3D_CMD_DX_DEFINE_VIDEO_PROCESSOR_OUTPUT_VIEW */
|
---|
307 |
|
---|
308 | typedef struct
|
---|
309 | {
|
---|
310 | uint8 Enable;
|
---|
311 | uint8 StereoFormatSeparate;
|
---|
312 | uint16 pad;
|
---|
313 | uint32 OutputIndex;
|
---|
314 | uint32 InputFrameOrField;
|
---|
315 | uint32 PastFrames;
|
---|
316 | uint32 FutureFrames;
|
---|
317 | /* VBSVGA3dVideoProcessorInputViewId[PastFrames + 1 + FutureFrames]:
|
---|
318 | * [PastFrames]
|
---|
319 | * InputSurface
|
---|
320 | * [FutureFrames]
|
---|
321 | *
|
---|
322 | * If StereoFormatSeparate is 1 then more 'PastFrames + 1 + FutureFrames' ids follow:
|
---|
323 | * [PastFramesRight]
|
---|
324 | * InputSurfaceRight
|
---|
325 | * [FutureFramesRight]
|
---|
326 | */
|
---|
327 | } VBSVGA3dVideoProcessorStream;
|
---|
328 |
|
---|
329 | typedef struct VBSVGA3dCmdDXVideoProcessorBlt {
|
---|
330 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
331 | VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId;
|
---|
332 |
|
---|
333 | uint32 outputFrame;
|
---|
334 | uint32 streamCount;
|
---|
335 | /* VBSVGA3dVideoProcessorStream data follow. */
|
---|
336 | } VBSVGA3dCmdDXVideoProcessorBlt;
|
---|
337 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_BLT */
|
---|
338 |
|
---|
339 | typedef struct VBSVGA3dCmdDXDestroyVideoDecoder {
|
---|
340 | VBSVGA3dVideoDecoderId videoDecoderId;
|
---|
341 | } VBSVGA3dCmdDXDestroyVideoDecoder;
|
---|
342 | /* VBSVGA_3D_CMD_DX_DESTROY_VIDEO_DECODER */
|
---|
343 |
|
---|
344 | typedef struct VBSVGA3dCmdDXDestroyVideoDecoderOutputView {
|
---|
345 | VBSVGA3dVideoDecoderOutputViewId videoDecoderOutputViewId;
|
---|
346 | } VBSVGA3dCmdDXDestroyVideoDecoderOutputView;
|
---|
347 | /* VBSVGA_3D_CMD_DX_DESTROY_VIDEO_DECODER_OUTPUT_VIEW */
|
---|
348 |
|
---|
349 | typedef struct VBSVGA3dCmdDXDestroyVideoProcessor {
|
---|
350 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
351 | } VBSVGA3dCmdDXDestroyVideoProcessor;
|
---|
352 | /* VBSVGA_3D_CMD_DX_DESTROY_VIDEO_PROCESSOR */
|
---|
353 |
|
---|
354 | typedef struct VBSVGA3dCmdDXDestroyVideoProcessorInputView {
|
---|
355 | VBSVGA3dVideoProcessorInputViewId videoProcessorInputViewId;
|
---|
356 | } VBSVGA3dCmdDXDestroyVideoProcessorInputView;
|
---|
357 | /* VBSVGA_3D_CMD_DX_DESTROY_VIDEO_PROCESSOR_INPUT_VIEW */
|
---|
358 |
|
---|
359 | typedef struct VBSVGA3dCmdDXDestroyVideoProcessorOutputView {
|
---|
360 | VBSVGA3dVideoProcessorOutputViewId videoProcessorOutputViewId;
|
---|
361 | } VBSVGA3dCmdDXDestroyVideoProcessorOutputView;
|
---|
362 | /* VBSVGA_3D_CMD_DX_DESTROY_VIDEO_PROCESSOR_OUTPUT_VIEW */
|
---|
363 |
|
---|
364 | typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputTargetRect {
|
---|
365 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
366 | uint32 enable;
|
---|
367 | SVGASignedRect outputRect;
|
---|
368 | } VBSVGA3dCmdDXVideoProcessorSetOutputTargetRect;
|
---|
369 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_TARGET_RECT */
|
---|
370 |
|
---|
371 | typedef struct {
|
---|
372 | union {
|
---|
373 | float r;
|
---|
374 | float y;
|
---|
375 | };
|
---|
376 | union {
|
---|
377 | float g;
|
---|
378 | float cb;
|
---|
379 | };
|
---|
380 | union {
|
---|
381 | float b;
|
---|
382 | float cr;
|
---|
383 | };
|
---|
384 | float a;
|
---|
385 | } VBSVGA3dVideoColor;
|
---|
386 |
|
---|
387 | typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor {
|
---|
388 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
389 | uint32 ycbcr;
|
---|
390 | VBSVGA3dVideoColor color;
|
---|
391 | } VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor;
|
---|
392 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_BACKGROUND_COLOR */
|
---|
393 |
|
---|
394 | typedef struct {
|
---|
395 | uint32 Usage : 1;
|
---|
396 | uint32 RGB_Range : 1;
|
---|
397 | uint32 YCbCr_Matrix : 1;
|
---|
398 | uint32 YCbCr_xvYCC : 1;
|
---|
399 | uint32 Nominal_Range : 2;
|
---|
400 | uint32 Reserved : 26;
|
---|
401 | } VBSVGA3dVideoProcessorColorSpace;
|
---|
402 |
|
---|
403 | typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputColorSpace {
|
---|
404 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
405 | VBSVGA3dVideoProcessorColorSpace colorSpace;
|
---|
406 | } VBSVGA3dCmdDXVideoProcessorSetOutputColorSpace;
|
---|
407 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_COLOR_SPACE */
|
---|
408 |
|
---|
409 | typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputAlphaFillMode {
|
---|
410 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
411 | VBSVGA3dVideoProcessorAlphaFillMode fillMode;
|
---|
412 | uint32 streamIndex;
|
---|
413 | } VBSVGA3dCmdDXVideoProcessorSetOutputAlphaFillMode;
|
---|
414 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_ALPHA_FILL_MODE */
|
---|
415 |
|
---|
416 | typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputConstriction {
|
---|
417 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
418 | uint32 enabled;
|
---|
419 | uint32 width;
|
---|
420 | uint32 height;
|
---|
421 | } VBSVGA3dCmdDXVideoProcessorSetOutputConstriction;
|
---|
422 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_CONSTRICTION */
|
---|
423 |
|
---|
424 | typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputStereoMode {
|
---|
425 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
426 | uint32 enable;
|
---|
427 | } VBSVGA3dCmdDXVideoProcessorSetOutputStereoMode;
|
---|
428 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_STEREO_MODE */
|
---|
429 |
|
---|
430 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamFrameFormat {
|
---|
431 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
432 | uint32 streamIndex;
|
---|
433 | VBSVGA3dVideoFrameFormat format;
|
---|
434 | } VBSVGA3dCmdDXVideoProcessorSetStreamFrameFormat;
|
---|
435 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_FRAME_FORMAT */
|
---|
436 |
|
---|
437 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamColorSpace {
|
---|
438 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
439 | uint32 streamIndex;
|
---|
440 | VBSVGA3dVideoProcessorColorSpace colorSpace;
|
---|
441 | } VBSVGA3dCmdDXVideoProcessorSetStreamColorSpace;
|
---|
442 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_COLOR_SPACE */
|
---|
443 |
|
---|
444 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamOutputRate {
|
---|
445 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
446 | uint32 streamIndex;
|
---|
447 | VBSVGA3dVideoProcessorOutputRate outputRate;
|
---|
448 | uint32 repeatFrame;
|
---|
449 | SVGA3dFraction64 customRate;
|
---|
450 | } VBSVGA3dCmdDXVideoProcessorSetStreamOutputRate;
|
---|
451 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_OUTPUT_RATE */
|
---|
452 |
|
---|
453 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamSourceRect {
|
---|
454 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
455 | uint32 streamIndex;
|
---|
456 | uint32 enable;
|
---|
457 | SVGASignedRect sourceRect;
|
---|
458 | } VBSVGA3dCmdDXVideoProcessorSetStreamSourceRect;
|
---|
459 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_SOURCE_RECT */
|
---|
460 |
|
---|
461 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamDestRect {
|
---|
462 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
463 | uint32 streamIndex;
|
---|
464 | uint32 enable;
|
---|
465 | SVGASignedRect destRect;
|
---|
466 | } VBSVGA3dCmdDXVideoProcessorSetStreamDestRect;
|
---|
467 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_DEST_RECT */
|
---|
468 |
|
---|
469 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamAlpha {
|
---|
470 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
471 | uint32 streamIndex;
|
---|
472 | uint32 enable;
|
---|
473 | float alpha;
|
---|
474 | } VBSVGA3dCmdDXVideoProcessorSetStreamAlpha;
|
---|
475 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_ALPHA */
|
---|
476 |
|
---|
477 | /** @todo palette */
|
---|
478 |
|
---|
479 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamPixelAspectRatio {
|
---|
480 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
481 | uint32 streamIndex;
|
---|
482 | uint32 enable;
|
---|
483 | SVGA3dFraction64 sourceRatio;
|
---|
484 | SVGA3dFraction64 destRatio;
|
---|
485 | } VBSVGA3dCmdDXVideoProcessorSetStreamPixelAspectRatio;
|
---|
486 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_PIXEL_ASPECT_RATIO */
|
---|
487 |
|
---|
488 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamLumaKey {
|
---|
489 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
490 | uint32 streamIndex;
|
---|
491 | uint32 enable;
|
---|
492 | float lower;
|
---|
493 | float upper;
|
---|
494 | } VBSVGA3dCmdDXVideoProcessorSetStreamLumaKey;
|
---|
495 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_LUMA_KEY */
|
---|
496 |
|
---|
497 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamStereoFormat {
|
---|
498 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
499 | uint32 streamIndex;
|
---|
500 | uint32 enable;
|
---|
501 | VBSVGA3dVideoProcessorStereoFormat stereoFormat;
|
---|
502 | uint8 leftViewFrame0;
|
---|
503 | uint8 baseViewFrame0;
|
---|
504 | uint8 pad[2];
|
---|
505 | VBSVGA3dVideoProcessorStereoFlipMode flipMode;
|
---|
506 | int32 monoOffset;
|
---|
507 | } VBSVGA3dCmdDXVideoProcessorSetStreamStereoFormat;
|
---|
508 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_STEREO_FORMAT */
|
---|
509 |
|
---|
510 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamAutoProcessingMode {
|
---|
511 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
512 | uint32 streamIndex;
|
---|
513 | uint32 enable;
|
---|
514 | } VBSVGA3dCmdDXVideoProcessorSetStreamAutoProcessingMode;
|
---|
515 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_AUTO_PROCESSING_MODE */
|
---|
516 |
|
---|
517 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamFilter {
|
---|
518 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
519 | uint32 streamIndex;
|
---|
520 | uint32 enable;
|
---|
521 | VBSVGA3dVideoProcessorFilter filter;
|
---|
522 | int32 level;
|
---|
523 | } VBSVGA3dCmdDXVideoProcessorSetStreamFilter;
|
---|
524 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_FILTER */
|
---|
525 |
|
---|
526 | typedef struct VBSVGA3dCmdDXVideoProcessorSetStreamRotation {
|
---|
527 | VBSVGA3dVideoProcessorId videoProcessorId;
|
---|
528 | uint32 streamIndex;
|
---|
529 | uint32 enable;
|
---|
530 | VBSVGA3dVideoProcessorRotation rotation;
|
---|
531 | } VBSVGA3dCmdDXVideoProcessorSetStreamRotation;
|
---|
532 | /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_STREAM_ROTATION */
|
---|
533 |
|
---|
534 | typedef struct { /* VBSVGA3D_VIDEO_CAPABILITY_DECODE_PROFILE */
|
---|
535 | VBSVGA3dGuid DecodeProfile;
|
---|
536 | /* SVGA video formats. */
|
---|
537 | uint8 fAYUV;
|
---|
538 | uint8 fNV12;
|
---|
539 | uint8 f420_OPAQUE; /* For example YV12 */
|
---|
540 | } VBSVGA3dDecodeProfileInfo;
|
---|
541 |
|
---|
542 | typedef struct { /* VBSVGA3D_VIDEO_CAPABILITY_DECODE_CONFIG */
|
---|
543 | VBSVGA3dVideoDecoderDesc desc; /* In */
|
---|
544 | VBSVGA3dVideoDecoderConfig aConfig[1]; /* [(cbDataOut - sizeof(desc)) / sizeof(aConfig[0])] */
|
---|
545 | } VBSVGA3dDecodeConfigInfo;
|
---|
546 |
|
---|
547 | /* Layout of memory object for VBSVGA3dCmdDXGetVideoCapability command. */
|
---|
548 | typedef struct {
|
---|
549 | uint64 fenceValue; /* Host sets this to VBSVGA3dCmdDXGetVideoCapability::fenceValue after updating the data. */
|
---|
550 | uint32 cbDataOut; /* Size in bytes of data written by host excluding u64Fence and cbDataOut fields. */
|
---|
551 | union
|
---|
552 | {
|
---|
553 | VBSVGA3dDecodeProfileInfo aDecodeProfile[1]; /* [cbDataOut / sizeof(aDecodeProfile[0])] */
|
---|
554 | VBSVGA3dDecodeConfigInfo config;
|
---|
555 | } data;
|
---|
556 | } VBSVGA3dVideoCapabilityMobLayout;
|
---|
557 |
|
---|
558 | typedef struct VBSVGA3dCmdDXGetVideoCapability {
|
---|
559 | VBSVGA3dVideoCapability capability;
|
---|
560 | uint32 mobid;
|
---|
561 | uint32 offsetInBytes;
|
---|
562 | uint32 sizeInBytes;
|
---|
563 | uint64 fenceValue;
|
---|
564 | } VBSVGA3dCmdDXGetVideoCapability;
|
---|
565 | /* VBSVGA_3D_CMD_DX_GET_VIDEO_CAPABILITY */
|
---|
566 |
|
---|
567 | #endif /* !VBOX_INCLUDED_SRC_Graphics_vmsvga_include_vbsvga3d_dx_h */
|
---|