// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. //------------------------------------------------------------------------------ // // Types declaration for SharpDX.MediaFoundation.DirectX namespace. // This code was generated by a tool. // Date : 6/17/2016 5:56:05 PM // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using System; using System.Runtime.InteropServices; using System.Security; #if DESKTOP_APP namespace SharpDX.MediaFoundation.DirectX { #pragma warning disable 419 #pragma warning disable 1587 #pragma warning disable 1574 /// ///

Specifies how the output alpha values are calculated for Microsoft DirectX Video Acceleration High Definition (DXVA-HD) blit operations.

///
/// ///

The Mode member of the structure has this enumeration type. That member specifies the alpha-fill mode for the input stream identified by the StreamNumber member of the same structure. To set the alpha-fill mode, call .

To find out which modes the device supports, call the method. If the device sets the flag in the FeatureCaps member of the structure, the DXVA-HD device supports any of the modes listed here. Otherwise, the alpha-fill mode must be .

///
/// /// dd318388 /// DXVAHD_ALPHA_FILL_MODE /// DXVAHD_ALPHA_FILL_MODE public enum AlphaFillMode : int { /// ///

Alpha values inside the target rectangle are set to opaque.

///
/// /// dd318388 /// DXVAHD_ALPHA_FILL_MODE_OPAQUE /// DXVAHD_ALPHA_FILL_MODE_OPAQUE Opaque = unchecked((int)0), /// ///

Alpha values inside the target rectangle are set to the alpha value specified in the background color. See .

///
/// /// dd318388 /// DXVAHD_ALPHA_FILL_MODE_BACKGROUND /// DXVAHD_ALPHA_FILL_MODE_BACKGROUND Background = unchecked((int)1), /// ///

Existing alpha values remain unchanged in the output surface.

///
/// /// dd318388 /// DXVAHD_ALPHA_FILL_MODE_DESTINATION /// DXVAHD_ALPHA_FILL_MODE_DESTINATION Destination = unchecked((int)2), /// ///

Alpha values from the input stream are scaled and copied to the corresponding destination rectangle for that stream. If the input stream does not have alpha data, the DXVA-HD device sets the alpha values in the target rectangle to an opaque value. If the input stream is disabled or the source rectangle is empty, the alpha values in the target rectangle are not modified.

///
/// /// dd318388 /// DXVAHD_ALPHA_FILL_MODE_SOURCE_STREAM /// DXVAHD_ALPHA_FILL_MODE_SOURCE_STREAM SourceStream = unchecked((int)3), } /// ///

Specifies state parameters for blit operations when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).

To set a state parameter, call the method. This method takes a value and a byte array as input. The byte array contains state data, the structure of which is defined by the value.

///
/// /// dd318389 /// DXVAHD_BLT_STATE /// DXVAHD_BLT_STATE public enum BlitState : int { /// /// No documentation. /// /// /// dd318389 /// DXVAHD_BLT_STATE_TARGET_RECT /// DXVAHD_BLT_STATE_TARGET_RECT TargetRectangle = unchecked((int)0), /// /// No documentation. /// /// /// dd318389 /// DXVAHD_BLT_STATE_BACKGROUND_COLOR /// DXVAHD_BLT_STATE_BACKGROUND_COLOR BackgroundColor = unchecked((int)1), /// /// No documentation. /// /// /// dd318389 /// DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE /// DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE OutputColorSpace = unchecked((int)2), /// /// No documentation. /// /// /// dd318389 /// DXVAHD_BLT_STATE_ALPHA_FILL /// DXVAHD_BLT_STATE_ALPHA_FILL AlphaFill = unchecked((int)3), /// /// No documentation. /// /// /// dd318389 /// DXVAHD_BLT_STATE_CONSTRICTION /// DXVAHD_BLT_STATE_CONSTRICTION Constriction = unchecked((int)4), /// /// No documentation. /// /// /// dd318389 /// DXVAHD_BLT_STATE_PRIVATE /// DXVAHD_BLT_STATE_PRIVATE Private = unchecked((int)1000), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0012 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0012 public enum CompressedBufferType : int { /// /// No documentation. /// /// /// DXVA2_PictureParametersBufferType /// DXVA2_PictureParametersBufferType PictureParameters = unchecked((int)0), /// /// No documentation. /// /// /// DXVA2_MacroBlockControlBufferType /// DXVA2_MacroBlockControlBufferType MacroBlockControl = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_ResidualDifferenceBufferType /// DXVA2_ResidualDifferenceBufferType ResidualDifference = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_DeblockingControlBufferType /// DXVA2_DeblockingControlBufferType DeblockingControl = unchecked((int)3), /// /// No documentation. /// /// /// DXVA2_InverseQuantizationMatrixBufferType /// DXVA2_InverseQuantizationMatrixBufferType InverseQuantizationMatrix = unchecked((int)4), /// /// No documentation. /// /// /// DXVA2_SliceControlBufferType /// DXVA2_SliceControlBufferType SliceControl = unchecked((int)5), /// /// No documentation. /// /// /// DXVA2_BitStreamDateBufferType /// DXVA2_BitStreamDateBufferType BitStreamDate = unchecked((int)6), /// /// No documentation. /// /// /// DXVA2_MotionVectorBuffer /// DXVA2_MotionVectorBuffer Dxva2MotionVectorBuffer = unchecked((int)7), /// /// No documentation. /// /// /// DXVA2_FilmGrainBuffer /// DXVA2_FilmGrainBuffer Dxva2FilmGrainBuffer = unchecked((int)8), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0003 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0003 public enum DeinterlaceTechnology : int { /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_Unknown /// DXVA2_DeinterlaceTech_Unknown Unknown = unchecked((int)0), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_BOBLineReplicate /// DXVA2_DeinterlaceTech_BOBLineReplicate BOBLineReplicate = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_BOBVerticalStretch /// DXVA2_DeinterlaceTech_BOBVerticalStretch BOBVerticalStretch = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_BOBVerticalStretch4Tap /// DXVA2_DeinterlaceTech_BOBVerticalStretch4Tap BOBVerticalStretch4Tap = unchecked((int)4), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_MedianFiltering /// DXVA2_DeinterlaceTech_MedianFiltering MedianFiltering = unchecked((int)8), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_EdgeFiltering /// DXVA2_DeinterlaceTech_EdgeFiltering EdgeFiltering = unchecked((int)16), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_FieldAdaptive /// DXVA2_DeinterlaceTech_FieldAdaptive FieldAdaptive = unchecked((int)32), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_PixelAdaptive /// DXVA2_DeinterlaceTech_PixelAdaptive PixelAdaptive = unchecked((int)64), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_MotionVectorSteered /// DXVA2_DeinterlaceTech_MotionVectorSteered MotionVectorSteered = unchecked((int)128), /// /// No documentation. /// /// /// DXVA2_DeinterlaceTech_InverseTelecine /// DXVA2_DeinterlaceTech_InverseTelecine InverseTelecine = unchecked((int)256), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0006 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0006 public enum DetailFilterTechnology : int { /// /// No documentation. /// /// /// DXVA2_DetailFilterTech_Unsupported /// DXVA2_DetailFilterTech_Unsupported DetailTechUnsupported = unchecked((int)0), /// /// No documentation. /// /// /// DXVA2_DetailFilterTech_Unknown /// DXVA2_DetailFilterTech_Unknown DetailTechUnknown = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_DetailFilterTech_Edge /// DXVA2_DetailFilterTech_Edge DetailTechEdge = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_DetailFilterTech_Sharpening /// DXVA2_DetailFilterTech_Sharpening DetailTechSharpening = unchecked((int)4), } /// ///

Defines video processing capabilities for a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.

///
/// /// dd318415 /// DXVAHD_DEVICE_CAPS /// DXVAHD_DEVICE_CAPS public enum DeviceCaps : int { /// ///

The device can blend video content in linear color space. Most video content is gamma corrected, resulting in nonlinear values. If the DXVA-HD device sets this flag, it means the device converts colors to linear space before blending, which produces better results. ///

///
/// /// dd318415 /// DXVAHD_DEVICE_CAPS_LINEAR_SPACE /// DXVAHD_DEVICE_CAPS_LINEAR_SPACE LinearSpace = unchecked((int)1), /// ///

The device supports the xvYCC color space for YCbCr data.

///
/// /// dd318415 /// DXVAHD_DEVICE_CAPS_xvYCC /// DXVAHD_DEVICE_CAPS_xvYCC XvYCC = unchecked((int)2), /// ///

The device can perform range conversion when the input and output are both RGB but use different color ranges (0-255 or 16-235, for 8-bit RGB).

///
/// /// dd318415 /// DXVAHD_DEVICE_CAPS_RGB_RANGE_CONVERSION /// DXVAHD_DEVICE_CAPS_RGB_RANGE_CONVERSION RgbRangeConversion = unchecked((int)4), /// ///

The device can apply a matrix conversion to YCbCr values when the input and output are both YCbCr. For example, the driver can convert colors from BT.601 to BT.709.

///
/// /// dd318415 /// DXVAHD_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION /// DXVAHD_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION YCbCrMatrixConversion = unchecked((int)8), } /// ///

Specifies the type of Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.

///
/// /// dd318417 /// DXVAHD_DEVICE_TYPE /// DXVAHD_DEVICE_TYPE public enum DeviceType : int { /// ///

Hardware device. Video processing is performed in the GPU by the driver.

///
/// /// dd318417 /// DXVAHD_DEVICE_TYPE_HARDWARE /// DXVAHD_DEVICE_TYPE_HARDWARE Hardware = unchecked((int)0), /// ///

Software device. Video processing is performed in the CPU by a software plug-in.

///
/// /// dd318417 /// DXVAHD_DEVICE_TYPE_SOFTWARE /// DXVAHD_DEVICE_TYPE_SOFTWARE Software = unchecked((int)1), /// ///

Reference device. Video processing is performed in the CPU by a software plug-in.

///
/// /// dd318417 /// DXVAHD_DEVICE_TYPE_REFERENCE /// DXVAHD_DEVICE_TYPE_REFERENCE Reference = unchecked((int)2), /// ///

Other. The device is neither a hardware device nor a software plug-in.

///
/// /// dd318417 /// DXVAHD_DEVICE_TYPE_OTHER /// DXVAHD_DEVICE_TYPE_OTHER Other = unchecked((int)3), } /// ///

Specifies the intended use for a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.

///
/// ///

The graphics driver uses one of these enumeration constants as a hint when it creates the DXVA-HD device.

///
/// /// dd318420 /// DXVAHD_DEVICE_USAGE /// DXVAHD_DEVICE_USAGE public enum DeviceUsage : int { /// ///

Normal video playback. The graphics driver should expose a set of capabilities that are appropriate for real-time video playback.

///
/// /// dd318420 /// DXVAHD_DEVICE_USAGE_PLAYBACK_NORMAL /// DXVAHD_DEVICE_USAGE_PLAYBACK_NORMAL PlaybackNormal = unchecked((int)0), /// ///

Optimal speed. The graphics driver should expose a minimal set of capabilities that are optimized for performance.

Use this setting if you want better performance and can accept some reduction in video quality. For example, you might use this setting in power-saving mode or to play video thumbnails.

///
/// /// dd318420 /// DXVAHD_DEVICE_USAGE_OPTIMAL_SPEED /// DXVAHD_DEVICE_USAGE_OPTIMAL_SPEED OptimalSpeed = unchecked((int)1), /// ///

Optimal quality. The grahics driver should expose its maximum set of capabilities.

Specify this setting to get the best video quality possible. It is appropriate for tasks such as video editing, when quality is more important than speed. It is not appropriate for real-time playback.

///
/// /// dd318420 /// DXVAHD_DEVICE_USAGE_OPTIMAL_QUALITY /// DXVAHD_DEVICE_USAGE_OPTIMAL_QUALITY OptimalQuality = unchecked((int)2), } /// ///

Defines features that a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device can support.

///
/// /// dd318422 /// DXVAHD_FEATURE_CAPS /// DXVAHD_FEATURE_CAPS public enum FeatureCaps : int { /// ///

The device can set the alpha values on the video output. See .

///
/// /// dd318422 /// DXVAHD_FEATURE_CAPS_ALPHA_FILL /// DXVAHD_FEATURE_CAPS_ALPHA_FILL AlphaFill = unchecked((int)1), /// ///

The device can downsample the video output. See .

///
/// /// dd318422 /// DXVAHD_FEATURE_CAPS_CONSTRICTION /// DXVAHD_FEATURE_CAPS_CONSTRICTION Constriction = unchecked((int)2), /// ///

The device can perform luma keying. See .

///
/// /// dd318422 /// DXVAHD_FEATURE_CAPS_LUMA_KEY /// DXVAHD_FEATURE_CAPS_LUMA_KEY LumaKey = unchecked((int)4), /// ///

The device can apply alpha values from color palette entries. See .

///
/// /// dd318422 /// DXVAHD_FEATURE_CAPS_ALPHA_PALETTE /// DXVAHD_FEATURE_CAPS_ALPHA_PALETTE AlphaPalette = unchecked((int)8), } /// ///

Defines the range of supported values for an image filter.

///
/// ///

The multiplier enables the filter range to have a fractional step value.

For example, a hue filter might have an actual range of [-180.0 ... +180.0] with a step size of 0.25. The device would report the following range and multiplier:

  • Minimum: -720
  • Maximum: +720
  • Multiplier: 0.25

In this case, a filter value of 2 would be interpreted by the device as 0.50 (or 2 ? 0.25).

The device should use a multiplier that can be represented exactly as a base-2 fraction.

///
/// /// dd318428 /// DXVAHD_FILTER /// DXVAHD_FILTER public enum Filter : int { /// ///

The minimum value of the filter.

///
/// /// dd318428 /// DXVAHD_FILTER_BRIGHTNESS /// DXVAHD_FILTER_BRIGHTNESS Brightness = unchecked((int)0), /// ///

The maximum value of the filter.

///
/// /// dd318428 /// DXVAHD_FILTER_CONTRAST /// DXVAHD_FILTER_CONTRAST Contrast = unchecked((int)1), /// ///

The default value of the filter.

///
/// /// dd318428 /// DXVAHD_FILTER_HUE /// DXVAHD_FILTER_HUE Hue = unchecked((int)2), /// ///

A multiplier. Use the following formula to translate the filter setting into the actual filter value: Actual Value = Set Value???Multiplier.

///
/// /// dd318428 /// DXVAHD_FILTER_SATURATION /// DXVAHD_FILTER_SATURATION Saturation = unchecked((int)3), /// /// No documentation. /// /// /// dd318428 /// DXVAHD_FILTER_NOISE_REDUCTION /// DXVAHD_FILTER_NOISE_REDUCTION NoiseReduction = unchecked((int)4), /// /// No documentation. /// /// /// dd318428 /// DXVAHD_FILTER_EDGE_ENHANCEMENT /// DXVAHD_FILTER_EDGE_ENHANCEMENT EdgeEnhancement = unchecked((int)5), /// /// No documentation. /// /// /// dd318428 /// DXVAHD_FILTER_ANAMORPHIC_SCALING /// DXVAHD_FILTER_ANAMORPHIC_SCALING AnamorphicScaling = unchecked((int)6), } /// ///

Defines capabilities related to image adjustment and filtering for a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.

///
/// /// dd318426 /// DXVAHD_FILTER_CAPS /// DXVAHD_FILTER_CAPS public enum FilterCaps : int { /// ///

The device can adjust the brightness level.

///
/// /// dd318426 /// DXVAHD_FILTER_CAPS_BRIGHTNESS /// DXVAHD_FILTER_CAPS_BRIGHTNESS Brightness = unchecked((int)1), /// ///

The device can adjust the contrast level.

///
/// /// dd318426 /// DXVAHD_FILTER_CAPS_CONTRAST /// DXVAHD_FILTER_CAPS_CONTRAST Contrast = unchecked((int)2), /// ///

The device can adjust hue.

///
/// /// dd318426 /// DXVAHD_FILTER_CAPS_HUE /// DXVAHD_FILTER_CAPS_HUE Hue = unchecked((int)4), /// ///

The device can adjust the saturation level.

///
/// /// dd318426 /// DXVAHD_FILTER_CAPS_SATURATION /// DXVAHD_FILTER_CAPS_SATURATION Saturation = unchecked((int)8), /// ///

The device can perform noise reduction.

///
/// /// dd318426 /// DXVAHD_FILTER_CAPS_NOISE_REDUCTION /// DXVAHD_FILTER_CAPS_NOISE_REDUCTION NoiseReduction = unchecked((int)16), /// ///

The device can perform edge enhancement.

///
/// /// dd318426 /// DXVAHD_FILTER_CAPS_EDGE_ENHANCEMENT /// DXVAHD_FILTER_CAPS_EDGE_ENHANCEMENT EdgeEnhancement = unchecked((int)32), /// ///

The device can perform anamorphic scaling. Anamorphic scaling can be used to stretch 4:3 content to a widescreen 16:9 aspect ratio.

///
/// /// dd318426 /// DXVAHD_FILTER_CAPS_ANAMORPHIC_SCALING /// DXVAHD_FILTER_CAPS_ANAMORPHIC_SCALING AnamorphicScaling = unchecked((int)64), } /// ///

Describes how a video stream is interlaced.

///
/// /// dd318431 /// DXVAHD_FRAME_FORMAT /// DXVAHD_FRAME_FORMAT public enum FrameFormat : int { /// ///

Frames are progressive.

///
/// /// dd318431 /// DXVAHD_FRAME_FORMAT_PROGRESSIVE /// DXVAHD_FRAME_FORMAT_PROGRESSIVE Progressive = unchecked((int)0), /// ///

Frames are interlaced. The top field of each frame is displayed first.

///
/// /// dd318431 /// DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST /// DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST InterlacedTopFieldFirst = unchecked((int)1), /// ///

Frame are interlaced. The bottom field of each frame is displayed first.

///
/// /// dd318431 /// DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST /// DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST InterlacedBottomFieldFirst = unchecked((int)2), } /// ///

Defines capabilities related to input formats for a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.

///
/// ///

These flags define video processing capabilities that are usually not needed, and therefore are not required for DXVA-HD devices to support.

The first three flags relate to RGB support for functions that are normally applied to YCbCr video: deinterlacing, color adjustment, and luma keying. A DXVA-HD device that supports these functions for YCbCr is not required to support them for RGB input. Supporting RGB input for these functions is an additional capability, reflected by these constants. The driver might convert the input to another color space, perform the indicated function, and then convert the result back to RGB.

Similarly, a device that supports de-interlacing is not required to support deinterlacing of palettized formats. This capability is indicated by the flag.

///
/// /// dd318433 /// DXVAHD_INPUT_FORMAT_CAPS /// DXVAHD_INPUT_FORMAT_CAPS public enum InputFormatCaps : int { /// ///

The device can deinterlace an input stream that contains interlaced RGB video.

///
/// /// dd318433 /// DXVAHD_INPUT_FORMAT_CAPS_RGB_INTERLACED /// DXVAHD_INPUT_FORMAT_CAPS_RGB_INTERLACED RgbInterlaced = unchecked((int)1), /// ///

The device can perform color adjustment on RGB video.

///
/// /// dd318433 /// DXVAHD_INPUT_FORMAT_CAPS_RGB_PROCAMP /// DXVAHD_INPUT_FORMAT_CAPS_RGB_PROCAMP RgbProcamp = unchecked((int)2), /// ///

The device can perform luma keying on RGB video.

///
/// /// dd318433 /// DXVAHD_INPUT_FORMAT_CAPS_RGB_LUMA_KEY /// DXVAHD_INPUT_FORMAT_CAPS_RGB_LUMA_KEY RgbLumaKey = unchecked((int)4), /// ///

The device can deinterlace input streams with palettized color formats.

///
/// /// dd318433 /// DXVAHD_INPUT_FORMAT_CAPS_PALETTE_INTERLACED /// DXVAHD_INPUT_FORMAT_CAPS_PALETTE_INTERLACED PaletteInterlaced = unchecked((int)8), } /// ///

Specifies the inverse telecine (IVTC) capabilities of a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) video processor.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS /// DXVAHD_ITELECINE_CAPS public enum ItelecineCaps : int { /// ///

The video processor can reverse 3:2 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_32 /// DXVAHD_ITELECINE_CAPS_32 Reverse32 = unchecked((int)1), /// ///

The video processor can reverse 2:2 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_22 /// DXVAHD_ITELECINE_CAPS_22 Reverse22 = unchecked((int)2), /// ///

The video processor can reverse 2:2:2:4 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_2224 /// DXVAHD_ITELECINE_CAPS_2224 Reverse2224 = unchecked((int)4), /// ///

The video processor can reverse 2:3:3:2 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_2332 /// DXVAHD_ITELECINE_CAPS_2332 Reverse2332 = unchecked((int)8), /// ///

The video processor can reverse 3:2:3:2:2 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_32322 /// DXVAHD_ITELECINE_CAPS_32322 Reverse32322 = unchecked((int)16), /// ///

The video processor can reverse 5:5 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_55 /// DXVAHD_ITELECINE_CAPS_55 Reverse55 = unchecked((int)32), /// ///

The video processor can reverse 6:4 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_64 /// DXVAHD_ITELECINE_CAPS_64 Reverse64 = unchecked((int)64), /// ///

The video processor can reverse 8:7 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_87 /// DXVAHD_ITELECINE_CAPS_87 Reverse87 = unchecked((int)128), /// ///

The video processor can reverse 2:2:2:2:2:2:2:2:2:2:2:3 pulldown.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_222222222223 /// DXVAHD_ITELECINE_CAPS_222222222223 Reverse222222222223 = unchecked((int)256), /// ///

The video processor can reverse other telecine modes not listed here.

///
/// /// dd318435 /// DXVAHD_ITELECINE_CAPS_OTHER /// DXVAHD_ITELECINE_CAPS_OTHER ReverseOTHER = unchecked((int)-2147483648), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0004 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0004 public enum NoiseDetailFilter : int { /// /// No documentation. /// /// /// DXVA2_NoiseFilterLumaLevel /// DXVA2_NoiseFilterLumaLevel NoiseLumaLevel = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_NoiseFilterLumaThreshold /// DXVA2_NoiseFilterLumaThreshold NoiseLumaThreshold = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_NoiseFilterLumaRadius /// DXVA2_NoiseFilterLumaRadius NoiseLumaRadius = unchecked((int)3), /// /// No documentation. /// /// /// DXVA2_NoiseFilterChromaLevel /// DXVA2_NoiseFilterChromaLevel NoiseChromaLevel = unchecked((int)4), /// /// No documentation. /// /// /// DXVA2_NoiseFilterChromaThreshold /// DXVA2_NoiseFilterChromaThreshold NoiseChromaThreshold = unchecked((int)5), /// /// No documentation. /// /// /// DXVA2_NoiseFilterChromaRadius /// DXVA2_NoiseFilterChromaRadius NoiseChromaRadius = unchecked((int)6), /// /// No documentation. /// /// /// DXVA2_DetailFilterLumaLevel /// DXVA2_DetailFilterLumaLevel DetailLumaLevel = unchecked((int)7), /// /// No documentation. /// /// /// DXVA2_DetailFilterLumaThreshold /// DXVA2_DetailFilterLumaThreshold DetailLumaThreshold = unchecked((int)8), /// /// No documentation. /// /// /// DXVA2_DetailFilterLumaRadius /// DXVA2_DetailFilterLumaRadius DetailLumaRadius = unchecked((int)9), /// /// No documentation. /// /// /// DXVA2_DetailFilterChromaLevel /// DXVA2_DetailFilterChromaLevel DetailChromaLevel = unchecked((int)10), /// /// No documentation. /// /// /// DXVA2_DetailFilterChromaThreshold /// DXVA2_DetailFilterChromaThreshold DetailChromaThreshold = unchecked((int)11), /// /// No documentation. /// /// /// DXVA2_DetailFilterChromaRadius /// DXVA2_DetailFilterChromaRadius DetailChromaRadius = unchecked((int)12), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0005 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0005 public enum NoiseFilterTechnology : int { /// /// No documentation. /// /// /// DXVA2_NoiseFilterTech_Unsupported /// DXVA2_NoiseFilterTech_Unsupported Unsupported = unchecked((int)0), /// /// No documentation. /// /// /// DXVA2_NoiseFilterTech_Unknown /// DXVA2_NoiseFilterTech_Unknown Unknown = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_NoiseFilterTech_Median /// DXVA2_NoiseFilterTech_Median Median = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_NoiseFilterTech_Temporal /// DXVA2_NoiseFilterTech_Temporal Temporal = unchecked((int)4), /// /// No documentation. /// /// /// DXVA2_NoiseFilterTech_BlockNoise /// DXVA2_NoiseFilterTech_BlockNoise BlockNoise = unchecked((int)8), /// /// No documentation. /// /// /// DXVA2_NoiseFilterTech_MosquitoNoise /// DXVA2_NoiseFilterTech_MosquitoNoise MosquitoNoise = unchecked((int)16), } /// ///

Describes how to map color data to a normalized [0...1] range.

These flags are used in the structure. They indicate whether the range of color values includes headroom (values above 100% white) and toeroom (values below reference black).

///
/// ///

For YUV colors, these flags specify how to convert between Y'CbCr and Y'PbPr. The Y'PbPr color space has a range of [0..1] for Y' (luma) and [-0.5...0.5] for Pb/Pr (chroma).

ValueDescription
Should not be used for YUV data.

For 8-bit Y'CbCr components:

  • Y' range of [0...1] maps to [16..235] for 8-bit Y' values.

  • Pb/Pr ranges of [-0.5...0.5] map to [16...240] for 8-bit Cb/Cr values.

For samples with n bits of precision, the general equations are:

  • Y' = (Y' * 219 + 16) * 2 ^ (n-8)

  • Cb = (Pb * 224 + 128) * 2 ^ (n-8)

  • Cr = (Pr * 224 + 128) * 2 ^ (n-8)

The inverse equations to convert from Y'CbCr to Y'PbPr are:

  • Y' = (Y' / 2 ^ (n-8) - 16) / 219

  • Pb = (Cb / 2 ^ (n-8) - 128) / 224

  • Pr = (Cr / 2 ^ (n-8) - 128) / 224

For 8-bit Y'CbCr values, Y' range of [0..1] maps to [48...208].

?

For RGB colors, the flags differentiate various RGB spaces.

ValueDescription
sRGB
Studio RGB; ITU-R BT.709
ITU-R BT.1361 RGB

?

Video data might contain values above or below the nominal range.

Note??The values named and are a potential source of confusion. Wide refers to the possible range of analog values that can be represented, by mapping the nominal range [0...1] into a narrower range of digital values. Because the meaning of wide in this context is ambiguous, the equivalent values named and are preferred. These names explicitly convey the meaning of the enumeration, and are less likely to be misinterpreted.

This enumeration is equivalent to the DXVA_NominalRange enumeration used in DXVA 1.0, although it defines additional values.

If you are using the interface to describe the video format, the nominal range is specified in the attribute.

///
/// /// bb970561 /// DXVA2_NominalRange /// DXVA2_NominalRange public enum NominalRange : int { /// /// No documentation. /// /// /// bb970561 /// DXVA2_NominalRangeMask /// DXVA2_NominalRangeMask Mask = unchecked((int)7), /// /// No documentation. /// /// /// bb970561 /// DXVA2_NominalRange_Unknown /// DXVA2_NominalRange_Unknown Unknown = unchecked((int)0), /// /// No documentation. /// /// /// bb970561 /// DXVA2_NominalRange_Normal /// DXVA2_NominalRange_Normal Normal = unchecked((int)1), /// /// No documentation. /// /// /// bb970561 /// DXVA2_NominalRange_Wide /// DXVA2_NominalRange_Wide Wide = unchecked((int)2), /// /// No documentation. /// /// /// bb970561 /// DXVA2_NominalRange_0_255 /// DXVA2_NominalRange_0_255 Range0_255 = unchecked((int)1), /// /// No documentation. /// /// /// bb970561 /// DXVA2_NominalRange_16_235 /// DXVA2_NominalRange_16_235 Range16_235 = unchecked((int)2), /// /// No documentation. /// /// /// bb970561 /// DXVA2_NominalRange_48_208 /// DXVA2_NominalRange_48_208 Range48_208 = unchecked((int)3), } /// ///

Specifies the output frame rates for an input stream, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).

This enumeration type is used in the structure.

///
/// /// dd318437 /// DXVAHD_OUTPUT_RATE /// DXVAHD_OUTPUT_RATE public enum OutputRate : int { /// /// No documentation. /// /// /// dd318437 /// DXVAHD_OUTPUT_RATE_NORMAL /// DXVAHD_OUTPUT_RATE_NORMAL Normal = unchecked((int)0), /// /// No documentation. /// /// /// dd318437 /// DXVAHD_OUTPUT_RATE_HALF /// DXVAHD_OUTPUT_RATE_HALF Half = unchecked((int)1), /// /// No documentation. /// /// /// dd318437 /// DXVAHD_OUTPUT_RATE_CUSTOM /// DXVAHD_OUTPUT_RATE_CUSTOM Custom = unchecked((int)2), } /// ///

Specifies the processing capabilities of a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) video processor.

///
/// /// dd318439 /// DXVAHD_PROCESSOR_CAPS /// DXVAHD_PROCESSOR_CAPS public enum ProcessorCaps : int { /// ///

The video processor can perform blend deinterlacing.

In blend deinterlacing, the two fields from an interlaced frame are blended into a single progressive frame. A video processor uses blend deinterlacing when it deinterlaces at half rate, as when converting 60i to 30p. Blend deinterlacing does not require reference frames.

///
/// /// dd318439 /// DXVAHD_PROCESSOR_CAPS_DEINTERLACE_BLEND /// DXVAHD_PROCESSOR_CAPS_DEINTERLACE_BLEND DeinterlaceBlend = unchecked((int)1), /// ///

The video processor can perform bob deinterlacing.

In bob deinterlacing, missing field lines are interpolated from the lines above and below. Bob deinterlacing does not require reference frames.

///
/// /// dd318439 /// DXVAHD_PROCESSOR_CAPS_DEINTERLACE_BOB /// DXVAHD_PROCESSOR_CAPS_DEINTERLACE_BOB DeinterlaceBob = unchecked((int)2), /// ///

The video processor can perform adaptive deinterlacing.

Adaptive deinterlacing uses spatial or temporal interpolation, and switches between the two on a field-by-field basis, depending on the amount of motion. If the video processor does not receive enough reference frames to perform adaptive deinterlacing, it falls back to bob deinterlacing.

///
/// /// dd318439 /// DXVAHD_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE /// DXVAHD_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE DeinterlaceAdaptive = unchecked((int)4), /// ///

The video processor can perform motion-compensated deinterlacing.

Motion-compensated deinterlacing uses motion vectors to recreate missing lines. If the video processor does not receive enough reference frames to perform motion-compensated deinterlacing, it falls back to bob deinterlacing.

///
/// /// dd318439 /// DXVAHD_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION /// DXVAHD_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION DeinterlaceMotionCompensation = unchecked((int)8), /// ///

The video processor can perform inverse telecine (IVTC).

If the video processor supports this capability, the ITelecineCaps member of the structure specifies which IVTC modes are supported.

///
/// /// dd318439 /// DXVAHD_PROCESSOR_CAPS_INVERSE_TELECINE /// DXVAHD_PROCESSOR_CAPS_INVERSE_TELECINE InverseTelecine = unchecked((int)16), /// ///

The video processor can convert the frame rate by interpolating frames.

///
/// /// dd318439 /// DXVAHD_PROCESSOR_CAPS_FRAME_RATE_CONVERSION /// DXVAHD_PROCESSOR_CAPS_FRAME_RATE_CONVERSION FrameRateConversion = unchecked((int)32), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0013 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0013 public enum RenderTargetType : int { /// /// No documentation. /// /// /// DXVA2_VideoDecoderRenderTarget /// DXVA2_VideoDecoderRenderTarget VideoDecoder = unchecked((int)0), /// /// No documentation. /// /// /// DXVA2_VideoProcessorRenderTarget /// DXVA2_VideoProcessorRenderTarget VideoProcessor = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_VideoSoftwareRenderTarget /// DXVA2_VideoSoftwareRenderTarget VideoSoftware = unchecked((int)2), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0010 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0010 public enum SampleData : int { /// /// No documentation. /// /// /// DXVA2_SampleData_RFF /// DXVA2_SampleData_RFF RepeatFirstFieldBit = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_SampleData_TFF /// DXVA2_SampleData_TFF TopFieldFirstBit = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_SampleData_RFF_TFF_Present /// DXVA2_SampleData_RFF_TFF_Present Both = unchecked((int)4), } /// ///

Describes the content of a video sample. These flags are used in the structure.

///
/// ///

This enumeration is equivalent to the DXVA_SampleFormat enumeration used in DXVA 1.0.

The following table shows the mapping from enumeration values, which are used in Media Foundation media types, to values.

Value Value
.
.
.
.
.
No exact match. Use as an initial value, then use the interlace flags from the media samples. For more information, see Video Interlacing.

?

With the exception of , each pair of corresponding enumeration values has the same numeric value.

The value has no equivalent in the enumeration.

///
/// /// ms699834 /// DXVA2_SampleFormat /// DXVA2_SampleFormat public enum SampleFormat : int { /// /// No documentation. /// /// /// ms699834 /// DXVA2_SampleFormatMask /// DXVA2_SampleFormatMask FormatMask = unchecked((int)255), /// /// No documentation. /// /// /// ms699834 /// DXVA2_SampleUnknown /// DXVA2_SampleUnknown Unknown = unchecked((int)0), /// /// No documentation. /// /// /// ms699834 /// DXVA2_SampleProgressiveFrame /// DXVA2_SampleProgressiveFrame ProgressiveFrame = unchecked((int)2), /// /// No documentation. /// /// /// ms699834 /// DXVA2_SampleFieldInterleavedEvenFirst /// DXVA2_SampleFieldInterleavedEvenFirst FieldInterleavedEvenFirst = unchecked((int)3), /// /// No documentation. /// /// /// ms699834 /// DXVA2_SampleFieldInterleavedOddFirst /// DXVA2_SampleFieldInterleavedOddFirst FieldInterleavedOddFirst = unchecked((int)4), /// /// No documentation. /// /// /// ms699834 /// DXVA2_SampleFieldSingleEven /// DXVA2_SampleFieldSingleEven FieldSingleEven = unchecked((int)5), /// /// No documentation. /// /// /// ms699834 /// DXVA2_SampleFieldSingleOdd /// DXVA2_SampleFieldSingleOdd FieldSingleOdd = unchecked((int)6), /// /// No documentation. /// /// /// ms699834 /// DXVA2_SampleSubStream /// DXVA2_SampleSubStream SubStream = unchecked((int)7), } /// ///

Specifies the luma key for an input stream, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).

///
/// ///

To use this state, the device must support luma keying, indicated by the capability flag. To query for this capability, call . If the device supports luma keying, it sets the flag in the FeatureCaps member of the structure.

If the device does not support luma keying, the method fails for this state.

If the input format is RGB, the device must also support the capability. This capability flag is set in the InputFormatCaps member of the structure. If the flag is not present, the device ignores the luma key value for RGB input.

The values of Lower and Upper give the lower and upper bounds of the luma key, using a nominal range of [0...1]. Given a format with n bits per channel, these values are converted to luma values as follows:

val = f * ((1 << n)-1)

Any pixel whose luma value falls within the upper and lower bounds (inclusive) is treated as transparent.

For example, if the pixel format uses 8-bit luma, the upper bound is calculated as follows:

BYTE Y = BYTE(max(min(1.0, Upper), 0.0) * 255.0)

Note that the value is clamped to the range [0...1] before multiplying by 255.

///
/// /// dd318766 /// DXVAHD_STREAM_STATE /// DXVAHD_STREAM_STATE public enum StreamState : int { /// ///

If TRUE, luma keying is enabled. Otherwise, luma keying is disabled. The default value is .

///
/// /// dd318766 /// DXVAHD_STREAM_STATE_D3DFORMAT /// DXVAHD_STREAM_STATE_D3DFORMAT D3DFORMAT = unchecked((int)0), /// ///

The lower bound for the luma key. The range is [0?1]. The default state value is 0.0.

///
/// /// dd318766 /// DXVAHD_STREAM_STATE_FRAME_FORMAT /// DXVAHD_STREAM_STATE_FRAME_FORMAT FrameFormat = unchecked((int)1), /// ///

The upper bound for the luma key. The range is [0?1]. The default state value is 0.0.

///
/// /// dd318766 /// DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE /// DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE InputColorSpace = unchecked((int)2), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_OUTPUT_RATE /// DXVAHD_STREAM_STATE_OUTPUT_RATE OutputRate = unchecked((int)3), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_SOURCE_RECT /// DXVAHD_STREAM_STATE_SOURCE_RECT SourceRectangle = unchecked((int)4), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_DESTINATION_RECT /// DXVAHD_STREAM_STATE_DESTINATION_RECT DestinationRectangle = unchecked((int)5), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_ALPHA /// DXVAHD_STREAM_STATE_ALPHA Alpha = unchecked((int)6), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_PALETTE /// DXVAHD_STREAM_STATE_PALETTE Palette = unchecked((int)7), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_LUMA_KEY /// DXVAHD_STREAM_STATE_LUMA_KEY LumaKey = unchecked((int)8), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_ASPECT_RATIO /// DXVAHD_STREAM_STATE_ASPECT_RATIO AspectRatio = unchecked((int)9), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_FILTER_BRIGHTNESS /// DXVAHD_STREAM_STATE_FILTER_BRIGHTNESS FilterBrightness = unchecked((int)100), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_FILTER_CONTRAST /// DXVAHD_STREAM_STATE_FILTER_CONTRAST FilterContrast = unchecked((int)101), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_FILTER_HUE /// DXVAHD_STREAM_STATE_FILTER_HUE FilterHue = unchecked((int)102), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_FILTER_SATURATION /// DXVAHD_STREAM_STATE_FILTER_SATURATION FilterSaturation = unchecked((int)103), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_FILTER_NOISE_REDUCTION /// DXVAHD_STREAM_STATE_FILTER_NOISE_REDUCTION FilterNoiseReduction = unchecked((int)104), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_FILTER_EDGE_ENHANCEMENT /// DXVAHD_STREAM_STATE_FILTER_EDGE_ENHANCEMENT FilterEdgeEnhancement = unchecked((int)105), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_FILTER_ANAMORPHIC_SCALING /// DXVAHD_STREAM_STATE_FILTER_ANAMORPHIC_SCALING FilterAnamorphicScaling = unchecked((int)106), /// /// No documentation. /// /// /// dd318766 /// DXVAHD_STREAM_STATE_PRIVATE /// DXVAHD_STREAM_STATE_PRIVATE Private = unchecked((int)1000), } /// ///

Describes a DirectX surface type for DirectX Video Acceleration (DXVA).

///
/// /// ms699850 /// DXVA2_SurfaceType /// DXVA2_SurfaceType public enum SurfaceType : int { /// ///

The surface is a decoder render target.

///
/// /// ms699850 /// DXVA2_SurfaceType_DecoderRenderTarget /// DXVA2_SurfaceType_DecoderRenderTarget SurfaceType_Decoder = unchecked((int)0), /// ///

The surface is a video processor render target.

///
/// /// ms699850 /// DXVA2_SurfaceType_ProcessorRenderTarget /// DXVA2_SurfaceType_ProcessorRenderTarget SurfaceType_Processor = unchecked((int)1), /// ///

The surface is a Direct3D texture render target.

///
/// /// ms699850 /// DXVA2_SurfaceType_D3DRenderTargetTexture /// DXVA2_SurfaceType_D3DRenderTargetTexture D3DRenderTargetTexture = unchecked((int)2), } /// ///

Specifies the type of video surface created by a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.

///
/// ///

If the DXVA-HD device is a software plug-in and the surface type is , the device can support format types that are not supported natively by the graphics driver. For example, if the application requests an AYUV surface, the device could allocate a surface with a surface type of .

///
/// /// dd318772 /// DXVAHD_SURFACE_TYPE /// DXVAHD_SURFACE_TYPE public enum SurfaceTypeHD : int { /// ///

A surface for an input stream. This surface type is equivalent to an off-screen plain surface in Microsoft Direct3D. The application can use the surface in Direct3D calls.

///
/// /// dd318772 /// DXVAHD_SURFACE_TYPE_VIDEO_INPUT /// DXVAHD_SURFACE_TYPE_VIDEO_INPUT VideoInput = unchecked((int)0), /// ///

A private surface for an input stream. This surface type is equivalent to an off-screen plain surface, except that the application cannot use the surface in Direct3D calls.

///
/// /// dd318772 /// DXVAHD_SURFACE_TYPE_VIDEO_INPUT_PRIVATE /// DXVAHD_SURFACE_TYPE_VIDEO_INPUT_PRIVATE VideoInputPrivate = unchecked((int)1), /// ///

A surface for an output stream. This surface type is equivalent to an off-screen plain surface in Direct3D. The application can use the surface in Direct3D calls.

This surface type is recommended for video processing applications that need to lock the surface and access the surface memory. For video playback with optimal performance, a render-target surface or swap chain is recommended instead.

///
/// /// dd318772 /// DXVAHD_SURFACE_TYPE_VIDEO_OUTPUT /// DXVAHD_SURFACE_TYPE_VIDEO_OUTPUT VideoOutput = unchecked((int)2), } /// ///

Describes how chroma values are positioned relative to the luma samples in a YUV video frame. These flags are used in the structure.

///
/// ///

The following diagrams show the most common arrangements.

///
/// /// ms694252 /// DXVA2_VideoChromaSubSampling /// DXVA2_VideoChromaSubSampling public enum VideoChromaSubSampling : int { /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsamplingMask /// DXVA2_VideoChromaSubsamplingMask SamplingMask = unchecked((int)15), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_Unknown /// DXVA2_VideoChromaSubsampling_Unknown SamplingUnknown = unchecked((int)0), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_ProgressiveChroma /// DXVA2_VideoChromaSubsampling_ProgressiveChroma SamplingProgressiveChroma = unchecked((int)8), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_Horizontally_Cosited /// DXVA2_VideoChromaSubsampling_Horizontally_Cosited SamplingHorizontallyCosited = unchecked((int)4), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_Vertically_Cosited /// DXVA2_VideoChromaSubsampling_Vertically_Cosited SamplingVerticallyCosited = unchecked((int)2), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes /// DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes SamplingVerticallyAlignedChromaPlanes = unchecked((int)1), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_MPEG2 /// DXVA2_VideoChromaSubsampling_MPEG2 SamplingMpeg2 = unchecked((int)5), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_MPEG1 /// DXVA2_VideoChromaSubsampling_MPEG1 SamplingMpeg1 = unchecked((int)1), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_DV_PAL /// DXVA2_VideoChromaSubsampling_DV_PAL SamplingDvPal = unchecked((int)6), /// /// No documentation. /// /// /// ms694252 /// DXVA2_VideoChromaSubsampling_Cosited /// DXVA2_VideoChromaSubsampling_Cosited SamplingCosited = unchecked((int)7), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0009 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0009 public enum VideoDeviceCapabilities : int { /// /// No documentation. /// /// /// DXVA2_VPDev_HardwareDevice /// DXVA2_VPDev_HardwareDevice HardwareDevice = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_VPDev_EmulatedDXVA1 /// DXVA2_VPDev_EmulatedDXVA1 EmulatedDXVA1 = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_VPDev_SoftwareDevice /// DXVA2_VPDev_SoftwareDevice SoftwareDevice = unchecked((int)4), } /// ///

Describes the intended lighting conditions for viewing video content. These flags are used in the structure.

///
/// ///

This enumeration is equivalent to the DXVA_VideoLighting enumeration used in DXVA 1.0.

If you are using the interface to describe the video format, the video lighting is specified in the attribute.

///
/// /// ms703932 /// DXVA2_VideoLighting /// DXVA2_VideoLighting public enum VideoLighting : int { /// /// No documentation. /// /// /// ms703932 /// DXVA2_VideoLightingMask /// DXVA2_VideoLightingMask Mask = unchecked((int)15), /// /// No documentation. /// /// /// ms703932 /// DXVA2_VideoLighting_Unknown /// DXVA2_VideoLighting_Unknown Unknown = unchecked((int)0), /// /// No documentation. /// /// /// ms703932 /// DXVA2_VideoLighting_bright /// DXVA2_VideoLighting_bright Bright = unchecked((int)1), /// /// No documentation. /// /// /// ms703932 /// DXVA2_VideoLighting_office /// DXVA2_VideoLighting_office Office = unchecked((int)2), /// /// No documentation. /// /// /// ms703932 /// DXVA2_VideoLighting_dim /// DXVA2_VideoLighting_dim Dim = unchecked((int)3), /// /// No documentation. /// /// /// ms703932 /// DXVA2_VideoLighting_dark /// DXVA2_VideoLighting_dark Dark = unchecked((int)4), } /// ///

Specifies the color primaries of a video source. These flags are used in the structure.

///
/// ///

Color primaries define how to convert RGB colors into the CIE XYZ color space, and can be used to translate colors between different RGB color spaces. An RGB color space is defined by the chromaticity coordinates (x,y) of the RGB primaries plus the white point, as listed in the following table.

Color space(Rx, Ry)(Gx, Gy)(Bx, By)White point (Wx, Wy)
BT.709(0.64, 0.33)(0.30, 0.60)(0.15, 0.06) D65 (0.3127, 0.3290)
BT.470-2 System M; EBU 3212 (0.64, 0.33)(0.29, 0.60)(0.15, 0.06) D65 (0.3127, 0.3290)
BT.470-4 System B,G(0.67, 0.33)(0.21, 0.71)(0.14, 0.08) CIE III.C (0.310, 0.316)
SMPTE 170M; SMPTE 240M; SMPTE C (0.63, 0.34)(0.31, 0.595)(0.155, 0.07) D65 (0.3127, 0.3291)

?

The z coordinates can be derived from x and y as follows: z = 1 - x - y. To convert between RGB colors to CIE XYZ tristimulus values, compute a matrix T as follows:

Given T, you can use the following formulas to convert between an RGB color value and a CIE XYZ tristimulus value. These formulas assume that the RGB components are linear (not gamma corrected) and are normalized to the range [0...1].

To convert colors directly from one RGB color space to another, use the following formula, where T1 is the matrix for color space RGB1, and T2 is the matrix for color space RGB2.

For a derivation of these formulas, refer to Charles Poynton, Digital Video and HDTV Algorithms and Interfaces (Morgan Kaufmann, 2003).

This enumeration is equivalent to the DXVA_VideoPrimaries enumeration used in DXVA 1.0.

If you are using the interface to describe the video format, the color primaries are specified in the attribute.

///
/// /// ms696997 /// DXVA2_VideoPrimaries /// DXVA2_VideoPrimaries public enum VideoPrimaries : int { /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimariesMask /// DXVA2_VideoPrimariesMask Mask = unchecked((int)31), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_Unknown /// DXVA2_VideoPrimaries_Unknown Unknown = unchecked((int)0), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_reserved /// DXVA2_VideoPrimaries_reserved Reserved = unchecked((int)1), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_BT709 /// DXVA2_VideoPrimaries_BT709 Bt709 = unchecked((int)2), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_BT470_2_SysM /// DXVA2_VideoPrimaries_BT470_2_SysM Bt4702SysM = unchecked((int)3), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_BT470_2_SysBG /// DXVA2_VideoPrimaries_BT470_2_SysBG Bt4702SysBG = unchecked((int)4), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_SMPTE170M /// DXVA2_VideoPrimaries_SMPTE170M Smpte170m = unchecked((int)5), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_SMPTE240M /// DXVA2_VideoPrimaries_SMPTE240M Smpte240m = unchecked((int)6), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_EBU3213 /// DXVA2_VideoPrimaries_EBU3213 Ebu3213 = unchecked((int)7), /// /// No documentation. /// /// /// ms696997 /// DXVA2_VideoPrimaries_SMPTE_C /// DXVA2_VideoPrimaries_SMPTE_C SmpteC = unchecked((int)8), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0008 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0008 public enum VideoProcessorOperations : int { /// /// No documentation. /// /// /// DXVA2_VideoProcess_None /// DXVA2_VideoProcess_None None = unchecked((int)0), /// /// No documentation. /// /// /// DXVA2_VideoProcess_YUV2RGB /// DXVA2_VideoProcess_YUV2RGB Yuv2rgb = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_VideoProcess_StretchX /// DXVA2_VideoProcess_StretchX StretchX = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_VideoProcess_StretchY /// DXVA2_VideoProcess_StretchY StretchY = unchecked((int)4), /// /// No documentation. /// /// /// DXVA2_VideoProcess_AlphaBlend /// DXVA2_VideoProcess_AlphaBlend AlphaBlend = unchecked((int)8), /// /// No documentation. /// /// /// DXVA2_VideoProcess_SubRects /// DXVA2_VideoProcess_SubRects SubRects = unchecked((int)16), /// /// No documentation. /// /// /// DXVA2_VideoProcess_SubStreams /// DXVA2_VideoProcess_SubStreams SubStreams = unchecked((int)32), /// /// No documentation. /// /// /// DXVA2_VideoProcess_SubStreamsExtended /// DXVA2_VideoProcess_SubStreamsExtended SubStreamsExtended = unchecked((int)64), /// /// No documentation. /// /// /// DXVA2_VideoProcess_YUV2RGBExtended /// DXVA2_VideoProcess_YUV2RGBExtended YUV2RGBExtended = unchecked((int)128), /// /// No documentation. /// /// /// DXVA2_VideoProcess_AlphaBlendExtended /// DXVA2_VideoProcess_AlphaBlendExtended AlphaBlendExtended = unchecked((int)256), /// /// No documentation. /// /// /// DXVA2_VideoProcess_Constriction /// DXVA2_VideoProcess_Constriction Constriction = unchecked((int)512), /// /// No documentation. /// /// /// DXVA2_VideoProcess_NoiseFilter /// DXVA2_VideoProcess_NoiseFilter NoiseFilter = unchecked((int)1024), /// /// No documentation. /// /// /// DXVA2_VideoProcess_DetailFilter /// DXVA2_VideoProcess_DetailFilter DetailFilter = unchecked((int)2048), /// /// No documentation. /// /// /// DXVA2_VideoProcess_PlanarAlpha /// DXVA2_VideoProcess_PlanarAlpha PlanarAlpha = unchecked((int)4096), /// /// No documentation. /// /// /// DXVA2_VideoProcess_LinearScaling /// DXVA2_VideoProcess_LinearScaling LinearScaling = unchecked((int)8192), /// /// No documentation. /// /// /// DXVA2_VideoProcess_GammaCompensated /// DXVA2_VideoProcess_GammaCompensated GammaCompensated = unchecked((int)16384), /// /// No documentation. /// /// /// DXVA2_VideoProcess_MaintainsOriginalFieldData /// DXVA2_VideoProcess_MaintainsOriginalFieldData MaintainsOriginalFieldData = unchecked((int)32768), } /// /// No documentation. /// /// /// __MIDL___MIDL_itf_dxva2api_0000_0000_0007 /// __MIDL___MIDL_itf_dxva2api_0000_0000_0007 public enum VideoProcessorSettings : int { /// /// No documentation. /// /// /// DXVA2_ProcAmp_None /// DXVA2_ProcAmp_None None = unchecked((int)0), /// /// No documentation. /// /// /// DXVA2_ProcAmp_Brightness /// DXVA2_ProcAmp_Brightness Brightness = unchecked((int)1), /// /// No documentation. /// /// /// DXVA2_ProcAmp_Contrast /// DXVA2_ProcAmp_Contrast Contrast = unchecked((int)2), /// /// No documentation. /// /// /// DXVA2_ProcAmp_Hue /// DXVA2_ProcAmp_Hue Hue = unchecked((int)4), /// /// No documentation. /// /// /// DXVA2_ProcAmp_Saturation /// DXVA2_ProcAmp_Saturation Saturation = unchecked((int)8), } /// ///

Specifies the conversion function from linear RGB to non-linear RGB (R'G'B'). These flags are used in the Structure.

///
/// ///

The following table shows the formulas for the most common transfer functions. In these formulas, L is the linear value and L' is the non-linear (gamma corrected) value. These values are relative to a normalized range [0...1].

Color spaceTransfer function
sRGB (8-bit)

L' = 12.92L, for L < 0.031308

L' = 1.055L^1/2.4? 0.055, for L >= 0.031308

BT.470-2 System B, GL' = L^0.36
BT.470-2 System ML' = L^0.45
BT.709

L' = 4.50L, for L < 0.018

L' = 1.099L^0.45? 0.099, for L >= 0.018

scRGBL' = L
SMPTE 240M

L' = 4.0L, for L < 0.0228

L' = 1.1115L^0.45? 0.01115, for L >= 0.0228

?

The following table shows the inverse formulas to obtain the original gamma-corrected values:

Color spaceTransfer function
sRGB (8-bit)

L = 1/12.92L', for L' < 0.03928

L = ((L' + 0.055)/1055)^2.4, for L' >= 0.03928

BT.470-2 System B, GL = L'^1/0.36
BT.470-2 System ML = L'^1/0.45
BT.709

L = L'/4.50, for L' < 0.081

L = ((L' + 0.099) / 1.099)^1/0.45, for L' >= 0.081

scRGBL = L'
SMPTE 240M

L = L'/4.0, for L' < 0.0913

L= ((L' + 0.1115)/1.1115)^1/0.45, for L' >= 0.0913

?

This enumeration is equivalent to the DXVA_VideoTransferFunction enumeration used in DXVA 1.0.

If you are using the interface to describe the video format, the transfer function is specified in the attribute.

///
/// /// bb970392 /// DXVA2_VideoTransferFunction /// DXVA2_VideoTransferFunction public enum VideoTransferFunction : int { /// ///

Bitmask to validate flag values. This value is not a valid flag.

///
/// /// bb970392 /// DXVA2_VideoTransFuncMask /// DXVA2_VideoTransFuncMask FuncMask = unchecked((int)31), /// ///

Unknown. Treat as .

///
/// /// bb970392 /// DXVA2_VideoTransFunc_Unknown /// DXVA2_VideoTransFunc_Unknown FuncUnknown = unchecked((int)0), /// ///

Linear RGB (gamma = 1.0).

///
/// /// bb970392 /// DXVA2_VideoTransFunc_10 /// DXVA2_VideoTransFunc_10 Func10 = unchecked((int)1), /// ///

True 1.8 gamma, L' = L^1/1.8.

///
/// /// bb970392 /// DXVA2_VideoTransFunc_18 /// DXVA2_VideoTransFunc_18 Func18 = unchecked((int)2), /// ///

True 2.0 gamma, L' = L^1/2.0.

///
/// /// bb970392 /// DXVA2_VideoTransFunc_20 /// DXVA2_VideoTransFunc_20 Func20 = unchecked((int)3), /// ///

True 2.2 gamma, L' = L^1/2.2. This transfer function is used in ITU-R BT.470-2 System M (NTSC).

///
/// /// bb970392 /// DXVA2_VideoTransFunc_22 /// DXVA2_VideoTransFunc_22 Func22 = unchecked((int)4), /// ///

ITU-R BT.709 transfer function. Gamma 2.2 curve with a linear segment in the lower range. This transfer function is used in BT.709, BT.601, SMPTE 296M, SMPTE 170M, BT.470, and SMPTE 274M. In addition BT-1361 uses this function within the range [0...1].

///
/// /// bb970392 /// DXVA2_VideoTransFunc_709 /// DXVA2_VideoTransFunc_709 Func709 = unchecked((int)5), /// ///

SMPTE 240M transfer function. Gamma 2.2 curve with a linear segment in the lower range.

///
/// /// bb970392 /// DXVA2_VideoTransFunc_240M /// DXVA2_VideoTransFunc_240M Func240m = unchecked((int)6), /// ///

sRGB transfer function. Gamma 2.4 curve with a linear segment in the lower range.

///
/// /// bb970392 /// DXVA2_VideoTransFunc_sRGB /// DXVA2_VideoTransFunc_sRGB FuncSRGB = unchecked((int)7), /// ///

True 2.8 gamma. L' = L^1/2.8. This transfer function is used in ITU-R BT.470-2 System B, G (PAL).

///
/// /// bb970392 /// DXVA2_VideoTransFunc_28 /// DXVA2_VideoTransFunc_28 Func28 = unchecked((int)8), } /// ///

Describes the conversion matrices between Y'PbPr (component video) and studio R'G'B'. These flags are used in the structure.

///
/// ///

The transfer matrices are defined as follows.

BT.709 transfer matrices:

Y' 0.212600 0.715200 0.072200 R' /// Pb = -0.114572 -0.385428 0.500000 x G' /// Pr 0.500000 -0.454153 -0.045847 B' R' 1.000000 0.000000 1.574800 Y' /// G' = 1.000000 -0.187324 -0.468124 x Pb /// B' 1.000000 1.855600 0.000000 Pr ///

BT.601 transfer matrices:

Y' 0.299000 0.587000 0.114000 R' /// Pb = -0.168736 -0.331264 0.500000 x G' /// Pr 0.500000 -0.418688 -0.081312 B' R' 1.000000 0.000000 1.402000 Y' /// G' = 1.000000 -0.344136 -0.714136 x Pb /// B' 1.000000 1.772000 0.000000 Pr ///

SMPTE 240M (SMPTE RP 145) transfer matrices:

Y' 0.212000 0.701000 0.087000 R' /// Pb = -0.116000 -0.384000 0.500000 x G' /// Pr 0.500000 -0.445000 -0.055000 B' R' 1.000000 -0.000000 1.576000 Y' /// G' = 1.000000 -0.227000 -0.477000 x Pb /// B' 1.000000 1.826000 0.000000 Pr ///

This enumeration is equivalent to the DXVA_VideoTransferMatrix enumeration used in DXVA 1.0.

If you are using the interface to describe the video format, the video transfer matrix is specified in the attribute.

///
/// /// ms698715 /// DXVA2_VideoTransferMatrix /// DXVA2_VideoTransferMatrix public enum VideoTransferMatrix : int { /// /// No documentation. /// /// /// ms698715 /// DXVA2_VideoTransferMatrixMask /// DXVA2_VideoTransferMatrixMask Mask = unchecked((int)7), /// /// No documentation. /// /// /// ms698715 /// DXVA2_VideoTransferMatrix_Unknown /// DXVA2_VideoTransferMatrix_Unknown Unknown = unchecked((int)0), /// /// No documentation. /// /// /// ms698715 /// DXVA2_VideoTransferMatrix_BT709 /// DXVA2_VideoTransferMatrix_BT709 Bt709 = unchecked((int)1), /// /// No documentation. /// /// /// ms698715 /// DXVA2_VideoTransferMatrix_BT601 /// DXVA2_VideoTransferMatrix_BT601 Bt601 = unchecked((int)2), /// /// No documentation. /// /// /// ms698715 /// DXVA2_VideoTransferMatrix_SMPTE240M /// DXVA2_VideoTransferMatrix_SMPTE240M Smpte240m = unchecked((int)3), } } #endif