ホーム › Media.MediaFoundation › D3D12_VIDEO_DECODER_DESC
D3D12_VIDEO_DECODER_DESC
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NodeMask | DWORD | 4 | +0 | +0 | デコーダを割り当てる物理アダプタノードを示すビットマスク。 |
| Configuration | D3D12_VIDEO_DECODE_CONFIGURATION | 24 | +4 | +4 | デコード構成を示すD3D12_VIDEO_DECODE_CONFIGURATION。 |
各言語での定義
#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_VIDEO_DECODER_DESC (x64 28 / x86 28 バイト)
typedef struct D3D12_VIDEO_DECODER_DESC {
DWORD NodeMask;
D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
} D3D12_VIDEO_DECODER_DESC;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_VIDEO_DECODER_DESC
{
public uint NodeMask;
public D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
}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_VIDEO_DECODER_DESC
Public NodeMask As UInteger
Public Configuration As D3D12_VIDEO_DECODE_CONFIGURATION
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_VIDEO_DECODER_DESC(ctypes.Structure):
_fields_ = [
("NodeMask", wintypes.DWORD),
("Configuration", D3D12_VIDEO_DECODE_CONFIGURATION),
]#[repr(C)]
pub struct D3D12_VIDEO_DECODE_CONFIGURATION {
pub DecodeProfile: GUID,
pub BitstreamEncryption: i32,
pub InterlaceType: i32,
}
#[repr(C)]
pub struct D3D12_VIDEO_DECODER_DESC {
pub NodeMask: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_DECODE_CONFIGURATION struct {
DecodeProfile windows.GUID
BitstreamEncryption int32
InterlaceType int32
}
type D3D12_VIDEO_DECODER_DESC struct {
NodeMask uint32
Configuration D3D12_VIDEO_DECODE_CONFIGURATION
}type
D3D12_VIDEO_DECODE_CONFIGURATION = record
DecodeProfile: TGUID;
BitstreamEncryption: Integer;
InterlaceType: Integer;
end;
D3D12_VIDEO_DECODER_DESC = record
NodeMask: DWORD;
Configuration: D3D12_VIDEO_DECODE_CONFIGURATION;
end;const D3D12_VIDEO_DECODE_CONFIGURATION = extern struct {
DecodeProfile: GUID,
BitstreamEncryption: i32,
InterlaceType: i32,
};
const D3D12_VIDEO_DECODER_DESC = extern struct {
NodeMask: u32,
Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
};type
D3D12_VIDEO_DECODE_CONFIGURATION {.bycopy.} = object
DecodeProfile: GUID
BitstreamEncryption: int32
InterlaceType: int32
D3D12_VIDEO_DECODER_DESC {.bycopy.} = object
NodeMask: uint32
Configuration: D3D12_VIDEO_DECODE_CONFIGURATIONstruct D3D12_VIDEO_DECODE_CONFIGURATION
{
GUID DecodeProfile;
int BitstreamEncryption;
int InterlaceType;
}
struct D3D12_VIDEO_DECODER_DESC
{
uint NodeMask;
D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_VIDEO_DECODER_DESC サイズ: 28 バイト(x64)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; NodeMask : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Configuration : D3D12_VIDEO_DECODE_CONFIGURATION (+4, 24byte) varptr(st)+4 を基点に操作(24byte:入れ子/配列)
; ※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_VIDEO_DECODER_DESC
#field int NodeMask
#field D3D12_VIDEO_DECODE_CONFIGURATION Configuration
#endstruct
stdim st, D3D12_VIDEO_DECODER_DESC ; NSTRUCT 変数を確保
st->NodeMask = 100
mes "NodeMask=" + st->NodeMask