VirtualBox

Changeset 102382 in vbox


Ignore:
Timestamp:
Nov 29, 2023 5:48:14 PM (17 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160518
Message:

Devices/Graphics: header update. bugref:10529

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/vmsvga_include/vbsvga3d_dx.h

    r102293 r102382  
    2929#include "svga3d_dx.h"
    3030
     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
    3137/* Arbitrary limits. Allows to use constant size structures.
    3238 * NVIDIA supports 5 streams, AMD more, so 8 seems to be a good round number.
    3339 * Both support 1 rate conversion caps set.
     40 * NVIDIA driver reports 6 custom rates.
    3441 */
    3542#define VBSVGA3D_MAX_VIDEO_STREAMS 8
    3643#define VBSVGA3D_MAX_VIDEO_RATE_CONVERSION_CAPS 1
     44#define VBSVGA3D_MAX_VIDEO_CUSTOM_RATE_CAPS 8
    3745
    3846/* For 8-bit palettized formats. */
     
    206214
    207215typedef 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
     231typedef 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
     240typedef struct {
    208241    VBSVGA3dVideoFrameFormat InputFrameFormat;
    209242    SVGA3dFraction64 InputFrameRate;
     
    216249} VBSVGA3dVideoProcessorDesc;
    217250
     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
     264typedef uint32 VBSVGA3dVideoProcessorStreamSetMask;
     265
     266typedef 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
     311typedef uint32 VBSVGA3dVideoProcessorOutputSetMask;
     312
     313typedef 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
    218331typedef struct {
    219332    VBSVGA3dVideoProcessorDesc desc;
    220     uint32 pad[6];
     333
     334    VBSVGA3dVideoProcessorOutputState output;
     335
     336    VBSVGA3dVideoProcessorStreamState aStreamState[VBSVGA3D_MAX_VIDEO_STREAMS];
     337    uint32 pad[1719];
    221338} VBSVGACOTableDXVideoProcessorEntry;
    222 AssertCompile(sizeof(VBSVGACOTableDXVideoProcessorEntry) == 16 * 4);
     339AssertCompile(sizeof(VBSVGACOTableDXVideoProcessorEntry) == 4096 * 4);
    223340
    224341typedef struct VBSVGA3dCmdDXDefineVideoProcessor {
     
    293410    VBSVGA3dVideoDecoderDesc desc;
    294411    VBSVGA3dVideoDecoderConfig config;
     412    VBSVGA3dVideoDecoderOutputViewId vdovId;
     413    uint32 pad[31];
    295414} VBSVGACOTableDXVideoDecoderEntry;
    296 AssertCompile(sizeof(VBSVGACOTableDXVideoDecoderEntry) == 32 * 4);
     415AssertCompile(sizeof(VBSVGACOTableDXVideoDecoderEntry) == 64 * 4);
    297416
    298417typedef struct VBSVGA3dCmdDXDefineVideoDecoder {
     
    457576/* VBSVGA_3D_CMD_DX_VIDEO_PROCESSOR_SET_OUTPUT_TARGET_RECT */
    458577
    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 
    475578typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor {
    476579    VBSVGA3dVideoProcessorId videoProcessorId;
     
    479582} VBSVGA3dCmdDXVideoProcessorSetOutputBackgroundColor;
    480583/* 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;
    490584
    491585typedef struct VBSVGA3dCmdDXVideoProcessorSetOutputColorSpace {
     
    655749    VBSVGA3dVideoRateConversionProcessorCaps ProcessorCaps;
    656750    VBSVGA3dVideoRateConversionITelecineCaps ITelecineCaps;
     751    uint32 CustomRateCount;
    657752} VBSVGA3dVideoProcessorRateCaps;
     753
     754typedef struct {
     755    SVGA3dFraction64 CustomRate;
     756    uint32 OutputFrames;
     757    uint8 InputInterlaced;
     758    uint8 pad[3];
     759    uint32 InputFramesOrFields;
     760} VBSVGA3dVideoProcessorCustomRateCaps;
    658761
    659762typedef struct {
     
    681784    VBSVGA3dVideoProcessorCaps Caps;
    682785    VBSVGA3dVideoProcessorRateCaps RateCaps;
     786    VBSVGA3dVideoProcessorCustomRateCaps aCustomRateCaps[VBSVGA3D_MAX_VIDEO_CUSTOM_RATE_CAPS];
    683787    VBSVGA3dVideoProcessorFilterRange aFilterRange[VBSVGA3D_VP_MAX_FILTER_COUNT];
    684788} VBSVGA3dVideoProcessorEnumInfo;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette