提供视频解码功能

如何查询视频解码功能

若要查询用户模式显示驱动程序的视频解码功能 (UMD) ,D3D 运行时使用传递给GetCapsD3DDDIARG_GETCAPS结构的类型成员中指定的以下请求类型之一来调用 UMD 的GetCaps函数:

  • D3DDDICAPS_GETDECODEGUIDCOUNT
  • D3DDDICAPS_GETDECODEGUIDS
  • D3DDDICAPS_GETDECODERTFORMATCOUNT
  • D3DDDICAPS_GETDECODERTFORMATS
  • D3DDDICAPS_GETDECODECOMPRESSEDBUFFERINFOCOUNT
  • D3DDDICAPS_GETDECODECOMPRESSEDBUFFERINFO
  • D3DDDICAPS_GETDECODECONFIGURATIONCOUNT
  • D3DDDICAPS_GETDECODECONFIGURATIONS

GetCaps 返回以下内容:

  • UMD 的请求类型功能,位于D3DDDIARG_GETCAPSpData成员所指向的缓冲区中。 UMD 必须分配一个足够大的缓冲区来容纳这些功能。
  • 包含这些功能的缓冲区的 (大小(以字节为单位)) (以字节为单位)。

以下子主题列出了可能的请求类型及其关联的视频解码功能。

D3DDDICAPS_GETDECODEGUIDCOUNT 和 D3DDDICAPS_GETDECODEGUIDS 请求类型

Direct3D 运行时调用 GetCaps 来请求 guid 数量,然后再次调用 GetCaps ,请求提供支持的 guid 列表。 UMD 返回编号,然后返回以下列表中的 Guid 列表,它支持视频加速 (VA) 解码。 D3DDDIARG_GETCAPS。对于这两种请求类型, pInfo成员均为 NULL。

DEFINE_GUID(DXVADDI_ModeMPEG2_MoComp, 0xe6a9f44b, 0x61b0, 0x4563,0x9e,0xa4,0x63,0xd2,0xa3,0xc6,0xfe,0x66);
DEFINE_GUID(DXVADDI_ModeMPEG2_IDCT,   0xbf22ad00, 0x03ea, 0x4690,0x80,0x77,0x47,0x33,0x46,0x20,0x9b,0x7e);
DEFINE_GUID(DXVADDI_ModeMPEG2_VLD,    0xee27417f, 0x5e28, 0x4e65,0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);

DEFINE_GUID(DXVADDI_ModeH264_A,  0x1b81be64, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeH264_B,  0x1b81be65, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeH264_C,  0x1b81be66, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeH264_D,  0x1b81be67, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeH264_E,  0x1b81be68, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeH264_F,  0x1b81be69, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);

DEFINE_GUID(DXVADDI_ModeWMV8_A,  0x1b81be80, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeWMV8_B,  0x1b81be81, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);

DEFINE_GUID(DXVADDI_ModeWMV9_A,  0x1b81be90, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeWMV9_B,  0x1b81be91, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeWMV9_C,  0x1b81be94, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);

DEFINE_GUID(DXVADDI_ModeVC1_A,   0x1b81beA0, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeVC1_B,   0x1b81beA1, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeVC1_C,   0x1b81beA2, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(DXVADDI_ModeVC1_D,   0x1b81beA3, 0xa0c7, 0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);

#define DXVADDI_ModeMPEG2_MOCOMP  DXVADDI_ModeMPEG2_MoComp

#define DXVADDI_ModeWMV8_PostProc  DXVADDI_ModeWMV8_A
#define DXVADDI_ModeWMV8_MoComp  DXVADDI_ModeWMV8_B

#define DXVADDI_ModeWMV9_PostProc  DXVADDI_ModeWMV9_A
#define DXVADDI_ModeWMV9_MoComp  DXVADDI_ModeWMV9_B
#define DXVADDI_ModeWMV9_IDCT  DXVADDI_ModeWMV9_C

#define DXVADDI_ModeVC1_PostProc  DXVADDI_ModeVC1_A
#define DXVADDI_ModeVC1_MoComp  DXVADDI_ModeVC1_B
#define DXVADDI_ModeVC1_IDCT  DXVADDI_ModeVC1_C
#define DXVADDI_ModeVC1_VLD  DXVADDI_ModeVC1_D

#define DXVADDI_ModeH264_MoComp_NoFGT  DXVADDI_ModeH264_A
#define DXVADDI_ModeH264_MoComp_FGT  DXVADDI_ModeH264_B
#define DXVADDI_ModeH264_IDCT_NoFGT  DXVADDI_ModeH264_C
#define DXVADDI_ModeH264_IDCT_FGT  DXVADDI_ModeH264_D
#define DXVADDI_ModeH264_VLD_NoFGT  DXVADDI_ModeH264_E
#define DXVADDI_ModeH264_VLD_FGT  DXVADDI_ModeH264_F

D3DDDICAPS_GETDECODERTFORMATCOUNT 和 D3DDDICAPS_GETDECODERTFORMATS 请求类型

Direct3D 运行时在D3DDDIARG_GETCAPSpInfo成员指向的变量中指定特定 DirectX VA 解码类型的 GUID。 UMD 返回数字,然后返回该数字,并显示它支持的特定 DirectX VA 解码类型的呈现器目标格式列表。

D3DDDICAPS_GETDECODECOMPRESSEDBUFFERINFOCOUNT 和 D3DDDICAPS_GETDECODECOMPRESSEDBUFFERINFO 请求类型

Direct3D 运行时为D3DDDIARG_GETCAPS指向的pInfo成员的变量中的特定 DirectX VA 解码类型指定DXVADDI_DECODEINPUT结构。 UMD 返回有关加快视频解码所需的压缩缓冲区类型的数量和信息。 UMD 返回有关 D3DDDIARG_GETCAPS 的pData成员指定的DXVADDI_DECODEBUFFERINFO结构数组中的压缩缓冲区类型的信息。

D3DDDICAPS_GETDECODECONFIGURATIONCOUNT 和 D3DDDICAPS_GETDECODECONFIGURATIONS 请求类型

Direct3D 运行时为 D3DDDIARG_GETCAPS 指向的pInfo成员的变量中的特定 DirectX VA 解码类型指定DXVADDI_DECODEINPUT结构。 UMD 将返回该数字,以及它支持的针对特定 DirectX VA 解码类型的已加速解码配置列表。 UMD 会在 D3DDDIARG_GETCAPS 的pData成员指定的DXVADDI_CONFIGPICTUREDECODE结构数组中返回加速解码配置。