Changeset 102382 in vbox
- Timestamp:
- Nov 29, 2023 5:48:14 PM (17 months ago)
- svn:sync-xref-src-repo-rev:
- 160518
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/vmsvga_include/vbsvga3d_dx.h
r102293 r102382 29 29 #include "svga3d_dx.h" 30 30 31 /* Extended capabilities returned by SVGA3D_DEVCAP_3D if VBoxSVGA virtual device is enabled. */ 32 /* The original "3D support" capability. */ 33 #define VBSVGA3D_CAP_3D 0x00000001 34 /* Video decoding/processing and ClearView commands. */ 35 #define VBSVGA3D_CAP_VIDEO 0x00000002 36 31 37 /* Arbitrary limits. Allows to use constant size structures. 32 38 * NVIDIA supports 5 streams, AMD more, so 8 seems to be a good round number. 33 39 * Both support 1 rate conversion caps set. 40 * NVIDIA driver reports 6 custom rates. 34 41 */ 35 42 #define VBSVGA3D_MAX_VIDEO_STREAMS 8 36 43 #define VBSVGA3D_MAX_VIDEO_RATE_CONVERSION_CAPS 1 44 #define VBSVGA3D_MAX_VIDEO_CUSTOM_RATE_CAPS 8 37 45 38 46 /* For 8-bit palettized formats. */ … … 206 214 207 215 typedef struct { 216 union { 217 float r; 218 float y; 219 }; 220 union { 221 float g; 222 float cb; 223 }; 224 union { 225 float b; 226 float cr; 227 }; 228 float a; 229 } VBSVGA3dVideoColor; 230 231 typedef struct { 232 uint32 Usage : 1; 233 uint32 RGB_Range : 1; 234 uint32 YCbCr_Matrix : 1; 235 uint32 YCbCr_xvYCC : 1; 236 uint32 Nominal_Range : 2; 237 uint32 Reserved : 26; 238 } VBSVGA3dVideoProcessorColorSpace; 239 240 typedef struct { 208 241 VBSVGA3dVideoFrameFormat InputFrameFormat; 209 242 SVGA3dFraction64 InputFrameRate; … … 216 249 } VBSVGA3dVideoProcessorDesc; 217 250 251 #define VBSVGA3D_VP_SET_STREAM_FRAME_FORMAT 0x00000001 252 #define VBSVGA3D_VP_SET_STREAM_COLOR_SPACE 0x00000002 253 #define VBSVGA3D_VP_SET_STREAM_OUTPUT_RATE 0x00000004 254 #define VBSVGA3D_VP_SET_STREAM_SOURCE_RECT 0x00000008 255 #define VBSVGA3D_VP_SET_STREAM_DEST_RECT 0x00000010 256 #define VBSVGA3D_VP_SET_STREAM_ALPHA 0x00000020 257 #define VBSVGA3D_VP_SET_STREAM_PALETTE 0x00000040 258 #define VBSVGA3D_VP_SET_STREAM_ASPECT_RATIO 0x00000080 259 #define VBSVGA3D_VP_SET_STREAM_LUMA_KEY 0x00000100 260 #define VBSVGA3D_VP_SET_STREAM_STEREO_FORMAT 0x00000200 261 #define VBSVGA3D_VP_SET_STREAM_AUTO_PROCESSING_MODE 0x00000400 262 #define VBSVGA3D_VP_SET_STREAM_FILTER 0x00000800 263 #define VBSVGA3D_VP_SET_STREAM_ROTATION 0x00001000 264 typedef uint32 VBSVGA3dVideoProcessorStreamSetMask; 265 266 typedef struct 267 { 268 VBSVGA3dVideoProcessorStreamSetMask SetMask; 269 270 uint32 SourceRectEnable : 1; 271 uint32 DestRectEnable : 1; 272 uint32 AlphaEnable : 1; 273 uint32 AspectRatioEnable : 1; 274 uint32 LumaKeyEnable : 1; 275 uint32 StereoFormatEnable : 1; 276 uint32 AutoProcessingModeEnable : 1; 277 uint32 RotationEnable : 1; 278 279 VBSVGA3dVideoFrameFormat FrameFormat; 280 VBSVGA3dVideoProcessorColorSpace ColorSpace; 281 VBSVGA3dVideoProcessorOutputRate OutputRate; 282 uint32 RepeatFrame; 283 SVGA3dFraction64 CustomRate; 284 SVGASignedRect SourceRect; 285 SVGASignedRect DestRect; 286 float Alpha; 287 uint32 PaletteCount; 288 uint32 aPalette[VBSVGA3D_MAX_VIDEO_PALETTE_ENTRIES]; 289 SVGA3dFraction64 AspectSourceRatio; 290 SVGA3dFraction64 AspectDestRatio; 291 float LumaKeyLower; 292 float LumaKeyUpper; 293 VBSVGA3dVideoProcessorStereoFormat StereoFormat; 294 uint32 LeftViewFrame0 : 1; 295 uint32 BaseViewFrame0 : 1; 296 VBSVGA3dVideoProcessorStereoFlipMode FlipMode; 297 int32 MonoOffset; 298 uint32 FilterEnableMask; 299 struct { 300 int32 Level; 301 } aFilter[VBSVGA3D_VP_MAX_FILTER_COUNT]; 302 VBSVGA3dVideoProcessorRotation Rotation; 303 } VBSVGA3dVideoProcessorStreamState; 304 305 #define VBSVGA3D_VP_SET_OUTPUT_TARGET_RECT 0x00000001 306 #define VBSVGA3D_VP_SET_OUTPUT_BACKGROUND_COLOR 0x00000002 307 #define VBSVGA3D_VP_SET_OUTPUT_COLOR_SPACE 0x00000004 308 #define VBSVGA3D_VP_SET_OUTPUT_ALPHA_FILL_MODE 0x00000008 309 #define VBSVGA3D_VP_SET_OUTPUT_CONSTRICTION 0x00000010 310 #define VBSVGA3D_VP_SET_OUTPUT_STEREO_MODE 0x00000020 311 typedef uint32 VBSVGA3dVideoProcessorOutputSetMask; 312 313 typedef struct 314 { 315 VBSVGA3dVideoProcessorOutputSetMask SetMask; 316 317 uint32 TargetRectEnable : 1; 318 uint32 BackgroundColorYCbCr : 1; 319 uint32 ConstrictionEnable : 1; 320 uint32 StereoModeEnable : 1; 321 322 SVGASignedRect TargetRect; 323 VBSVGA3dVideoColor BackgroundColor; 324 VBSVGA3dVideoProcessorColorSpace ColorSpace; 325 VBSVGA3dVideoProcessorAlphaFillMode AlphaFillMode; 326 uint32 AlphaFillStreamIndex; 327 uint32 ConstrictionWidth; 328 uint32 ConstrictionHeight; 329 } VBSVGA3dVideoProcessorOutputState; 330 218 331 typedef struct { 219 332 VBSVGA3dVideoProcessorDesc desc; 220 uint32 pad[6]; 333 334 VBSVGA3dVideoProcessorOutputState output; 335 336 VBSVGA3dVideoProcessorStreamState aStreamState[VBSVGA3D_MAX_VIDEO_STREAMS]; 337 uint32 pad[1719]; 221 338 } VBSVGACOTableDXVideoProcessorEntry; 222 AssertCompile(sizeof(VBSVGACOTableDXVideoProcessorEntry) == 16 * 4);339 AssertCompile(sizeof(VBSVGACOTableDXVideoProcessorEntry) == 4096 * 4); 223 340 224 341 typedef struct VBSVGA3dCmdDXDefineVideoProcessor { … … 293 410 VBSVGA3dVideoDecoderDesc desc; 294 411 VBSVGA3dVideoDecoderConfig config; 412 VBSVGA3dVideoDecoderOutputViewId vdovId; 413 uint32 pad[31]; 295 414 } VBSVGACOTableDXVideoDecoderEntry; 296 AssertCompile(sizeof(VBSVGACOTableDXVideoDecoderEntry) == 32* 4);415 AssertCompile(sizeof(VBSVGACOTableDXVideoDecoderEntry) == 64 * 4); 297 416 298 417 typedef struct VBSVGA3dCmdDXDefineVideoDecoder { … … 457 576 /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_TARGET_RECT */ 458 577 459 typedef struct {460 union {461 float r;462 float y;463 };464 union {465 float g;466 float cb;467 };468 union {469 float b;470 float cr;471 };472 float a;473 } VBSVGA3dVideoColor;474 475 578 typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor { 476 579 VBSVGA3dVideoProcessorId videoProcessorId; … … 479 582 } VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor; 480 583 /* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_BACKGROUND_COLOR */ 481 482 typedef struct {483 uint32 Usage : 1;484 uint32 RGB_Range : 1;485 uint32 YCbCr_Matrix : 1;486 uint32 YCbCr_xvYCC : 1;487 uint32 Nominal_Range : 2;488 uint32 Reserved : 26;489 } VBSVGA3dVideoProcessorColorSpace;490 584 491 585 typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputColorSpace { … … 655 749 VBSVGA3dVideoRateConversionProcessorCaps ProcessorCaps; 656 750 VBSVGA3dVideoRateConversionITelecineCaps ITelecineCaps; 751 uint32 CustomRateCount; 657 752 } VBSVGA3dVideoProcessorRateCaps; 753 754 typedef struct { 755 SVGA3dFraction64 CustomRate; 756 uint32 OutputFrames; 757 uint8 InputInterlaced; 758 uint8 pad[3]; 759 uint32 InputFramesOrFields; 760 } VBSVGA3dVideoProcessorCustomRateCaps; 658 761 659 762 typedef struct { … … 681 784 VBSVGA3dVideoProcessorCaps Caps; 682 785 VBSVGA3dVideoProcessorRateCaps RateCaps; 786 VBSVGA3dVideoProcessorCustomRateCaps aCustomRateCaps[VBSVGA3D_MAX_VIDEO_CUSTOM_RATE_CAPS]; 683 787 VBSVGA3dVideoProcessorFilterRange aFilterRange[VBSVGA3D_VP_MAX_FILTER_COUNT]; 684 788 } VBSVGA3dVideoProcessorEnumInfo;
Note:
See TracChangeset
for help on using the changeset viewer.