ホーム › Media.MediaFoundation › D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE
D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NodeIndex | DWORD | 4 | +0 | +0 | 対象とする物理アダプタノードのインデックス。 |
| Codec | D3D12_VIDEO_ENCODER_CODEC | 4 | +4 | +4 | 対象とするエンコードコーデックを示すD3D12_VIDEO_ENCODER_CODEC。 |
| Profile | D3D12_VIDEO_ENCODER_PROFILE_DESC | 16/8 | +8 | +8 | 対象とするエンコードプロファイルを示すD3D12_VIDEO_ENCODER_PROFILE_DESC。 |
| Level | D3D12_VIDEO_ENCODER_LEVEL_SETTING | 16/8 | +24 | +16 | 対象とするエンコードレベルを示すD3D12_VIDEO_ENCODER_LEVEL_SETTING。 |
| SubregionMode | D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE | 4 | +40 | +24 | 問い合わせるフレーム分割(スライス/タイル)方式を示すD3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE。 |
| IsSupported | BOOL | 4 | +44 | +28 | 指定分割方式がサポートされるか否かを示すBOOL(出力)。 |
各言語での定義
#include <windows.h>
// D3D12_VIDEO_ENCODER_PROFILE_DESC (x64 16 / x86 8 バイト)
typedef struct D3D12_VIDEO_ENCODER_PROFILE_DESC {
DWORD DataSize;
_Anonymous_e__Union Anonymous;
} D3D12_VIDEO_ENCODER_PROFILE_DESC;
// D3D12_VIDEO_ENCODER_LEVEL_SETTING (x64 16 / x86 8 バイト)
typedef struct D3D12_VIDEO_ENCODER_LEVEL_SETTING {
DWORD DataSize;
_Anonymous_e__Union Anonymous;
} D3D12_VIDEO_ENCODER_LEVEL_SETTING;
// D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE (x64 48 / x86 32 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE {
DWORD NodeIndex;
D3D12_VIDEO_ENCODER_CODEC Codec;
D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
D3D12_VIDEO_ENCODER_LEVEL_SETTING Level;
D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE SubregionMode;
BOOL IsSupported;
} D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_PROFILE_DESC
{
public uint DataSize;
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_LEVEL_SETTING
{
public uint DataSize;
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE
{
public uint NodeIndex;
public int Codec;
public D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
public D3D12_VIDEO_ENCODER_LEVEL_SETTING Level;
public int SubregionMode;
[MarshalAs(UnmanagedType.Bool)] public bool IsSupported;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_PROFILE_DESC
Public DataSize As UInteger
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_LEVEL_SETTING
Public DataSize As UInteger
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE
Public NodeIndex As UInteger
Public Codec As Integer
Public Profile As D3D12_VIDEO_ENCODER_PROFILE_DESC
Public Level As D3D12_VIDEO_ENCODER_LEVEL_SETTING
Public SubregionMode As Integer
<MarshalAs(UnmanagedType.Bool)> Public IsSupported As Boolean
End Structureimport ctypes
from ctypes import wintypes
class D3D12_VIDEO_ENCODER_PROFILE_DESC(ctypes.Structure):
_fields_ = [
("DataSize", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]
class D3D12_VIDEO_ENCODER_LEVEL_SETTING(ctypes.Structure):
_fields_ = [
("DataSize", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]
class D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(ctypes.Structure):
_fields_ = [
("NodeIndex", wintypes.DWORD),
("Codec", ctypes.c_int),
("Profile", D3D12_VIDEO_ENCODER_PROFILE_DESC),
("Level", D3D12_VIDEO_ENCODER_LEVEL_SETTING),
("SubregionMode", ctypes.c_int),
("IsSupported", wintypes.BOOL),
]#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_PROFILE_DESC {
pub DataSize: u32,
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_LEVEL_SETTING {
pub DataSize: u32,
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE {
pub NodeIndex: u32,
pub Codec: i32,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub SubregionMode: i32,
pub IsSupported: i32,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_ENCODER_PROFILE_DESC struct {
DataSize uint32
Anonymous _Anonymous_e__Union
}
type D3D12_VIDEO_ENCODER_LEVEL_SETTING struct {
DataSize uint32
Anonymous _Anonymous_e__Union
}
type D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE struct {
NodeIndex uint32
Codec int32
Profile D3D12_VIDEO_ENCODER_PROFILE_DESC
Level D3D12_VIDEO_ENCODER_LEVEL_SETTING
SubregionMode int32
IsSupported int32
}type
D3D12_VIDEO_ENCODER_PROFILE_DESC = record
DataSize: DWORD;
Anonymous: _Anonymous_e__Union;
end;
D3D12_VIDEO_ENCODER_LEVEL_SETTING = record
DataSize: DWORD;
Anonymous: _Anonymous_e__Union;
end;
D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = record
NodeIndex: DWORD;
Codec: Integer;
Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC;
Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING;
SubregionMode: Integer;
IsSupported: BOOL;
end;const D3D12_VIDEO_ENCODER_PROFILE_DESC = extern struct {
DataSize: u32,
Anonymous: _Anonymous_e__Union,
};
const D3D12_VIDEO_ENCODER_LEVEL_SETTING = extern struct {
DataSize: u32,
Anonymous: _Anonymous_e__Union,
};
const D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = extern struct {
NodeIndex: u32,
Codec: i32,
Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
SubregionMode: i32,
IsSupported: i32,
};type
D3D12_VIDEO_ENCODER_PROFILE_DESC {.bycopy.} = object
DataSize: uint32
Anonymous: _Anonymous_e__Union
D3D12_VIDEO_ENCODER_LEVEL_SETTING {.bycopy.} = object
DataSize: uint32
Anonymous: _Anonymous_e__Union
D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE {.bycopy.} = object
NodeIndex: uint32
Codec: int32
Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC
Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING
SubregionMode: int32
IsSupported: int32struct D3D12_VIDEO_ENCODER_PROFILE_DESC
{
uint DataSize;
_Anonymous_e__Union Anonymous;
}
struct D3D12_VIDEO_ENCODER_LEVEL_SETTING
{
uint DataSize;
_Anonymous_e__Union Anonymous;
}
struct D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE
{
uint NodeIndex;
int Codec;
D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
D3D12_VIDEO_ENCODER_LEVEL_SETTING Level;
int SubregionMode;
int IsSupported;
}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_ENCODER_FRAME_SUBREGION_LAYOUT_MODE サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Codec : D3D12_VIDEO_ENCODER_CODEC (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Profile : D3D12_VIDEO_ENCODER_PROFILE_DESC (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; Level : D3D12_VIDEO_ENCODER_LEVEL_SETTING (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; SubregionMode : D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; IsSupported : BOOL (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Codec : D3D12_VIDEO_ENCODER_CODEC (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Profile : D3D12_VIDEO_ENCODER_PROFILE_DESC (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; Level : D3D12_VIDEO_ENCODER_LEVEL_SETTING (+24, 16byte) varptr(st)+24 を基点に操作(16byte:入れ子/配列)
; SubregionMode : D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; IsSupported : BOOL (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global D3D12_VIDEO_ENCODER_PROFILE_DESC
#field int DataSize
#field byte Anonymous 8
#endstruct
#defstruct global D3D12_VIDEO_ENCODER_LEVEL_SETTING
#field int DataSize
#field byte Anonymous 8
#endstruct
#defstruct global D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE
#field int NodeIndex
#field int Codec
#field D3D12_VIDEO_ENCODER_PROFILE_DESC Profile
#field D3D12_VIDEO_ENCODER_LEVEL_SETTING Level
#field int SubregionMode
#field bool IsSupported
#endstruct
stdim st, D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE ; NSTRUCT 変数を確保
st->NodeIndex = 100
mes "NodeIndex=" + st->NodeIndex