// 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:08 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 282
#pragma warning disable 649
#pragma warning disable 419
#pragma warning disable 1587
#pragma warning disable 1574
///
/// Contains an initialization vector (IV) for 128-bit Advanced Encryption Standard CTR mode (AES-CTR) block cipher encryption.
///
///
/// For AES-CTR encyption, the pvPVPState member of the structure points to a structure.
The D3DAES_CTR_IV structure and the structure are equivalent.
///
///
/// ff728850
/// DXVA2_AES_CTR_IV
/// DXVA2_AES_CTR_IV
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
public partial struct AesCtrIv {
///
/// The IV, in big-endian format.
///
///
/// ff728850
/// unsigned longlong IV
/// unsigned longlong IV
public long Iv;
///
/// The block count, in big-endian format.
///
///
/// ff728850
/// unsigned longlong Count
/// unsigned longlong Count
public long Count;
}
///
///
Defines a 16-bit AYUV pixel value.
///
///
/// bb970388
/// DXVA2_AYUVSample16
/// DXVA2_AYUVSample16
[StructLayout(LayoutKind.Sequential, Pack = 2 )]
public partial struct AYUVSample16 {
///
/// Contains the Cr chroma value (also called V).
///
///
/// bb970388
/// unsigned short Cr
/// unsigned short Cr
public short Cr;
///
/// Contains the Cb chroma value (also called U).
///
///
/// bb970388
/// unsigned short Cb
/// unsigned short Cb
public short Cb;
///
/// Contains the luma value.
///
///
/// bb970388
/// unsigned short Y
/// unsigned short Y
public short Y;
///
/// Contains the alpha value.
///
///
/// bb970388
/// unsigned short Alpha
/// unsigned short Alpha
public short Alpha;
}
///
///
Defines an 8-bit AYUV pixel value.
///
///
/// bb970398
/// DXVA2_AYUVSample8
/// DXVA2_AYUVSample8
[StructLayout(LayoutKind.Sequential, Pack = 1 )]
public partial struct AYUVSample8 {
///
/// Contains the Cr chroma value (also called V).
///
///
/// bb970398
/// unsigned char Cr
/// unsigned char Cr
public byte Cr;
///
/// Contains the Cb chroma value (also called U).
///
///
/// bb970398
/// unsigned char Cb
/// unsigned char Cb
public byte Cb;
///
/// Contains the luma value.
///
///
/// bb970398
/// unsigned char Y
/// unsigned char Y
public byte Y;
///
/// Contains the alpha value.
///
///
/// bb970398
/// unsigned char Alpha
/// unsigned char Alpha
public byte Alpha;
}
///
/// Specifies how the output alpha values are calculated for blit operations when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// dd318391
/// DXVAHD_BLT_STATE_ALPHA_FILL_DATA
/// DXVAHD_BLT_STATE_ALPHA_FILL_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct BlitStateAlphaFillData {
///
/// Specifies the alpha fill mode, as a member of the enumeration.
If the FeatureCaps member of the structure does not contain the flag, the alpha fill mode must be set to .
The default state value is .
///
///
/// dd318391
/// DXVAHD_ALPHA_FILL_MODE Mode
/// DXVAHD_ALPHA_FILL_MODE Mode
public SharpDX.MediaFoundation.DirectX.AlphaFillMode Mode;
///
/// Zero-based index of the input stream to use for the alpha values. This member is used when the alpha fill mode is ; otherwise, the value is ignored.
To get the maximum number of streams, call and check the MaxStreamStates member of the structure.
///
///
/// dd318391
/// unsigned int StreamNumber
/// unsigned int StreamNumber
public int StreamNumber;
}
///
/// Specifies the background color for blit operations, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// The background color is used to fill the target rectangle wherever no video image appears. Areas outside the target rectangle are not affected. See .
The color space of the background color is determined by the color space of the output. See .
The alpha value of the background color is used only when the alpha fill mode is . Otherwise, the alpha value is ignored. See .
The default background color is full-range RGB black, with opaque alpha.
///
///
/// dd318392
/// DXVAHD_BLT_STATE_BACKGROUND_COLOR_DATA
/// DXVAHD_BLT_STATE_BACKGROUND_COLOR_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct BlitStateBackgroundColorData {
///
/// If TRUE, the BackgroundColor member specifies a YCbCr color. Otherwise, it specifies an RGB color. The default device state is (RGB color).
///
///
/// dd318392
/// BOOL YCbCr
/// BOOL YCbCr
public SharpDX.Mathematics.Interop.RawBool YCbCr;
///
/// A union that specifies the background color. The default state value is (0.0, 0.0, 0.0, 1.0).
///
///
/// dd318392
/// DXVAHD_COLOR BackgroundColor
/// DXVAHD_COLOR BackgroundColor
public SharpDX.MediaFoundation.DirectX.Color BackgroundColor;
}
///
/// Specifies whether the output is downsampled in a blit operation, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// If the Enable member is TRUE, the device downsamples the composed target rectangle to the size given in the Size member, and then scales it back to the size of the target rectangle.
The width and height of Size must be greater than zero. If the size is larger than the target rectangle, downsampling does not occur.
To use this state, the device must support downsampling, indicated by the capability flag. To query for this capability, call . If the device supports downsampling, it sets the flag in the FeatureCaps member of the structure.
If the device does not support downsampling, the method fails for this state.
Downsampling is sometimes used to reduce the quality of premium content when other forms of content protection are not available.
///
///
/// dd318394
/// DXVAHD_BLT_STATE_CONSTRICTION_DATA
/// DXVAHD_BLT_STATE_CONSTRICTION_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct BlitStateConstrictionData {
///
/// If TRUE, downsampling is enabled. Otherwise, downsampling is disabled and the Size member is ignored. The default state value is (downsampling is disabled).
///
///
/// dd318394
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// The sampling size. The default value is (1,1).
///
///
/// dd318394
/// SIZE Size
/// SIZE Size
public SharpDX.Size2 Size;
}
///
/// Specifies the output color space for blit operations, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// The RGB_Range member applies to RGB output, while the YCbCr_Matrix and YCbCr_xvYCC members apply to YCbCr (YUV) output. If the device performs color-space conversion on the background color, it uses the values that apply to both color spaces.
Extended YCbCr can be used with either transfer matrix. Extended YCbCr does not change the black point or white point?the black point is still 16 and the white point is still 235. However, extended YCbCr explicitly allows blacker-than-black values in the range 1?15, and whiter-than-white values in the range 236?254. When extended YCbCr is used, the driver should not clip the luma values to the nominal 16?235 range.
If the device supports extended YCbCr, it sets the capability flag in the DeviceCaps member of the structure. Otherwise, the device ignores the value of the YCbCr_xvYCC member and treats all YCbCr output as conventional YCbCr. To get the device's capabilities, call .
If the output format is a wide-gamut RGB format, output might fall outside the nominal [0...1] range of sRGB. This is particularly true if one or more input streams use extended YCbCr.
///
///
/// dd318395
/// DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA
/// DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA
[StructLayout(LayoutKind.Explicit, Pack = 0 )]
public partial struct BlitStateOutputColorSpaceData {
///
/// Specifies whether the output is intended for playback or video processing (such as editing or authoring). The device can optimize the processing based on the type. The default state value is 0 (playback).
| Value | Meaning |
- 0
| Playback. |
- 1
| Video processing. |
?
///
///
/// dd318395
/// unsigned int Usage
/// unsigned int Usage
public bool Usage {
get {
return 0 != ((_Usage >> 0) & 1);
}
set {
_Usage = (int)((_Usage & ~( 1 << 0)) | ( ( (value?1:0) & 1) << 0));
}
}
[FieldOffset(0)]
internal int _Usage;
///
/// Specifies the RGB color range. The default state value is 0 (full range).
| Value | Meaning |
- 0
| Full range (0-255). |
- 1
| Limited range (16-235). |
?
///
///
/// dd318395
/// unsigned int RGB_Range
/// unsigned int RGB_Range
public bool RgbRange {
get {
return 0 != ((_RgbRange >> 1) & 1);
}
set {
_RgbRange = (int)((_RgbRange & ~( 1 << 1)) | ( ( (value?1:0) & 1) << 1));
}
}
[FieldOffset(0)]
internal int _RgbRange;
///
/// Specifies the YCbCr transfer matrix. The default state value is 0 (BT.601).
| Value | Meaning |
- 0
| ITU-R BT.601. |
- 1
| ITU-R BT.709. |
?
///
///
/// dd318395
/// unsigned int YCbCr_Matrix
/// unsigned int YCbCr_Matrix
public bool YCbCrMatrix {
get {
return 0 != ((_YCbCrMatrix >> 2) & 1);
}
set {
_YCbCrMatrix = (int)((_YCbCrMatrix & ~( 1 << 2)) | ( ( (value?1:0) & 1) << 2));
}
}
[FieldOffset(0)]
internal int _YCbCrMatrix;
///
/// Specifies whether the output uses conventional YCbCr or extended YCbCr (xvYCC). The default state value is zero (conventional YCbCr).
| Value | Meaning |
- 0
| Conventional YCbCr. |
- 1
| Extended YCbCr (xvYCC). |
?
///
///
/// dd318395
/// unsigned int YCbCr_xvYCC
/// unsigned int YCbCr_xvYCC
public bool YCbCrXvYCC {
get {
return 0 != ((_YCbCrXvYCC >> 3) & 1);
}
set {
_YCbCrXvYCC = (int)((_YCbCrXvYCC & ~( 1 << 3)) | ( ( (value?1:0) & 1) << 3));
}
}
[FieldOffset(0)]
internal int _YCbCrXvYCC;
///
/// No documentation.
///
///
/// dd318395
/// unsigned int Reserved
/// unsigned int Reserved
public int Reserved {
get {
return (int)((_Reserved >> 4) & 268435455);
}
set {
_Reserved = (int)((_Reserved & ~( 268435455 << 4)) | ( (value & 268435455) << 4));
}
}
[FieldOffset(0)]
internal int _Reserved;
///
/// No documentation.
///
///
/// dd318395
/// unsigned int Value
/// unsigned int Value
[FieldOffset(0)]
public int Value;
}
///
/// Contains data for a private blit state for Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// Use this structure for proprietary or device-specific state parameters.
The caller allocates the pData array. Set the DataSize member to the size of the array in bytes. When retrieving the state data, you can set pData to null to get the size of the data. The device will return the size in the DataSize member.
///
///
/// dd318397
/// DXVAHD_BLT_STATE_PRIVATE_DATA
/// DXVAHD_BLT_STATE_PRIVATE_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct BlitStatePrivateData {
///
/// A that identifies the private state. The meaning of this value is defined by the device.
///
///
/// dd318397
/// GUID Guid
/// GUID Guid
public System.Guid Guid;
///
/// The size, in bytes, of the buffer pointed to by the pData member.
///
///
/// dd318397
/// unsigned int DataSize
/// unsigned int DataSize
public int DataSize;
///
/// A reference to a buffer that contains the private state data. The DXVA-HD runtime passes this buffer directly to the device without validation.
///
///
/// dd318397
/// void* pData
/// void pData
public System.IntPtr PData;
}
///
/// Specifies the target rectangle for blitting, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// dd318400
/// DXVAHD_BLT_STATE_TARGET_RECT_DATA
/// DXVAHD_BLT_STATE_TARGET_RECT_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct BlitStateTargetRectangleData {
///
/// Specifies whether to use the target rectangle. The default state value is .
| Value | Meaning |
- TRUE
| Use the target rectangle specified by the TargetRect member. |
| Use the entire destination surface as the target rectangle. Ignore the TargetRect member. |
?
///
///
/// dd318400
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// Specifies the target rectangle. The target rectangle is the area within the destination surface where the output will be drawn. The target rectangle is given in pixel coordinates, relative to the destination surface. The default state value is an empty rectangle, (0, 0, 0, 0).
If the Enable member is , the TargetRect member is ignored.
///
///
/// dd318400
/// RECT TargetRect
/// RECT TargetRect
public SharpDX.Rectangle TargetRect;
}
///
/// Defines a color value for Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// This union can represent both RGB and YCbCr colors. The interpretation of the union depends on the context.
///
///
/// dd318402
/// DXVAHD_COLOR
/// DXVAHD_COLOR
[StructLayout(LayoutKind.Explicit, Pack = 0 )]
public partial struct Color {
///
/// A structure that contains an RGB color value.
///
///
/// dd318402
/// DXVAHD_COLOR_RGBA RGB
/// DXVAHD_COLOR_RGBA RGB
[FieldOffset(0)]
public SharpDX.MediaFoundation.DirectX.ColorRgba Rgb;
///
/// A structure that contains a YCbCr color value.
///
///
/// dd318402
/// DXVAHD_COLOR_YCbCrA YCbCr
/// DXVAHD_COLOR_YCbCrA YCbCr
[FieldOffset(0)]
public SharpDX.MediaFoundation.DirectX.ColorYCbCrA YCbCr;
}
///
/// Specifies an RGB color value.
///
///
/// The RGB values have a nominal range of [0...1]. For an RGB format with n bits per channel, the value of each color component is calculated as follows:
val = f * ((1 << n)-1)
For example, for RGB-32 (8 bits per channel), val = BYTE(f * 255.0).
For full-range RGB, reference black is (0.0, 0.0, 0.0), which corresponds to (0, 0, 0) in an 8-bit representation. For limited-range RGB, reference black is (0.0625, 0.0625, 0.0625), which corresponds to (16, 16, 16) in an 8-bit representation. For wide-gamut formats, the values might fall outside of the [0...1] range.
///
///
/// dd318405
/// DXVAHD_COLOR_RGBA
/// DXVAHD_COLOR_RGBA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct ColorRgba {
///
/// The red value.
///
///
/// dd318405
/// float R
/// float R
public float R;
///
/// The green value.
///
///
/// dd318405
/// float G
/// float G
public float G;
///
/// The blue value.
///
///
/// dd318405
/// float B
/// float B
public float B;
///
/// The alpha value. Values range from 0 (transparent) to 1 (opaque).
///
///
/// dd318405
/// float A
/// float A
public float A;
}
///
/// Defines a color value for Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// This union can represent both RGB and YCbCr colors. The interpretation of the union depends on the context.
///
///
/// dd318402
/// DXVAHD_COLOR_YCbCrA
/// DXVAHD_COLOR_YCbCrA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct ColorYCbCrA {
///
/// A structure that contains an RGB color value.
///
///
/// dd318402
/// float Y
/// float Y
public float Y;
///
/// A structure that contains a YCbCr color value.
///
///
/// dd318402
/// float Cb
/// float Cb
public float Cb;
///
/// No documentation.
///
///
/// dd318402
/// float Cr
/// float Cr
public float Cr;
///
/// No documentation.
///
///
/// dd318402
/// float A
/// float A
public float A;
}
///
/// Describes the configuration of a DXVA decoder device.
///
///
/// ms694823
/// DXVA2_ConfigPictureDecode
/// DXVA2_ConfigPictureDecode
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct ConfigPictureDecode {
///
/// Defines the encryption protocol type for bit-stream data buffers. If no encryption is applied, the value is DXVA_NoEncrypt. If ConfigBitstreamRaw is 0, the value must be DXVA_NoEncrypt.
///
///
/// ms694823
/// GUID guidConfigBitstreamEncryption
/// GUID guidConfigBitstreamEncryption
public System.Guid GuidConfigBitstreamEncryption;
///
/// Defines the encryption protocol type for macroblock control data buffers. If no encryption is applied, the value is DXVA_NoEncrypt. If ConfigBitstreamRaw is 1, the value must be DXVA_NoEncrypt.
///
///
/// ms694823
/// GUID guidConfigMBcontrolEncryption
/// GUID guidConfigMBcontrolEncryption
public System.Guid GuidConfigMBcontrolEncryption;
///
/// Defines the encryption protocol type for residual difference decoding data buffers (buffers containing spatial-domain data or sets of transform-domain coefficients for accelerator-based IDCT). If no encryption is applied, the value is DXVA_NoEncrypt. If ConfigBitstreamRaw is 1, the value must be DXVA_NoEncrypt.
///
///
/// ms694823
/// GUID guidConfigResidDiffEncryption
/// GUID guidConfigResidDiffEncryption
public System.Guid GuidConfigResidDiffEncryption;
///
/// Indicates whether the host-decoder sends raw bit-stream data. If the value is 1, the data for the pictures will be sent in bit-stream buffers as raw bit-stream content. If the value is 0, picture data will be sent using macroblock control command buffers. If either ConfigResidDiffHost or ConfigResidDiffAccelerator is 1, the value must be 0.
///
///
/// ms694823
/// unsigned int ConfigBitstreamRaw
/// unsigned int ConfigBitstreamRaw
public int ConfigBitstreamRaw;
///
/// Specifies whether macroblock control commands are in raster scan order or in arbitrary order. If the value is 1, the macroblock control commands within each macroblock control command buffer are in raster-scan order. If the value is 0, the order is arbitrary. For some types of bit streams, forcing raster order either greatly increases the number of required macroblock control buffers that must be processed, or requires host reordering of the control information. Therefore, supporting arbitrary order can be more efficient.
///
///
/// ms694823
/// unsigned int ConfigMBcontrolRasterOrder
/// unsigned int ConfigMBcontrolRasterOrder
public int ConfigMBcontrolRasterOrder;
///
/// Contains the host residual difference configuration. If the value is 1, some residual difference decoding data may be sent as blocks in the spatial domain from the host. If the value is 0, spatial domain data will not be sent.
///
///
/// ms694823
/// unsigned int ConfigResidDiffHost
/// unsigned int ConfigResidDiffHost
public int ConfigResidDiffHost;
///
/// Indicates the word size used to represent residual difference spatial-domain blocks for predicted (non-intra) pictures when using host-based residual difference decoding.
If ConfigResidDiffHost is 1 and ConfigSpatialResid8 is 1, the host will send residual difference spatial-domain blocks for non-intra macroblocks using 8-bit signed samples and for intra macroblocks in predicted (non-intra) pictures in a format that depends on the value of ConfigIntraResidUnsigned:
- If ConfigIntraResidUnsigned is 0, spatial-domain blocks for intra macroblocks are sent as 8-bit signed integer values relative to a constant reference value of 2^(BPP?1).
- If ConfigIntraResidUnsigned is 1, spatial-domain blocks for intra macroblocks are sent as 8-bit unsigned integer values relative to a constant reference value of 0.
If ConfigResidDiffHost is 1 and ConfigSpatialResid8 is 0, the host will send residual difference spatial-domain blocks of data for non-intra macroblocks using 16- bit signed samples and for intra macroblocks in predicted (non-intra) pictures in a format that depends on the value of ConfigIntraResidUnsigned:
- If ConfigIntraResidUnsigned is 0, spatial domain blocks for intra macroblocks are sent as 16-bit signed integer values relative to a constant reference value of 2^(BPP?1).
- If ConfigIntraResidUnsigned is 1, spatial domain blocks for intra macroblocks are sent as 16-bit unsigned integer values relative to a constant reference value of 0.
If ConfigResidDiffHost is 0, ConfigSpatialResid8 must be 0.
For intra pictures, spatial-domain blocks must be sent using 8-bit samples if bits-per-pixel (BPP) is 8, and using 16-bit samples if BPP > 8. If ConfigIntraResidUnsigned is 0, these samples are sent as signed integer values relative to a constant reference value of 2^(BPP?1), and if ConfigIntraResidUnsigned is 1, these samples are sent as unsigned integer values relative to a constant reference value of 0.
///
///
/// ms694823
/// unsigned int ConfigSpatialResid8
/// unsigned int ConfigSpatialResid8
public int ConfigSpatialResid8;
///
/// If the value is 1, 8-bit difference overflow blocks are subtracted rather than added. The value must be 0 unless ConfigSpatialResid8 is 1.
The ability to subtract differences rather than add them enables 8-bit difference decoding to be fully compliant with the full ?255 range of values required in video decoder specifications, because +255 cannot be represented as the addition of two signed 8-bit numbers, but any number in the range ?255 can be represented as the difference between two signed 8-bit numbers (+255 = +127 minus ?128).
///
///
/// ms694823
/// unsigned int ConfigResid8Subtraction
/// unsigned int ConfigResid8Subtraction
public int ConfigResid8Subtraction;
///
/// If the value is 1, spatial-domain blocks for intra macroblocks must be clipped to an 8-bit range on the host and spatial-domain blocks for non-intra macroblocks must be clipped to a 9-bit range on the host. If the value is 0, no such clipping is necessary by the host.
The value must be 0 unless ConfigSpatialResid8 is 0 and ConfigResidDiffHost is 1.
///
///
/// ms694823
/// unsigned int ConfigSpatialHost8or9Clipping
/// unsigned int ConfigSpatialHost8or9Clipping
public int ConfigSpatialHost8or9Clipping;
///
/// If the value is 1, any spatial-domain residual difference data must be sent in a chrominance-interleaved form matching the YUV format chrominance interleaving pattern. The value must be 0 unless ConfigResidDiffHost is 1 and the YUV format is NV12 or NV21.
///
///
/// ms694823
/// unsigned int ConfigSpatialResidInterleaved
/// unsigned int ConfigSpatialResidInterleaved
public int ConfigSpatialResidInterleaved;
///
/// Indicates the method of representation of spatial-domain blocks of residual difference data for intra blocks when using host-based difference decoding.
If ConfigResidDiffHost is 1 and ConfigIntraResidUnsigned is 0, spatial-domain residual difference data blocks for intra macroblocks must be sent as follows:
- In a non-intra picture, if ConfigSpatialResid8 is 0, the spatial-domain residual difference data blocks for intra macroblocks are sent as 16-bit signed integer values relative to a constant reference value of 2^(BPP?1).
- In a non-intra picture, if ConfigSpatialResid8 is 1, the spatial-domain residual difference data blocks for intra macroblocks are sent as 8-bit signed integer values relative to a constant reference value of 2^(BPP?1).
- In an intra picture, if BPP is 8, the spatial-domain residual difference data blocks for intra macroblocks are sent as 8-bit signed integer values relative to a constant reference value of 2^(BPP?1), regardless of the value of ConfigSpatialResid8.
If ConfigResidDiffHost is 1 and ConfigIntraResidUnsigned is 1, spatial-domain residual difference data blocks for intra macroblocks must be sent as follows:
- In a non-intra picture, if ConfigSpatialResid8 is 0, the spatial-domain residual difference data blocks for intra macroblocks must be sent as 16-bit unsigned integer values relative to a constant reference value of 0.
- In a non-intra picture, if ConfigSpatialResid8 is 1, the spatial-domain residual difference data blocks for intra macroblocks are sent as 8-bit unsigned integer values relative to a constant reference value of 0.
- In an intra picture, if BPP is 8, the spatial-domain residual difference data blocks for intra macroblocks are sent as 8-bit unsigned integer values relative to a constant reference value of 0, regardless of the value of ConfigSpatialResid8.
The value of the member must be 0 unless ConfigResidDiffHost is 1.
///
///
/// ms694823
/// unsigned int ConfigIntraResidUnsigned
/// unsigned int ConfigIntraResidUnsigned
public int ConfigIntraResidUnsigned;
///
/// If the value is 1, transform-domain blocks of coefficient data may be sent from the host for accelerator-based IDCT. If the value is 0, accelerator-based IDCT will not be used. If both ConfigResidDiffHost and ConfigResidDiffAccelerator are 1, this indicates that some residual difference decoding will be done on the host and some on the accelerator, as indicated by macroblock-level control commands.
The value must be 0 if ConfigBitstreamRaw is 1.
///
///
/// ms694823
/// unsigned int ConfigResidDiffAccelerator
/// unsigned int ConfigResidDiffAccelerator
public int ConfigResidDiffAccelerator;
///
/// If the value is 1, the inverse scan for transform-domain block processing will be performed on the host, and absolute indices will be sent instead for any transform coefficients. If the value is 0, the inverse scan will be performed on the accelerator.
The value must be 0 if ConfigResidDiffAccelerator is 0 or if Config4GroupedCoefs is 1.
///
///
/// ms694823
/// unsigned int ConfigHostInverseScan
/// unsigned int ConfigHostInverseScan
public int ConfigHostInverseScan;
///
/// If the value is 1, the IDCT specified in Annex W of ITU-T Recommendation H.263 is used. If the value is 0, any compliant IDCT can be used for off-host IDCT.
The H.263 annex does not comply with the IDCT requirements of MPEG-2 corrigendum 2, so the value must not be 1 for use with MPEG-2 video.
The value must be 0 if ConfigResidDiffAccelerator is 0, indicating purely host-based residual difference decoding.
///
///
/// ms694823
/// unsigned int ConfigSpecificIDCT
/// unsigned int ConfigSpecificIDCT
public int ConfigSpecificIDCT;
///
/// If the value is 1, transform coefficients for off-host IDCT will be sent using the DXVA_TCoef4Group structure. If the value is 0, the DXVA_TCoefSingle structure is used. The value must be 0 if ConfigResidDiffAccelerator is 0 or if ConfigHostInverseScan is 1.
///
///
/// ms694823
/// unsigned int Config4GroupedCoefs
/// unsigned int Config4GroupedCoefs
public int Config4GroupedCoefs;
///
/// Specifies how many frames the decoder device processes at any one time.
///
///
/// ms694823
/// unsigned short ConfigMinRenderTargetBuffCount
/// unsigned short ConfigMinRenderTargetBuffCount
public short ConfigMinRenderTargetBuffCount;
///
/// Contains decoder-specific configuration information.
///
///
/// ms694823
/// unsigned short ConfigDecoderSpecific
/// unsigned short ConfigDecoderSpecific
public short ConfigDecoderSpecific;
}
///
/// Describes a video stream for a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) video processor.
The display driver can use the information in this structure to optimize the capabilities of the video processor. For example, some capabilities might not be exposed for high-definition (HD) content, for performance reasons.
///
///
/// Frame rates are expressed as ratios. For example, 30 frames per second (fps) is expressed as 30:1, and 29.97 fps is expressed as 30000/1001. For interlaced content, a frame consists of two fields, so that the frame rate is half the field rate.
If the application will composite two or more input streams, use the largest stream for the values of InputWidth and InputHeight.
///
///
/// dd318409
/// DXVAHD_CONTENT_DESC
/// DXVAHD_CONTENT_DESC
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct ContentDescription {
///
/// A member of the enumeration that describes how the video stream is interlaced.
///
///
/// dd318409
/// DXVAHD_FRAME_FORMAT InputFrameFormat
/// DXVAHD_FRAME_FORMAT InputFrameFormat
public SharpDX.MediaFoundation.DirectX.FrameFormat InputFrameFormat;
///
/// The frame rate of the input video stream, specified as a structure.
///
///
/// dd318409
/// DXVAHD_RATIONAL InputFrameRate
/// DXVAHD_RATIONAL InputFrameRate
public SharpDX.MediaFoundation.DirectX.Rational InputFrameRate;
///
/// The width of the input frames, in pixels.
///
///
/// dd318409
/// unsigned int InputWidth
/// unsigned int InputWidth
public int InputWidth;
///
/// The height of the input frames, in pixels.
///
///
/// dd318409
/// unsigned int InputHeight
/// unsigned int InputHeight
public int InputHeight;
///
/// The frame rate of the output video stream, specified as a structure.
///
///
/// dd318409
/// DXVAHD_RATIONAL OutputFrameRate
/// DXVAHD_RATIONAL OutputFrameRate
public SharpDX.MediaFoundation.DirectX.Rational OutputFrameRate;
///
/// The width of the output frames, in pixels.
///
///
/// dd318409
/// unsigned int OutputWidth
/// unsigned int OutputWidth
public int OutputWidth;
///
/// The height of the output frames, in pixels.
///
///
/// dd318409
/// unsigned int OutputHeight
/// unsigned int OutputHeight
public int OutputHeight;
}
///
/// Specifies a custom rate for frame-rate conversion or inverse telecine (IVTC).
///
///
/// The CustomRate member gives the rate conversion factor, while the remaining members define the pattern of input and output samples.
Here are some example uses for this structure:
-
Frame rate conversion from 60p to 120p (doubling the frame rate).
- CustomRate: 2/1
- OutputFrames: 2
- InputInterlaced:
- InputFramesOrFields: 1
-
Reverse 2:3 pulldown (IVTC) from 60i to 24p.
- CustomRate: 4/5
- OutputFrames: 4
- InputInterlaced: TRUE
- InputFramesOrFields: 10
(Ten interlaced fields are converted into four progressive frames.)
///
///
/// dd318414
/// DXVAHD_CUSTOM_RATE_DATA
/// DXVAHD_CUSTOM_RATE_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct CustomRateData {
///
/// The ratio of the output frame rate to the input frame rate, expressed as a structure that holds a rational number.
///
///
/// dd318414
/// DXVAHD_RATIONAL CustomRate
/// DXVAHD_RATIONAL CustomRate
public SharpDX.MediaFoundation.DirectX.Rational CustomRate;
///
/// The number of output frames that will be generated for every N input samples, where N = InputFramesOrFields.
///
///
/// dd318414
/// unsigned int OutputFrames
/// unsigned int OutputFrames
public int OutputFrames;
///
/// If TRUE, the input stream must be interlaced. Otherwise, the input stream must be progressive.
///
///
/// dd318414
/// BOOL InputInterlaced
/// BOOL InputInterlaced
public SharpDX.Mathematics.Interop.RawBool InputInterlaced;
///
/// The number of input fields or frames for every N output frames that will be generated, where N = OutputFrames.
///
///
/// dd318414
/// unsigned int InputFramesOrFields
/// unsigned int InputFramesOrFields
public int InputFramesOrFields;
}
///
/// Describes a buffer sent from a decoder to a DirectX Video Acceleration (DXVA) device.
///
///
/// This structure corresponds closely to the DXVA_BufferDescription structure in DXVA 1, but some of the fields are no longer used in DXVA 2.
///
///
/// ms704794
/// DXVA2_DecodeBufferDesc
/// DXVA2_DecodeBufferDesc
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct DecodeBufferDesc {
///
/// Identifies the type of buffer passed to the accelerator. Must be one of the following values.
| Value | Meaning |
| Picture decoding parameter buffer. |
| Macroblock control command buffer. |
| Residual difference block data buffer. |
| Deblocking filter control command buffer. |
| Inverse quantization matrix buffer. |
| Slice-control buffer. |
| Bitstream data buffer. |
| Motion vector buffer. |
| Film grain synthesis data buffer. |
?
///
///
/// ms704794
/// unsigned int CompressedBufferType
/// unsigned int CompressedBufferType
public int CompressedBufferType;
///
/// Reserved. Set to zero.
///
///
/// ms704794
/// unsigned int BufferIndex
/// unsigned int BufferIndex
public int BufferIndex;
///
/// Specifies the offset of the relevant data from the beginning of the buffer, in bytes. Currently this value must be zero.
///
///
/// ms704794
/// unsigned int DataOffset
/// unsigned int DataOffset
public int DataOffset;
///
/// Specifies the amount of relevant data in the buffer, in bytes. The location of the last byte of content in the buffer is DataOffset + DataSize ? 1.
///
///
/// ms704794
/// unsigned int DataSize
/// unsigned int DataSize
public int DataSize;
///
/// Specifies the macroblock address of the first macroblock in the buffer. The macroblock address is given in raster scan order.
///
///
/// ms704794
/// unsigned int FirstMBaddress
/// unsigned int FirstMBaddress
public int FirstMBaddress;
///
/// Specifies the number of macroblocks of data in the buffer. This count includes skipped macroblocks. This value must be zero if the data buffer type is one of the following: picture decoding parameters, inverse-quantization matrix, AYUV, IA44/AI44, DPXD, Highlight, or DCCMD.
///
///
/// ms704794
/// unsigned int NumMBsInBuffer
/// unsigned int NumMBsInBuffer
public int NumMBsInBuffer;
///
/// Reserved. Set to zero.
///
///
/// ms704794
/// unsigned int Width
/// unsigned int Width
public int Width;
///
/// Reserved. Set to zero.
///
///
/// ms704794
/// unsigned int Height
/// unsigned int Height
public int Height;
///
/// Reserved. Set to zero.
///
///
/// ms704794
/// unsigned int Stride
/// unsigned int Stride
public int Stride;
///
/// Reserved. Set to zero.
///
///
/// ms704794
/// unsigned int ReservedBits
/// unsigned int ReservedBits
public int ReservedBits;
///
/// Pointer to a byte array that contains an initialization vector (IV) for encrypted data. If the decode buffer does not contain encrypted data, set this member to null. If the decode buffer contains encrypted data, the contents of pvPVPState depends on the type of encryption. For D3DCRYPTOTYPE_AES128_CTR, the pvPVPState member points to a structure.
///
///
/// ms704794
/// void* pvPVPState
/// void pvPVPState
public System.IntPtr PvPVPState;
}
///
///
Contains parameters for the method.
///
///
/// ms704591
/// DXVA2_DecodeExecuteParams
/// DXVA2_DecodeExecuteParams
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct DecodeExecuteParams {
///
/// No documentation.
///
///
/// ms704591
/// unsigned int NumCompBuffers
/// unsigned int NumCompBuffers
public int NumCompBuffers;
///
/// No documentation.
///
///
/// ms704591
/// DXVA2_DecodeBufferDesc* pCompressedBuffers
/// DXVA2_DecodeBufferDesc pCompressedBuffers
public System.IntPtr PCompressedBuffers;
///
/// No documentation.
///
///
/// ms704591
/// DXVA2_DecodeExtensionData* pExtensionData
/// DXVA2_DecodeExtensionData pExtensionData
public System.IntPtr PExtensionData;
}
///
///
Contains private data for the method.
///
///
/// This structure corresponds to parameters of the IAMVideoAccelerator::Execute method in DirectX Video Acceleration (DXVA) version 1.
///
///
/// ms696173
/// DXVA2_DecodeExtensionData
/// DXVA2_DecodeExtensionData
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct DecodeExtensionData {
///
/// No documentation.
///
///
/// ms696173
/// unsigned int Function
/// unsigned int Function
public int Function;
///
/// No documentation.
///
///
/// ms696173
/// void* pPrivateInputData
/// void pPrivateInputData
public System.IntPtr PPrivateInputData;
///
/// No documentation.
///
///
/// ms696173
/// unsigned int PrivateInputDataSize
/// unsigned int PrivateInputDataSize
public int PrivateInputDataSize;
///
/// No documentation.
///
///
/// ms696173
/// void* pPrivateOutputData
/// void pPrivateOutputData
public System.IntPtr PPrivateOutputData;
///
/// No documentation.
///
///
/// ms696173
/// unsigned int PrivateOutputDataSize
/// unsigned int PrivateOutputDataSize
public int PrivateOutputDataSize;
}
///
/// No documentation.
///
///
/// DXVAHDETW_CREATEVIDEOPROCESSOR
/// DXVAHDETW_CREATEVIDEOPROCESSOR
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
public partial struct EtwCreateVideoProcessor {
///
/// No documentation.
///
///
/// unsigned longlong pObject
/// unsigned longlong pObject
public long PObject;
///
/// No documentation.
///
///
/// unsigned longlong pD3D9Ex
/// unsigned longlong pD3D9Ex
public long PD3D9Ex;
///
/// No documentation.
///
///
/// GUID VPGuid
/// GUID VPGuid
public System.Guid VPGuid;
}
///
/// No documentation.
///
///
/// DXVAHDETW_DESTROYVIDEOPROCESSOR
/// DXVAHDETW_DESTROYVIDEOPROCESSOR
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
public partial struct EtwDestroyVideoProcessor {
///
/// No documentation.
///
///
/// unsigned longlong pObject
/// unsigned longlong pObject
public long PObject;
}
///
/// No documentation.
///
///
/// DXVAHDETW_VIDEOPROCESSBLTHD
/// DXVAHDETW_VIDEOPROCESSBLTHD
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
public partial struct EtwVideoProcessblthd {
///
/// No documentation.
///
///
/// unsigned longlong pObject
/// unsigned longlong pObject
public long PObject;
///
/// No documentation.
///
///
/// unsigned longlong pOutputSurface
/// unsigned longlong pOutputSurface
public long POutputSurface;
///
/// No documentation.
///
///
/// RECT TargetRect
/// RECT TargetRect
public SharpDX.Rectangle TargetRect;
///
/// No documentation.
///
///
/// D3DFORMAT OutputFormat
/// D3DFORMAT OutputFormat
public SharpDX.Direct3D9.Format OutputFormat;
///
/// No documentation.
///
///
/// unsigned int ColorSpace
/// unsigned int ColorSpace
public int ColorSpace;
///
/// No documentation.
///
///
/// unsigned int OutputFrame
/// unsigned int OutputFrame
public int OutputFrame;
///
/// No documentation.
///
///
/// unsigned int StreamCount
/// unsigned int StreamCount
public int StreamCount;
///
/// No documentation.
///
///
/// BOOL Enter
/// BOOL Enter
public SharpDX.Mathematics.Interop.RawBool Enter;
}
///
/// No documentation.
///
///
/// DXVAHDETW_VIDEOPROCESSBLTHD_STREAM
/// DXVAHDETW_VIDEOPROCESSBLTHD_STREAM
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
public partial struct EtwVideoProcessblthdStream {
///
/// No documentation.
///
///
/// unsigned longlong pObject
/// unsigned longlong pObject
public long PObject;
///
/// No documentation.
///
///
/// unsigned longlong pInputSurface
/// unsigned longlong pInputSurface
public long PInputSurface;
///
/// No documentation.
///
///
/// RECT SourceRect
/// RECT SourceRect
public SharpDX.Rectangle SourceRect;
///
/// No documentation.
///
///
/// RECT DestinationRect
/// RECT DestinationRect
public SharpDX.Rectangle DestinationRect;
///
/// No documentation.
///
///
/// D3DFORMAT InputFormat
/// D3DFORMAT InputFormat
public SharpDX.Direct3D9.Format InputFormat;
///
/// No documentation.
///
///
/// DXVAHD_FRAME_FORMAT FrameFormat
/// DXVAHD_FRAME_FORMAT FrameFormat
public SharpDX.MediaFoundation.DirectX.FrameFormat FrameFormat;
///
/// No documentation.
///
///
/// unsigned int ColorSpace
/// unsigned int ColorSpace
public int ColorSpace;
///
/// No documentation.
///
///
/// unsigned int StreamNumber
/// unsigned int StreamNumber
public int StreamNumber;
///
/// No documentation.
///
///
/// unsigned int OutputIndex
/// unsigned int OutputIndex
public int OutputIndex;
///
/// No documentation.
///
///
/// unsigned int InputFrameOrField
/// unsigned int InputFrameOrField
public int InputFrameOrField;
///
/// No documentation.
///
///
/// unsigned int PastFrames
/// unsigned int PastFrames
public int PastFrames;
///
/// No documentation.
///
///
/// unsigned int FutureFrames
/// unsigned int FutureFrames
public int FutureFrames;
}
///
/// No documentation.
///
///
/// DXVAHDETW_VIDEOPROCESSBLTSTATE
/// DXVAHDETW_VIDEOPROCESSBLTSTATE
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
public partial struct EtwVideoProcessbltstate {
///
/// No documentation.
///
///
/// unsigned longlong pObject
/// unsigned longlong pObject
public long PObject;
///
/// No documentation.
///
///
/// DXVAHD_BLT_STATE State
/// DXVAHD_BLT_STATE State
public SharpDX.MediaFoundation.DirectX.BlitState State;
///
/// No documentation.
///
///
/// unsigned int DataSize
/// unsigned int DataSize
public int DataSize;
///
/// No documentation.
///
///
/// BOOL SetState
/// BOOL SetState
public SharpDX.Mathematics.Interop.RawBool SetState;
}
///
/// No documentation.
///
///
/// DXVAHDETW_VIDEOPROCESSSTREAMSTATE
/// DXVAHDETW_VIDEOPROCESSSTREAMSTATE
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
public partial struct EtwVideoProcessstreamstate {
///
/// No documentation.
///
///
/// unsigned longlong pObject
/// unsigned longlong pObject
public long PObject;
///
/// No documentation.
///
///
/// unsigned int StreamNumber
/// unsigned int StreamNumber
public int StreamNumber;
///
/// No documentation.
///
///
/// DXVAHD_STREAM_STATE State
/// DXVAHD_STREAM_STATE State
public SharpDX.MediaFoundation.DirectX.StreamState State;
///
/// No documentation.
///
///
/// unsigned int DataSize
/// unsigned int DataSize
public int DataSize;
///
/// No documentation.
///
///
/// BOOL SetState
/// BOOL SetState
public SharpDX.Mathematics.Interop.RawBool SetState;
}
///
/// Describes the format of a video stream.
///
///
/// Most of the values in this structure can be translated directly to and from attributes. For a code example that fills in the values from an reference, see .
///
///
/// ms704798
/// DXVA2_ExtendedFormat
/// DXVA2_ExtendedFormat
[StructLayout(LayoutKind.Explicit, Pack = 0 )]
public partial struct ExtendedFormat {
///
/// Describes the interlacing of the video frames. Contains a value from the enumeration.
///
///
/// ms704798
/// unsigned int SampleFormat
/// unsigned int SampleFormat
public int SampleFormat {
get {
return (int)((_SampleFormat >> 0) & 255);
}
set {
_SampleFormat = (int)((_SampleFormat & ~( 255 << 0)) | ( (value & 255) << 0));
}
}
[FieldOffset(0)]
internal int _SampleFormat;
///
/// Describes the chroma siting. Contains a value from the enumeration.
///
///
/// ms704798
/// unsigned int VideoChromaSubsampling
/// unsigned int VideoChromaSubsampling
public int VideoChromaSubsampling {
get {
return (int)((_VideoChromaSubsampling >> 8) & 15);
}
set {
_VideoChromaSubsampling = (int)((_VideoChromaSubsampling & ~( 15 << 8)) | ( (value & 15) << 8));
}
}
[FieldOffset(0)]
internal int _VideoChromaSubsampling;
///
/// Describes the nominal range of the Y'CbCr or RGB color data. Contains a value from the enumeration.
///
///
/// ms704798
/// unsigned int NominalRange
/// unsigned int NominalRange
public int NominalRange {
get {
return (int)((_NominalRange >> 12) & 7);
}
set {
_NominalRange = (int)((_NominalRange & ~( 7 << 12)) | ( (value & 7) << 12));
}
}
[FieldOffset(0)]
internal int _NominalRange;
///
/// Describes the transform from Y'PbPr (component video) to studio R'G'B'. Contains a value from the enumeration.
///
///
/// ms704798
/// unsigned int VideoTransferMatrix
/// unsigned int VideoTransferMatrix
public int VideoTransferMatrix {
get {
return (int)((_VideoTransferMatrix >> 15) & 7);
}
set {
_VideoTransferMatrix = (int)((_VideoTransferMatrix & ~( 7 << 15)) | ( (value & 7) << 15));
}
}
[FieldOffset(0)]
internal int _VideoTransferMatrix;
///
/// Describes the intended viewing conditions. Contains a value from the enumeration.
///
///
/// ms704798
/// unsigned int VideoLighting
/// unsigned int VideoLighting
public int VideoLighting {
get {
return (int)((_VideoLighting >> 18) & 15);
}
set {
_VideoLighting = (int)((_VideoLighting & ~( 15 << 18)) | ( (value & 15) << 18));
}
}
[FieldOffset(0)]
internal int _VideoLighting;
///
/// Describes the color primaries. Contains a value from the enumeration.
///
///
/// ms704798
/// unsigned int VideoPrimaries
/// unsigned int VideoPrimaries
public int VideoPrimaries {
get {
return (int)((_VideoPrimaries >> 22) & 31);
}
set {
_VideoPrimaries = (int)((_VideoPrimaries & ~( 31 << 22)) | ( (value & 31) << 22));
}
}
[FieldOffset(0)]
internal int _VideoPrimaries;
///
/// Describes the gamma correction transfer function. Contains a value from the enumeration.
///
///
/// ms704798
/// unsigned int VideoTransferFunction
/// unsigned int VideoTransferFunction
public int VideoTransferFunction {
get {
return (int)((_VideoTransferFunction >> 27) & 31);
}
set {
_VideoTransferFunction = (int)((_VideoTransferFunction & ~( 31 << 27)) | ( (value & 31) << 27));
}
}
[FieldOffset(0)]
internal int _VideoTransferFunction;
///
/// Use this member to access all of the bits in the union.
///
///
/// ms704798
/// unsigned int value
/// unsigned int value
[FieldOffset(0)]
public int Value;
}
///
/// 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_RANGE_DATA
/// DXVAHD_FILTER_RANGE_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct FilterRangeData {
///
/// The minimum value of the filter.
///
///
/// dd318428
/// int Minimum
/// int Minimum
public int Minimum;
///
/// The maximum value of the filter.
///
///
/// dd318428
/// int Maximum
/// int Maximum
public int Maximum;
///
/// The default value of the filter.
///
///
/// dd318428
/// int Default
/// int Default
public int Default;
///
/// A multiplier. Use the following formula to translate the filter setting into the actual filter value: Actual Value = Set Value???Multiplier.
///
///
/// dd318428
/// float Multiplier
/// float Multiplier
public float Multiplier;
}
///
///
Contains parameters for a DirectX Video Acceleration (DXVA) image filter.
///
///
/// ms697015
/// DXVA2_FilterValues
/// DXVA2_FilterValues
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct FilterValues {
///
/// Filter level.
///
///
/// ms697015
/// DXVA2_Fixed32 Level
/// DXVA2_Fixed32 Level
public SharpDX.MediaFoundation.DirectX.Fixed32 Level;
///
/// Filter threshold.
///
///
/// ms697015
/// DXVA2_Fixed32 Threshold
/// DXVA2_Fixed32 Threshold
public SharpDX.MediaFoundation.DirectX.Fixed32 Threshold;
///
/// Filter radius.
///
///
/// ms697015
/// DXVA2_Fixed32 Radius
/// DXVA2_Fixed32 Radius
public SharpDX.MediaFoundation.DirectX.Fixed32 Radius;
}
///
/// Returns a structure that contains an opaque alpha value.
You can use this function for DirectX Video Acceleration (DXVA) operations that require alpha values expressed as fixed-point numbers.
///
///
/// aa473831
/// DXVA2_Fixed32
/// DXVA2_Fixed32
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct Fixed32 {
///
/// No documentation.
///
///
/// aa473831
/// unsigned short Fraction
/// unsigned short Fraction
public short Fraction;
///
/// No documentation.
///
///
/// aa473831
/// short Value
/// short Value
public short Value;
///
/// No documentation.
///
///
/// aa473831
/// int ll
/// int ll
public int Ll;
}
///
///
Defines a video frequency.
///
///
/// The value 0/0 indicates an unknown frequency. Values of the form n/0, where n is not zero, are invalid. Values of the form 0/n, where n is not zero, indicate a frequency of zero.
///
///
/// ms693574
/// DXVA2_Frequency
/// DXVA2_Frequency
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct Frequency {
///
/// Numerator of the frequency.
///
///
/// ms693574
/// unsigned int Numerator
/// unsigned int Numerator
public int Numerator;
///
/// Denominator of the frequency.
///
///
/// ms693574
/// unsigned int Denominator
/// unsigned int Denominator
public int Denominator;
}
///
///
Contains values for DirectX Video Acceleration (DXVA) video processing operations.
///
///
/// ms703115
/// DXVA2_ProcAmpValues
/// DXVA2_ProcAmpValues
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct ProcAmpValues {
///
/// Brightness value.
///
///
/// ms703115
/// DXVA2_Fixed32 Brightness
/// DXVA2_Fixed32 Brightness
public SharpDX.MediaFoundation.DirectX.Fixed32 Brightness;
///
/// Contrast value.
///
///
/// ms703115
/// DXVA2_Fixed32 Contrast
/// DXVA2_Fixed32 Contrast
public SharpDX.MediaFoundation.DirectX.Fixed32 Contrast;
///
/// Hue value.
///
///
/// ms703115
/// DXVA2_Fixed32 Hue
/// DXVA2_Fixed32 Hue
public SharpDX.MediaFoundation.DirectX.Fixed32 Hue;
///
/// Saturation value.
///
///
/// ms703115
/// DXVA2_Fixed32 Saturation
/// DXVA2_Fixed32 Saturation
public SharpDX.MediaFoundation.DirectX.Fixed32 Saturation;
}
///
/// Contains a rational number (ratio).
///
///
/// Values of the form 0/n are interpreted as zero. The value 0/0 is interpreted as zero. However, these values are not necessarily valid in all contexts.
Values of the form n/0, where n is nonzero, are invalid.
///
///
/// dd318756
/// DXVAHD_RATIONAL
/// DXVAHD_RATIONAL
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct Rational {
///
/// The numerator of the ratio.
///
///
/// dd318756
/// unsigned int Numerator
/// unsigned int Numerator
public int Numerator;
///
/// The denominator of the ratio.
///
///
/// dd318756
/// unsigned int Denominator
/// unsigned int Denominator
public int Denominator;
}
///
/// Contains per-stream data for the method.
///
///
/// dd318757
/// DXVAHD_STREAM_DATA
/// DXVAHD_STREAM_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamData {
///
/// No documentation.
///
///
/// dd318757
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// No documentation.
///
///
/// dd318757
/// unsigned int OutputIndex
/// unsigned int OutputIndex
public int OutputIndex;
///
/// No documentation.
///
///
/// dd318757
/// unsigned int InputFrameOrField
/// unsigned int InputFrameOrField
public int InputFrameOrField;
///
/// No documentation.
///
///
/// dd318757
/// unsigned int PastFrames
/// unsigned int PastFrames
public int PastFrames;
///
/// No documentation.
///
///
/// dd318757
/// unsigned int FutureFrames
/// unsigned int FutureFrames
public int FutureFrames;
///
/// No documentation.
///
///
/// dd318757
/// IDirect3DSurface9** ppPastSurfaces
/// IDirect3DSurface9 ppPastSurfaces
public System.IntPtr PpPastSurfaces;
///
/// No documentation.
///
///
/// dd318757
/// IDirect3DSurface9* pInputSurface
/// IDirect3DSurface9 pInputSurface
public System.IntPtr PInputSurface;
///
/// No documentation.
///
///
/// dd318757
/// IDirect3DSurface9** ppFutureSurfaces
/// IDirect3DSurface9 ppFutureSurfaces
public System.IntPtr PpFutureSurfaces;
}
///
/// Specifies the planar alpha value for an input stream, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// For each pixel, the destination color value is computed as follows:
Cd = Cs * (As * Ap * Ae) + Cd * (1.0 - As * Ap * Ae)
where
Cd = Color value of the destination pixel. Cs = Color value of source pixel. As = Per-pixel source alpha. Ap = Planar alpha value. Ae = Palette-entry alpha value, or 1.0 (see Note).
Note??Palette-entry alpha values apply only to palettized color formats, and only when the device supports the capability. Otherwise, this factor equals 1.0.
The destination alpha value is computed according to the state. For more information, see .
To get the device capabilities, call and check the FeatureCaps member of the structure.
///
///
/// dd318759
/// DXVAHD_STREAM_STATE_ALPHA_DATA
/// DXVAHD_STREAM_STATE_ALPHA_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateAlphaData {
///
/// If TRUE, alpha blending is enabled. Otherwise, alpha blending is disabled. The default state value is .
///
///
/// dd318759
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// Specifies the planar alpha value as a floating-point number from 0.0 (transparent) to 1.0 (opaque).
If the Enable member is , this member is ignored.
///
///
/// dd318759
/// float Alpha
/// float Alpha
public float Alpha;
}
///
/// Specifies the pixel aspect ratio (PAR) for the source and destination rectangles.
///
///
/// Pixel aspect ratios of the form 0/n and n/0 are not valid.
If the Enable member is , the device ignores the values of SourceAspectRatio and DestinationAspectRatio.
///
///
/// dd318760
/// DXVAHD_STREAM_STATE_ASPECT_RATIO_DATA
/// DXVAHD_STREAM_STATE_ASPECT_RATIO_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateAspectRatioData {
///
/// If TRUE, the SourceAspectRatio and DestinationAspectRatio members contain valid values. Otherwise, the pixel aspect ratios are unspecified.
///
///
/// dd318760
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// A structure that contains the source PAR. The default state value is 1:1 (square pixels).
///
///
/// dd318760
/// DXVAHD_RATIONAL SourceAspectRatio
/// DXVAHD_RATIONAL SourceAspectRatio
public SharpDX.MediaFoundation.DirectX.Rational SourceAspectRatio;
///
/// A structure that contains the destination PAR. The default state value is 1:1 (square pixels).
///
///
/// dd318760
/// DXVAHD_RATIONAL DestinationAspectRatio
/// DXVAHD_RATIONAL DestinationAspectRatio
public SharpDX.MediaFoundation.DirectX.Rational DestinationAspectRatio;
}
///
/// Specifies the format for an input stream, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// dd318761
/// DXVAHD_STREAM_STATE_D3DFORMAT_DATA
/// DXVAHD_STREAM_STATE_D3DFORMAT_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateD3DFORMATData {
///
/// The surface format, specified as a value. You can also use a FOURCC code to specify a format that is not defined in the enumeration. For more information, see Video FOURCCs.
The default state value is .
///
///
/// dd318761
/// D3DFORMAT Format
/// D3DFORMAT Format
public SharpDX.Direct3D9.Format Format;
}
///
/// Specifies the destination rectangle for an input stream, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// dd318762
/// DXVAHD_STREAM_STATE_DESTINATION_RECT_DATA
/// DXVAHD_STREAM_STATE_DESTINATION_RECT_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateDestinationRectangleData {
///
/// Specifies whether to use the destination rectangle, or use the entire output surface. The default state value is .
| Value | Meaning |
- TRUE
| Use the destination rectangle given in the DestinationRect member. |
| Use the entire output surface as the destination rectangle. |
?
///
///
/// dd318762
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// The destination rectangle, which defines the portion of the output surface where the source rectangle is blitted. The destination rectangle is given in pixel coordinates, relative to the output surface. The default value is an empty rectangle, (0, 0, 0, 0).
If the Enable member is , the DestinationRect member is ignored.
///
///
/// dd318762
/// RECT DestinationRect
/// RECT DestinationRect
public SharpDX.Rectangle DestinationRect;
}
///
/// Specifies the level for a filtering operation on a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) input stream.
///
///
/// For a list of image filters that are defined for DXVA-HD, see . The device might not support every type of image filter. To find out whether the device supports a particular filter, call the method and check the FilterCaps member of the structure.
///
///
/// dd318763
/// DXVAHD_STREAM_STATE_FILTER_DATA
/// DXVAHD_STREAM_STATE_FILTER_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateFilterData {
///
/// If TRUE, the filter is enabled. Otherwise, the filter is disabled.
///
///
/// dd318763
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// The level for the filter. The meaning of this value depends on the implementation. To get the range and default value of a particular filter, call the method.
If the Enable member is , the Level member is ignored.
///
///
/// dd318763
/// int Level
/// int Level
public int Level;
}
///
/// Specifies how a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) input stream is interlaced.
///
///
/// Some devices do not support interlaced RGB. Interlaced RGB support is indicated by the capability flag. If the device does not support interlaced RGB, it treats all RGB input streams as progressive frames.
Some devices do not support interlaced formats with palettized color. This support is indicated by the flag. If the device does not support this capability, all palettized input streams are treated as progressive frames.
To get the device's capabilities, call and check the InputFormatCaps member of the structure.
///
///
/// dd318764
/// DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA
/// DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateFrameFormatData {
///
/// The video interlacing, specified as a value.
The default state value is (progressive frames).
///
///
/// dd318764
/// DXVAHD_FRAME_FORMAT FrameFormat
/// DXVAHD_FRAME_FORMAT FrameFormat
public SharpDX.MediaFoundation.DirectX.FrameFormat FrameFormat;
}
///
/// Specifies the color space for a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) input stream.
///
///
/// The RGB_Range member applies to RGB input, while the YCbCr_Matrix and YCbCr_xvYCC members apply to YCbCr (YUV) input.
In some situations, the device might perform an intermediate color conversion on the input stream. If so, it uses the flags that apply to both color spaces. For example, suppose the device converts from RGB to YCbCr. If the RGB_Range member is 0 and the YCbCr_Matrix member is 1, the device will convert from full-range RGB to BT.709 YCbCr.
If the device supports xvYCC, it returns the capability flag in the DeviceCaps member of the structure. Otherwise, the device ignores the value of YCbCr_xvYCC and treats all YCbCr input as conventional YCbCr. To get the device's capabilities, call .
///
///
/// dd318765
/// DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA
/// DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA
[StructLayout(LayoutKind.Explicit, Pack = 0 )]
public partial struct StreamStateInputColorSpaceData {
///
/// Specifies whether the input stream contains video or graphics. The device can optimize the processing based on the type. The default state value is 0 (video).
| Value | Meaning |
- 0
| Video. |
- 1
| Graphics. |
?
///
///
/// dd318765
/// unsigned int Type
/// unsigned int Type
public bool Type {
get {
return 0 != ((_Type >> 0) & 1);
}
set {
_Type = (int)((_Type & ~( 1 << 0)) | ( ( (value?1:0) & 1) << 0));
}
}
[FieldOffset(0)]
internal int _Type;
///
/// Specifies the RGB color range. The default state value is 0 (full range).
| Value | Meaning |
- 0
| Full range (0-255). |
- 1
| Limited range (16-235). |
?
///
///
/// dd318765
/// unsigned int RGB_Range
/// unsigned int RGB_Range
public bool RgbRange {
get {
return 0 != ((_RgbRange >> 1) & 1);
}
set {
_RgbRange = (int)((_RgbRange & ~( 1 << 1)) | ( ( (value?1:0) & 1) << 1));
}
}
[FieldOffset(0)]
internal int _RgbRange;
///
/// Specifies the YCbCr transfer matrix. The default state value is 0 (BT.601).
| Value | Meaning |
- 0
| ITU-R BT.601. |
- 1
| ITU-R BT.709. |
?
///
///
/// dd318765
/// unsigned int YCbCr_Matrix
/// unsigned int YCbCr_Matrix
public bool YCbCrMatrix {
get {
return 0 != ((_YCbCrMatrix >> 2) & 1);
}
set {
_YCbCrMatrix = (int)((_YCbCrMatrix & ~( 1 << 2)) | ( ( (value?1:0) & 1) << 2));
}
}
[FieldOffset(0)]
internal int _YCbCrMatrix;
///
/// Specifies whether the input stream uses conventional YCbCr or extended YCbCr (xvYCC). The default state value is 0 (conventional YCbCr).
| Value | Meaning |
- 0
| Conventional YCbCr. |
- 1
| Extended YCbCr (xvYCC). |
?
///
///
/// dd318765
/// unsigned int YCbCr_xvYCC
/// unsigned int YCbCr_xvYCC
public bool YCbCrXvYCC {
get {
return 0 != ((_YCbCrXvYCC >> 3) & 1);
}
set {
_YCbCrXvYCC = (int)((_YCbCrXvYCC & ~( 1 << 3)) | ( ( (value?1:0) & 1) << 3));
}
}
[FieldOffset(0)]
internal int _YCbCrXvYCC;
///
/// No documentation.
///
///
/// dd318765
/// unsigned int Reserved
/// unsigned int Reserved
public int Reserved {
get {
return (int)((_Reserved >> 4) & 268435455);
}
set {
_Reserved = (int)((_Reserved & ~( 268435455 << 4)) | ( (value & 268435455) << 4));
}
}
[FieldOffset(0)]
internal int _Reserved;
///
/// No documentation.
///
///
/// dd318765
/// unsigned int Value
/// unsigned int Value
[FieldOffset(0)]
public int Value;
}
///
/// 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_LUMA_KEY_DATA
/// DXVAHD_STREAM_STATE_LUMA_KEY_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateLumaKeyData {
///
/// If TRUE, luma keying is enabled. Otherwise, luma keying is disabled. The default value is .
///
///
/// dd318766
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// The lower bound for the luma key. The range is [0?1]. The default state value is 0.0.
///
///
/// dd318766
/// float Lower
/// float Lower
public float Lower;
///
/// The upper bound for the luma key. The range is [0?1]. The default state value is 0.0.
///
///
/// dd318766
/// float Upper
/// float Upper
public float Upper;
}
///
/// Specifies the output frame rate for an input stream when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// The output rate might require the device to convert the frame rate of the input stream. If so, the value of RepeatFrame controls whether the device creates interpolated frames or simply repeats input frames.
///
///
/// dd318767
/// DXVAHD_STREAM_STATE_OUTPUT_RATE_DATA
/// DXVAHD_STREAM_STATE_OUTPUT_RATE_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateOutputRateData {
///
/// Specifies how the device performs frame-rate conversion, if required. The default state value is (interpolation).
| Value | Meaning |
- TRUE
| The device repeats frames. |
| The device interpolates frames. |
?
///
///
/// dd318767
/// BOOL RepeatFrame
/// BOOL RepeatFrame
public SharpDX.Mathematics.Interop.RawBool RepeatFrame;
///
/// Specifies the output rate, as a member of the enumeration.
///
///
/// dd318767
/// DXVAHD_OUTPUT_RATE OutputRate
/// DXVAHD_OUTPUT_RATE OutputRate
public SharpDX.MediaFoundation.DirectX.OutputRate OutputRate;
///
/// Specifies a custom output rate, as a structure. This member is ignored unless OutputRate equals . The default state value is 1/1.
To get the list of custom rates supported by the video processor, call . If a custom rate is used, it must be taken from this list.
///
///
/// dd318767
/// DXVAHD_RATIONAL CustomRate
/// DXVAHD_RATIONAL CustomRate
public SharpDX.MediaFoundation.DirectX.Rational CustomRate;
}
///
/// Contains the color palette entries for an input stream, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// This stream state is used for input streams that have a palettized color format. Palettized formats with 4 bits per pixel (bpp) use the first 16 entries in the list. Formats with 8 bpp use the first 256 entries.
If a pixel has a palette index greater than the number of entries, the device treats the pixel as being white with opaque alpha. For full-range RGB, this value will be (255, 255, 255, 255); for YCbCr the value will be (255, 235, 128, 128).
The caller allocates the pEntries array. Set the Count member to the number of elements in the array. When retrieving the state data, you can set the pEntries member to null to get the number of palette entries. The device will return the count in the Count member.
If the DXVA-HD device does not have the capability, every palette entry must have an alpha value of 0xFF (opaque). Otherwise, an error is returned from .
To get the device capabilities, call and check the FeatureCaps member of the structure.
///
///
/// dd318768
/// DXVAHD_STREAM_STATE_PALETTE_DATA
/// DXVAHD_STREAM_STATE_PALETTE_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStatePaletteData {
///
/// The number of palette entries. The default state value is 0.
///
///
/// dd318768
/// unsigned int Count
/// unsigned int Count
public int Count;
///
/// A reference to an array of values. For RGB streams, the palette entries use a (ARGB-32) representation. For YCbCr streams, the palette entries use an AYUV representation. The alpha channel is used for alpha blending; see .
///
///
/// dd318768
/// void* pEntries
/// void pEntries
public System.IntPtr PEntries;
}
///
/// Contains data for a private stream state, for a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) input stream.
///
///
/// Use this structure for proprietary or device-specific state parameters.
The caller allocates the pData array. Set the DataSize member to the size of the array in bytes. When retrieving the state data, you can set the pData member to null to get the size of the data. The device will return the size in the DataSize member.
///
///
/// dd318769
/// DXVAHD_STREAM_STATE_PRIVATE_DATA
/// DXVAHD_STREAM_STATE_PRIVATE_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStatePrivateData {
///
/// A that identifies the private stream state. The following is defined.
| Value | Meaning |
- DXVAHD_STREAM_STATE_PRIVATE_IVTC
| Retrieves statistics about inverse telecine. The state data (pData) is a structure. |
?
A device can define additional GUIDs for use with custom stream states. The interpretation of the data is then defined by the device.
///
///
/// dd318769
/// GUID Guid
/// GUID Guid
public System.Guid Guid;
///
/// The size, in bytes, of the buffer pointed to by the pData member.
///
///
/// dd318769
/// unsigned int DataSize
/// unsigned int DataSize
public int DataSize;
///
/// A reference to a buffer that contains the private state data. The DXVA-HD runtime passes this buffer directly to the device, without validation.
///
///
/// dd318769
/// void* pData
/// void pData
public System.IntPtr PData;
}
///
/// Contains inverse telecine (IVTC) statistics from a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.
///
///
/// If the DXVA-HD device supports IVTC statistics, it can detect when the input video contains telecined frames. You can use this information to enable IVTC in the device.
To enable IVTC statistics, do the following:
- Allocate a structure and set the Enable member to TRUE.
- Initialize a structure with these values:
- Set Guid to DXVAHD_STREAM_STATE_PRIVATE_IVTC.
- Set DataSize to
sizeof(). - Set pData to point to the structure.
- Call the method. Set the State parameter of that method to and the pData parameter to the address of the structure.
To get the most recent IVTC statistics from the device, call the method. The state parameter and data buffer are the same.
Typically, an application would use this feature as follows:
- Enable IVTC statistics.
- Begin sending interlaced video frames to the DXVA-HD device.
- At some point, query the device for the current IVTC statistics.
- If the device detects telecined frames, use a custom frame rate to perform IVTC. For more information, see .
///
///
/// dd318770
/// DXVAHD_STREAM_STATE_PRIVATE_IVTC_DATA
/// DXVAHD_STREAM_STATE_PRIVATE_IVTC_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStatePrivateIvtcData {
///
/// Specifies whether IVTC statistics are enabled. The default state value is . Setting the value to TRUE enables IVTC statistics, and resets all of the IVTC statistical data to zero.
///
///
/// dd318770
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// If the driver detects that the frames are telecined, and is able to perform inverse telecine, this field contains a member of the enumeration. Otherwise, the value is 0.
///
///
/// dd318770
/// unsigned int ITelecineFlags
/// unsigned int ITelecineFlags
public int ITelecineFlags;
///
/// The number of consecutive telecined frames that the device has detected.
///
///
/// dd318770
/// unsigned int Frames
/// unsigned int Frames
public int Frames;
///
/// The index of the most recent input field. The value of this member equals the most recent value of the InputFrameOrField member of the structure.
///
///
/// dd318770
/// unsigned int InputField
/// unsigned int InputField
public int InputField;
}
///
/// Specifies the source rectangle for an input stream when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD)
///
///
/// dd318771
/// DXVAHD_STREAM_STATE_SOURCE_RECT_DATA
/// DXVAHD_STREAM_STATE_SOURCE_RECT_DATA
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct StreamStateSourceRectangleData {
///
/// Specifies whether to blit the entire input surface or just the source rectangle. The default state value is .
| Value | Meaning |
- TRUE
| Use the source rectangle specified in the SourceRect member. |
| Blit the entire input surface. Ignore the SourceRect member. |
?
///
///
/// dd318771
/// BOOL Enable
/// BOOL Enable
public SharpDX.Mathematics.Interop.RawBool Enable;
///
/// The source rectangle, which defines the portion of the input sample that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface. The default state value is an empty rectangle, (0, 0, 0, 0).
If the Enable member is , the SourceRect member is ignored.
///
///
/// dd318771
/// RECT SourceRect
/// RECT SourceRect
public SharpDX.Rectangle SourceRect;
}
///
/// Contains references to functions implemented by a software plug-in for Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
///
///
/// If you provide a software plug-in for DXVA-HD, the plug-in must implement a set of functions that are defined by the function reference types in this structure.
At initialization, the DXVA-HD runtime calls the plug-in device's PDXVAHDSW_Plugin function. This function fills in a structure with references to the set of functions that are implemented by the plug-in device. When the application calls DXVA-HD methods, the DXVA-HD runtime calls the corresponding plug-in functions.
///
///
/// dd318386
/// DXVAHDSW_CALLBACKS
/// DXVAHDSW_CALLBACKS
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct SwCallbacks {
///
/// Function reference of type PDXVAHDSW_CreateDevice.
///
///
/// dd318386
/// __function__stdcall* CreateDevice
/// __function__stdcall CreateDevice
public System.IntPtr CreateDevice;
///
/// Function reference of type PDXVAHDSW_ProposeVideoPrivateFormat.
///
///
/// dd318386
/// __function__stdcall* ProposeVideoPrivateFormat
/// __function__stdcall ProposeVideoPrivateFormat
public System.IntPtr ProposeVideoPrivateFormat;
///
/// Function reference of type PDXVAHDSW_GetVideoProcessorDeviceCaps.
///
///
/// dd318386
/// __function__stdcall* GetVideoProcessorDeviceCaps
/// __function__stdcall GetVideoProcessorDeviceCaps
public System.IntPtr GetVideoProcessorDeviceCaps;
///
/// Function reference of type PDXVAHDSW_GetVideoProcessorOutputFormats.
///
///
/// dd318386
/// __function__stdcall* GetVideoProcessorOutputFormats
/// __function__stdcall GetVideoProcessorOutputFormats
public System.IntPtr GetVideoProcessorOutputFormats;
///
/// Function reference of type PDXVAHDSW_GetVideoProcessorInputFormats.
///
///
/// dd318386
/// __function__stdcall* GetVideoProcessorInputFormats
/// __function__stdcall GetVideoProcessorInputFormats
public System.IntPtr GetVideoProcessorInputFormats;
///
/// Function reference of type PDXVAHDSW_GetVideoProcessorCaps.
///
///
/// dd318386
/// __function__stdcall* GetVideoProcessorCaps
/// __function__stdcall GetVideoProcessorCaps
public System.IntPtr GetVideoProcessorCaps;
///
/// Function reference of type PDXVAHDSW_GetVideoProcessorCustomRates.
///
///
/// dd318386
/// __function__stdcall* GetVideoProcessorCustomRates
/// __function__stdcall GetVideoProcessorCustomRates
public System.IntPtr GetVideoProcessorCustomRates;
///
/// Function reference of type PDXVAHDSW_GetVideoProcessorFilterRange.
///
///
/// dd318386
/// __function__stdcall* GetVideoProcessorFilterRange
/// __function__stdcall GetVideoProcessorFilterRange
public System.IntPtr GetVideoProcessorFilterRange;
///
/// Function reference of type PDXVAHDSW_DestroyDevice.
///
///
/// dd318386
/// __function__stdcall* DestroyDevice
/// __function__stdcall DestroyDevice
public System.IntPtr DestroyDevice;
///
/// Function reference of type PDXVAHDSW_CreateVideoProcessor.
///
///
/// dd318386
/// __function__stdcall* CreateVideoProcessor
/// __function__stdcall CreateVideoProcessor
public System.IntPtr CreateVideoProcessor;
///
/// Function reference of type PDXVAHDSW_SetVideoProcessBltState.
///
///
/// dd318386
/// __function__stdcall* SetVideoProcessBltState
/// __function__stdcall SetVideoProcessBltState
public System.IntPtr SetVideoProcessBltState;
///
/// Function reference of type PDXVAHDSW_GetVideoProcessBltStatePrivate.
///
///
/// dd318386
/// __function__stdcall* GetVideoProcessBltStatePrivate
/// __function__stdcall GetVideoProcessBltStatePrivate
public System.IntPtr GetVideoProcessBltStatePrivate;
///
/// Function reference of type PDXVAHDSW_SetVideoProcessStreamState.
///
///
/// dd318386
/// __function__stdcall* SetVideoProcessStreamState
/// __function__stdcall SetVideoProcessStreamState
public System.IntPtr SetVideoProcessStreamState;
///
/// Function reference of type PDXVAHDSW_GetVideoProcessStreamStatePrivate.
///
///
/// dd318386
/// __function__stdcall* GetVideoProcessStreamStatePrivate
/// __function__stdcall GetVideoProcessStreamStatePrivate
public System.IntPtr GetVideoProcessStreamStatePrivate;
///
/// Function reference of type PDXVAHDSW_VideoProcessBltHD.
///
///
/// dd318386
/// __function__stdcall* VideoProcessBltHD
/// __function__stdcall VideoProcessBltHD
public System.IntPtr VideoProcessBltHD;
///
/// Function reference of type PDXVAHDSW_DestroyVideoProcessor.
///
///
/// dd318386
/// __function__stdcall* DestroyVideoProcessor
/// __function__stdcall DestroyVideoProcessor
public System.IntPtr DestroyVideoProcessor;
}
///
///
Defines the range of supported values for a DirectX Video Acceleration (DXVA) operation.
///
///
/// All values in this structure are specified as structures.
///
///
/// ms704572
/// DXVA2_ValueRange
/// DXVA2_ValueRange
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct ValueRange {
///
/// Minimum supported value.
///
///
/// ms704572
/// DXVA2_Fixed32 MinValue
/// DXVA2_Fixed32 MinValue
public SharpDX.MediaFoundation.DirectX.Fixed32 MinValue;
///
/// Maximum supported value.
///
///
/// ms704572
/// DXVA2_Fixed32 MaxValue
/// DXVA2_Fixed32 MaxValue
public SharpDX.MediaFoundation.DirectX.Fixed32 MaxValue;
///
/// Default value.
///
///
/// ms704572
/// DXVA2_Fixed32 DefaultValue
/// DXVA2_Fixed32 DefaultValue
public SharpDX.MediaFoundation.DirectX.Fixed32 DefaultValue;
///
/// Minimum increment between values.
///
///
/// ms704572
/// DXVA2_Fixed32 StepSize
/// DXVA2_Fixed32 StepSize
public SharpDX.MediaFoundation.DirectX.Fixed32 StepSize;
}
///
/// Describes a video stream for a DXVA decoder device or video processor device.
///
///
/// The InputSampleFreq member gives the frame rate of the decoded video stream, as received by the video renderer. The OutputFrameFreq member gives the frame rate of the video that is displayed after deinterlacing. If the input video is interlaced and the samples contain interleaved fields, the output frame rate is twice the input frame rate. If the input video is progressive or contains single fields, the output frame rate is the same as the input frame rate.
Decoders should set the values of InputSampleFreq and OutputFrameFreq if the frame rate is known. Otherwise, set these members to 0/0 to indicate an unknown frame rate.
///
///
/// ms694235
/// DXVA2_VideoDesc
/// DXVA2_VideoDesc
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct VideoDesc {
///
/// Width of the video frame, in pixels.
///
///
/// ms694235
/// unsigned int SampleWidth
/// unsigned int SampleWidth
public int SampleWidth;
///
/// Height of the video frame, in pixels.
///
///
/// ms694235
/// unsigned int SampleHeight
/// unsigned int SampleHeight
public int SampleHeight;
///
/// Additional details about the video format, specified as a structure.
///
///
/// ms694235
/// DXVA2_ExtendedFormat SampleFormat
/// DXVA2_ExtendedFormat SampleFormat
public SharpDX.MediaFoundation.DirectX.ExtendedFormat SampleFormat;
///
/// Surface format, specified as a value or FOURCC code. A FOURCC code can be constructed using the or MAKEFOURCC macros.
///
///
/// ms694235
/// D3DFORMAT Format
/// D3DFORMAT Format
public SharpDX.Direct3D9.Format Format;
///
/// Frame rate of the input video stream, specified as a structure.
///
///
/// ms694235
/// DXVA2_Frequency InputSampleFreq
/// DXVA2_Frequency InputSampleFreq
public SharpDX.MediaFoundation.DirectX.Frequency InputSampleFreq;
///
/// Frame rate of the output video, specified as a structure.
///
///
/// ms694235
/// DXVA2_Frequency OutputFrameFreq
/// DXVA2_Frequency OutputFrameFreq
public SharpDX.MediaFoundation.DirectX.Frequency OutputFrameFreq;
///
/// Level of data protection required when the user accessible bus (UAB) is present. If TRUE, the video must be protected when a UAB is present. If , the video is not required to be protected.
///
///
/// ms694235
/// unsigned int UABProtectionLevel
/// unsigned int UABProtectionLevel
public int UABProtectionLevel;
///
/// Reserved. Must be zero.
///
///
/// ms694235
/// unsigned int Reserved
/// unsigned int Reserved
public int Reserved;
}
///
///
Contains parameters for the method.
///
///
/// ms698741
/// DXVA2_VideoProcessBltParams
/// DXVA2_VideoProcessBltParams
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
public partial struct VideoProcessBltParams {
///
/// No documentation.
///
///
/// ms698741
/// longlong TargetFrame
/// longlong TargetFrame
public long TargetFrame;
///
/// No documentation.
///
///
/// ms698741
/// RECT TargetRect
/// RECT TargetRect
public SharpDX.Rectangle TargetRect;
///
/// No documentation.
///
///
/// ms698741
/// SIZE ConstrictionSize
/// SIZE ConstrictionSize
public SharpDX.Size2 ConstrictionSize;
///
/// No documentation.
///
///
/// ms698741
/// unsigned int StreamingFlags
/// unsigned int StreamingFlags
public int StreamingFlags;
///
/// No documentation.
///
///
/// ms698741
/// DXVA2_AYUVSample16 BackgroundColor
/// DXVA2_AYUVSample16 BackgroundColor
public SharpDX.MediaFoundation.DirectX.AYUVSample16 BackgroundColor;
///
/// No documentation.
///
///
/// ms698741
/// DXVA2_ExtendedFormat DestFormat
/// DXVA2_ExtendedFormat DestFormat
public SharpDX.MediaFoundation.DirectX.ExtendedFormat DestFormat;
///
/// No documentation.
///
///
/// ms698741
/// DXVA2_ProcAmpValues ProcAmpValues
/// DXVA2_ProcAmpValues ProcAmpValues
public SharpDX.MediaFoundation.DirectX.ProcAmpValues ProcAmpValues;
///
/// No documentation.
///
///
/// ms698741
/// DXVA2_Fixed32 Alpha
/// DXVA2_Fixed32 Alpha
public SharpDX.MediaFoundation.DirectX.Fixed32 Alpha;
///
/// No documentation.
///
///
/// ms698741
/// DXVA2_FilterValues NoiseFilterLuma
/// DXVA2_FilterValues NoiseFilterLuma
public SharpDX.MediaFoundation.DirectX.FilterValues NoiseFilterLuma;
///
/// No documentation.
///
///
/// ms698741
/// DXVA2_FilterValues NoiseFilterChroma
/// DXVA2_FilterValues NoiseFilterChroma
public SharpDX.MediaFoundation.DirectX.FilterValues NoiseFilterChroma;
///
/// No documentation.
///
///
/// ms698741
/// DXVA2_FilterValues DetailFilterLuma
/// DXVA2_FilterValues DetailFilterLuma
public SharpDX.MediaFoundation.DirectX.FilterValues DetailFilterLuma;
///
/// No documentation.
///
///
/// ms698741
/// DXVA2_FilterValues DetailFilterChroma
/// DXVA2_FilterValues DetailFilterChroma
public SharpDX.MediaFoundation.DirectX.FilterValues DetailFilterChroma;
///
/// No documentation.
///
///
/// ms698741
/// unsigned int DestData
/// unsigned int DestData
public int DestData;
}
///
///
Describes the capabilities of a DirectX Video Acceleration (DVXA) video processor mode.
///
///
/// ms703795
/// DXVA2_VideoProcessorCaps
/// DXVA2_VideoProcessorCaps
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct VideoProcessorCaps {
///
/// Identifies the type of device. The following values are defined.
| Value | Meaning |
| DXVA 2.0 video processing is emulated by using DXVA 1.0. An emulated device may be missing significant processing capabilities and have lower image quality and performance. |
| Hardware device. |
| Software device. |
?
///
///
/// ms703795
/// unsigned int DeviceCaps
/// unsigned int DeviceCaps
public int DeviceCaps;
///
/// The Direct3D memory pool used by the device.
///
///
/// ms703795
/// D3DPOOL InputPool
/// D3DPOOL InputPool
public SharpDX.Direct3D9.Pool InputPool;
///
/// Number of forward reference samples the device needs to perform deinterlacing. For the bob, progressive scan, and software devices, the value is zero.
///
///
/// ms703795
/// unsigned int NumForwardRefSamples
/// unsigned int NumForwardRefSamples
public int NumForwardRefSamples;
///
/// Number of backward reference samples the device needs to perform deinterlacing. For the bob, progressive scan, and software devices, the value is zero.
///
///
/// ms703795
/// unsigned int NumBackwardRefSamples
/// unsigned int NumBackwardRefSamples
public int NumBackwardRefSamples;
///
/// Reserved. Must be zero.
///
///
/// ms703795
/// unsigned int Reserved
/// unsigned int Reserved
public int Reserved;
///
/// Identifies the deinteracing technique used by the device. This value is a bitwise OR of one or more of the following flags.
| Value | Meaning |
| The algorithm is unknown or proprietary. |
| The algorithm creates missing lines by repeating the line either above or below the missing line. This algorithm produces a jagged image and is not recommended. |
| The algorithm creates missing lines by averaging two lines. Slight vertical adjustments are made so that the resulting image does not bob up and down. |
| The algorithm creates missing lines by applying a [?1, 9, 9, ?1]/16 filter across four lines. Slight vertical adjustments are made so that the resulting image does not bob up and down. |
| The algorithm uses median filtering to recreate the pixels in the missing lines. |
| The algorithm uses an edge filter to create the missing lines. In this process, spatial directional filters are applied to determine the orientation of edges in the picture content. Missing pixels are created by filtering along (rather than across) the detected edges. |
| The algorithm uses spatial or temporal interpolation, switching between the two on a field-by-field basis, depending on the amount of motion. |
| The algorithm uses spatial or temporal interpolation, switching between the two on a pixel-by-pixel basis, depending on the amount of motion. |
| The algorithm identifies objects within a sequence of video fields. Before it recreates the missing pixels, it aligns the movement axes of the individual objects in the scene to make them parallel with the time axis. |
| The device can undo the 3:2 pulldown process used in telecine. |
?
///
///
/// ms703795
/// unsigned int DeinterlaceTechnology
/// unsigned int DeinterlaceTechnology
public int DeinterlaceTechnology;
///
/// Specifies the available video processor (ProcAmp) operations. The value is a bitwise OR of ProcAmp Settings constants.
///
///
/// ms703795
/// unsigned int ProcAmpControlCaps
/// unsigned int ProcAmpControlCaps
public int ProcAmpControlCaps;
///
/// Specifies operations that the device can perform concurrently with the operation. The value is a bitwise OR of the following flags.
| Value | Meaning |
| The device can convert the video from YUV color space to RGB color space, with at least 8 bits of precision for each RGB component. |
| The device can stretch or shrink the video horizontally. If this capability is present, aspect ratio correction can be performed at the same time as deinterlacing. |
| The device can stretch or shrink the video vertically. If this capability is present, image resizing and aspect ratio correction can be performed at the same time. |
| The device can alpha blend the video. |
| The device can operate on a subrectangle of the video frame. If this capability is present, source images can be cropped before further processing occurs. |
| The device can accept substreams in addition to the primary video stream, and can composite them. |
| The device can perform color adjustments on the primary video stream and substreams, at the same time that it deinterlaces the video and composites the substreams. The destination color space is defined in the DestFormat member of the structure. The source color space for each stream is defined in the SampleFormat member of the structure. |
| The device can convert the video from YUV to RGB color space when it writes the deinterlaced and composited pixels to the destination surface. An RGB destination surface could be an off-screen surface, texture, Direct3D render target, or combined texture/render target surface. An RGB destination surface must use at least 8 bits for each color channel. |
| The device can perform an alpha blend operation with the destination surface when it writes the deinterlaced and composited pixels to the destination surface. |
| The device can downsample the output frame, as specified by the ConstrictionSize member of the structure. |
| The device can perform noise filtering. |
| The device can perform detail filtering. |
| The device can perform a constant alpha blend to the entire video stream when it composites the video stream and substreams. |
| The device can perform accurate linear RGB scaling, rather than performing them in nonlinear gamma space. |
| The device can correct the image to compensate for artifacts introduced when performing scaling in nonlinear gamma space. |
| The deinterlacing algorithm preserves the original field lines from the interlaced field picture, unless scaling is also applied. For example, in deinterlacing algorithms such as bob and median filtering, the device copies the original field into every other scan line and then applies a filter to reconstruct the missing scan lines. As a result, the original field can be recovered by discarding the scan lines that were interpolated. If the image is scaled vertically, however, the original field lines cannot be recovered. If the image is scaled horizontally (but not vertically), the resulting field lines will be equivalent to scaling the original field picture. (In other words, discarding the interpolated scan lines will yield the same result as stretching the original picture without deinterlacing.) |
?
///
///
/// ms703795
/// unsigned int VideoProcessorOperations
/// unsigned int VideoProcessorOperations
public int VideoProcessorOperations;
///
/// Specifies the supported noise filters. The value is a bitwise OR of the following flags.
| Value | Meaning |
| Noise filtering is not supported. |
| Unknown or proprietary filter. |
| Median filter. |
| Temporal filter. |
| Block noise filter. |
| Mosquito noise filter. |
?
///
///
/// ms703795
/// unsigned int NoiseFilterTechnology
/// unsigned int NoiseFilterTechnology
public int NoiseFilterTechnology;
///
/// Specifies the supported detail filters. The value is a bitwise OR of the following flags.
| Value | Meaning |
| Detail filtering is not supported. |
| Unknown or proprietary filter. |
| Edge filter. |
| Sharpen filter. |
?
///
///
/// ms703795
/// unsigned int DetailFilterTechnology
/// unsigned int DetailFilterTechnology
public int DetailFilterTechnology;
}
///
///
Specifies an input sample for the method.
///
///
/// ms693598
/// DXVA2_VideoSample
/// DXVA2_VideoSample
public partial struct VideoSample {
///
/// No documentation.
///
///
/// ms693598
/// longlong Start
/// longlong Start
public long Start;
///
/// No documentation.
///
///
/// ms693598
/// longlong End
/// longlong End
public long End;
///
/// No documentation.
///
///
/// ms693598
/// DXVA2_ExtendedFormat SampleFormat
/// DXVA2_ExtendedFormat SampleFormat
public SharpDX.MediaFoundation.DirectX.ExtendedFormat SampleFormat;
///
/// No documentation.
///
///
/// ms693598
/// IDirect3DSurface9* SrcSurface
/// IDirect3DSurface9 SrcSurface
public System.IntPtr SrcSurface;
///
/// No documentation.
///
///
/// ms693598
/// RECT SrcRect
/// RECT SrcRect
public SharpDX.Rectangle SrcRect;
///
/// No documentation.
///
///
/// ms693598
/// RECT DstRect
/// RECT DstRect
public SharpDX.Rectangle DstRect;
///
/// No documentation.
///
///
/// ms693598
/// DXVA2_AYUVSample8 Pal[16]
/// DXVA2_AYUVSample8 Pal
public SharpDX.MediaFoundation.DirectX.AYUVSample8[] Pal {
get { return _Pal ?? (_Pal = new SharpDX.MediaFoundation.DirectX.AYUVSample8[16]);}
}
internal SharpDX.MediaFoundation.DirectX.AYUVSample8[] _Pal;
///
/// No documentation.
///
///
/// ms693598
/// DXVA2_Fixed32 PlanarAlpha
/// DXVA2_Fixed32 PlanarAlpha
public SharpDX.MediaFoundation.DirectX.Fixed32 PlanarAlpha;
///
/// No documentation.
///
///
/// ms693598
/// unsigned int SampleData
/// unsigned int SampleData
public int SampleData;
// Internal native struct used for marshalling
[StructLayout(LayoutKind.Sequential, Pack = 8 )]
internal partial struct __Native {
public long Start;
public long End;
public SharpDX.MediaFoundation.DirectX.ExtendedFormat SampleFormat;
public System.IntPtr SrcSurface;
public SharpDX.Rectangle SrcRect;
public SharpDX.Rectangle DstRect;
public SharpDX.MediaFoundation.DirectX.AYUVSample8 Pal;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal1;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal2;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal3;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal4;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal5;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal6;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal7;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal8;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal9;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal10;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal11;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal12;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal13;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal14;
SharpDX.MediaFoundation.DirectX.AYUVSample8 __Pal15;
public SharpDX.MediaFoundation.DirectX.Fixed32 PlanarAlpha;
public int SampleData;
// Method to free unmanaged allocation
internal unsafe void __MarshalFree()
{
}
}
// Method to free unmanaged allocation
internal unsafe void __MarshalFree(ref __Native @ref)
{
@ref.__MarshalFree();
}
// Method to marshal from native to managed struct
internal unsafe void __MarshalFrom(ref __Native @ref)
{
this.Start = @ref.Start;
this.End = @ref.End;
this.SampleFormat = @ref.SampleFormat;
this.SrcSurface = @ref.SrcSurface;
this.SrcRect = @ref.SrcRect;
this.DstRect = @ref.DstRect;
fixed (void* __to = &this.Pal[0]) fixed (void* __from = &@ref.Pal) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 16*sizeof ( SharpDX.MediaFoundation.DirectX.AYUVSample8));
this.PlanarAlpha = @ref.PlanarAlpha;
this.SampleData = @ref.SampleData;
}
// Method to marshal from managed struct tot native
internal unsafe void __MarshalTo(ref __Native @ref)
{
@ref.Start = this.Start;
@ref.End = this.End;
@ref.SampleFormat = this.SampleFormat;
@ref.SrcSurface = this.SrcSurface;
@ref.SrcRect = this.SrcRect;
@ref.DstRect = this.DstRect;
fixed (void* __to = &@ref.Pal) fixed (void* __from = &this.Pal[0]) SharpDX.Utilities.CopyMemory((IntPtr) __to, (IntPtr) __from, 16*sizeof ( SharpDX.MediaFoundation.DirectX.AYUVSample8));
@ref.PlanarAlpha = this.PlanarAlpha;
@ref.SampleData = this.SampleData;
}
}
///
/// Specifies the capabilities of the Microsoft DirectX Video Acceleration High Definition (DXVA-HD) video processor.
///
///
/// dd318773
/// DXVAHD_VPCAPS
/// DXVAHD_VPCAPS
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct Vpcaps {
///
/// A that identifies the video processor. This is defined by the device, and is used in various methods to specify the video processor.
///
///
/// dd318773
/// GUID VPGuid
/// GUID VPGuid
public System.Guid VPGuid;
///
/// The number of past reference frames required to perform the optimal video processing.
///
///
/// dd318773
/// unsigned int PastFrames
/// unsigned int PastFrames
public int PastFrames;
///
/// The number of future reference frames required to perform the optimal video processing.
///
///
/// dd318773
/// unsigned int FutureFrames
/// unsigned int FutureFrames
public int FutureFrames;
///
/// A bitwise OR of zero or more flags from the enumeration.
///
///
/// dd318773
/// unsigned int ProcessorCaps
/// unsigned int ProcessorCaps
public int ProcessorCaps;
///
/// A bitwise OR of zero or more flags from the enumeration.
///
///
/// dd318773
/// unsigned int ITelecineCaps
/// unsigned int ITelecineCaps
public int ITelecineCaps;
///
/// The number of custom output frame rates. To get the list of custom frame rates, call the method. Custom frame rates are used for frame-rate conversion and inverse telecine.
///
///
/// dd318773
/// unsigned int CustomRateCount
/// unsigned int CustomRateCount
public int CustomRateCount;
}
///
/// Specifies the capabilities of a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.
///
///
/// In DXVA-HD, the device stores state information for each input stream. These states persist between blits. With each blit, the application selects which streams to enable or disable. Disabling a stream does not affect the state information for that stream.
The MaxStreamStates member gives the maximum number of stream states that can be set by the application. The MaxInputStreams member gives the maximum number of streams that can be enabled during a blit. These two values can differ.
To set the state data for a stream, call .
///
///
/// dd318774
/// DXVAHD_VPDEVCAPS
/// DXVAHD_VPDEVCAPS
[StructLayout(LayoutKind.Sequential, Pack = 0 )]
public partial struct Vpdevcaps {
///
/// Specifies the device type, as a member of the enumeration.
///
///
/// dd318774
/// DXVAHD_DEVICE_TYPE DeviceType
/// DXVAHD_DEVICE_TYPE DeviceType
public SharpDX.MediaFoundation.DirectX.DeviceType DeviceType;
///
/// A bitwise OR of zero or more flags from the enumeration.
///
///
/// dd318774
/// unsigned int DeviceCaps
/// unsigned int DeviceCaps
public int DeviceCaps;
///
/// A bitwise OR of zero or more flags from the enumeration.
///
///
/// dd318774
/// unsigned int FeatureCaps
/// unsigned int FeatureCaps
public int FeatureCaps;
///
/// A bitwise OR of zero or more flags from the enumeration.
///
///
/// dd318774
/// unsigned int FilterCaps
/// unsigned int FilterCaps
public int FilterCaps;
///
/// A bitwise OR of zero or more flags from the enumeration.
///
///
/// dd318774
/// unsigned int InputFormatCaps
/// unsigned int InputFormatCaps
public int InputFormatCaps;
///
/// The memory pool that is required for the input video surfaces.
///
///
/// dd318774
/// D3DPOOL InputPool
/// D3DPOOL InputPool
public SharpDX.Direct3D9.Pool InputPool;
///
/// The number of supported output formats. To get the list of output formats, call the method.
///
///
/// dd318774
/// unsigned int OutputFormatCount
/// unsigned int OutputFormatCount
public int OutputFormatCount;
///
/// The number of supported input formats. To get the list of input formats, call the method.
///
///
/// dd318774
/// unsigned int InputFormatCount
/// unsigned int InputFormatCount
public int InputFormatCount;
///
/// The number of video processors. Each video processor represents a distinct set of processing capabilities. To get the capabilities of each video processor, call the method. To create a video processor, call the method.
///
///
/// dd318774
/// unsigned int VideoProcessorCount
/// unsigned int VideoProcessorCount
public int VideoProcessorCount;
///
/// The maximum number of input streams that can be enabled at the same time.
///
///
/// dd318774
/// unsigned int MaxInputStreams
/// unsigned int MaxInputStreams
public int MaxInputStreams;
///
/// The maximum number of input streams for which the device can store state data.
///
///
/// dd318774
/// unsigned int MaxStreamStates
/// unsigned int MaxStreamStates
public int MaxStreamStates;
}
}
#endif