ホーム › Media.MediaFoundation › D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS
D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NodeIndex | DWORD | 4 | +0 | +0 | 単一 GPU で動作させる場合は、これを 0 に設定します。複数の GPU ノードがある場合は、コマンドキューの適用先となるノード (デバイスの物理アダプター) を識別するビットを設定します。マスク内の各ビットが 1 つのノードに対応します。設定できるビットは 1 つだけです。 |
| Configuration | D3D12_VIDEO_DECODE_CONFIGURATION | 24 | +4 | +4 | 形式の一覧に対するデコード構成を記述する D3D12_VIDEO_DECODE_CONFIGURATION 構造体です。 |
| FormatCount | DWORD | 4 | +28 | +28 | 取得する形式の数です。この数は、指定された機能が D3D12_FEATURE_VIDEO_DECODE_FORMAT_COUNT である場合の ID3D12VideoDevice::CheckFeatureSupport の呼び出しから返される値と一致しなければなりません。 |
| pOutputFormats | DXGI_FORMAT* | 8/4 | +32 | +32 | サポートされている形式を表す DXGI_FORMAT 構造体の一覧です。 |
公式ドキュメント
指定された機能が D3D12_FEATURE_VIDEO_DECODE_FORMAT である場合の ID3D12VideoDevice::CheckFeatureSupport の呼び出しにデータを提供します。サポートされている形式の一覧を取得します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// D3D12_VIDEO_DECODE_CONFIGURATION (x64 24 / x86 24 バイト)
typedef struct D3D12_VIDEO_DECODE_CONFIGURATION {
GUID DecodeProfile;
D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption;
D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE InterlaceType;
} D3D12_VIDEO_DECODE_CONFIGURATION;
// D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS (x64 40 / x86 36 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS {
DWORD NodeIndex;
D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
DWORD FormatCount;
DXGI_FORMAT* pOutputFormats;
} D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_DECODE_CONFIGURATION
{
public Guid DecodeProfile;
public int BitstreamEncryption;
public int InterlaceType;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS
{
public uint NodeIndex;
public D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
public uint FormatCount;
public IntPtr pOutputFormats;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_DECODE_CONFIGURATION
Public DecodeProfile As Guid
Public BitstreamEncryption As Integer
Public InterlaceType As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS
Public NodeIndex As UInteger
Public Configuration As D3D12_VIDEO_DECODE_CONFIGURATION
Public FormatCount As UInteger
Public pOutputFormats As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class D3D12_VIDEO_DECODE_CONFIGURATION(ctypes.Structure):
_fields_ = [
("DecodeProfile", GUID),
("BitstreamEncryption", ctypes.c_int),
("InterlaceType", ctypes.c_int),
]
class D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS(ctypes.Structure):
_fields_ = [
("NodeIndex", wintypes.DWORD),
("Configuration", D3D12_VIDEO_DECODE_CONFIGURATION),
("FormatCount", wintypes.DWORD),
("pOutputFormats", ctypes.c_void_p),
]#[repr(C)]
pub struct D3D12_VIDEO_DECODE_CONFIGURATION {
pub DecodeProfile: GUID,
pub BitstreamEncryption: i32,
pub InterlaceType: i32,
}
#[repr(C)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS {
pub NodeIndex: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
pub FormatCount: u32,
pub pOutputFormats: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_DECODE_CONFIGURATION struct {
DecodeProfile windows.GUID
BitstreamEncryption int32
InterlaceType int32
}
type D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS struct {
NodeIndex uint32
Configuration D3D12_VIDEO_DECODE_CONFIGURATION
FormatCount uint32
pOutputFormats uintptr
}type
D3D12_VIDEO_DECODE_CONFIGURATION = record
DecodeProfile: TGUID;
BitstreamEncryption: Integer;
InterlaceType: Integer;
end;
D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS = record
NodeIndex: DWORD;
Configuration: D3D12_VIDEO_DECODE_CONFIGURATION;
FormatCount: DWORD;
pOutputFormats: Pointer;
end;const D3D12_VIDEO_DECODE_CONFIGURATION = extern struct {
DecodeProfile: GUID,
BitstreamEncryption: i32,
InterlaceType: i32,
};
const D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS = extern struct {
NodeIndex: u32,
Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
FormatCount: u32,
pOutputFormats: ?*anyopaque,
};type
D3D12_VIDEO_DECODE_CONFIGURATION {.bycopy.} = object
DecodeProfile: GUID
BitstreamEncryption: int32
InterlaceType: int32
D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS {.bycopy.} = object
NodeIndex: uint32
Configuration: D3D12_VIDEO_DECODE_CONFIGURATION
FormatCount: uint32
pOutputFormats: pointerstruct D3D12_VIDEO_DECODE_CONFIGURATION
{
GUID DecodeProfile;
int BitstreamEncryption;
int InterlaceType;
}
struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS
{
uint NodeIndex;
D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
uint FormatCount;
void* pOutputFormats;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS サイズ: 36 バイト(x86)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Configuration : D3D12_VIDEO_DECODE_CONFIGURATION (+4, 24byte) varptr(st)+4 を基点に操作(24byte:入れ子/配列)
; FormatCount : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; pOutputFormats : DXGI_FORMAT* (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Configuration : D3D12_VIDEO_DECODE_CONFIGURATION (+4, 24byte) varptr(st)+4 を基点に操作(24byte:入れ子/配列)
; FormatCount : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; pOutputFormats : DXGI_FORMAT* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global D3D12_VIDEO_DECODE_CONFIGURATION
#field GUID DecodeProfile
#field int BitstreamEncryption
#field int InterlaceType
#endstruct
#defstruct global D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS
#field int NodeIndex
#field D3D12_VIDEO_DECODE_CONFIGURATION Configuration
#field int FormatCount
#field intptr pOutputFormats
#endstruct
stdim st, D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS ; NSTRUCT 変数を確保
st->NodeIndex = 100
mes "NodeIndex=" + st->NodeIndex