Win32 API 日本語リファレンス
ホームMedia.MediaFoundation › D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS

D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS

構造体
サイズx64: 120 バイト / x86: 72 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
NodeIndexDWORD4+0+0マルチGPUアダプタにおける対象ノードのインデックスを指定する。
SessionInfoD3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO96/52+8+4問い合わせ対象のエンコードセッション情報を指定する。
MapSourceD3D12_VIDEO_ENCODER_INPUT_MAP_SOURCE4+104+56ダーティ領域マップの供給元を指定する。
MapValuesTypeD3D12_VIDEO_ENCODER_DIRTY_REGIONS_MAP_VALUES_MODE4+108+60ダーティ領域マップ値の解釈方式(ダーティ/非ダーティ等)を指定する。
SupportFlagsD3D12_VIDEO_ENCODER_DIRTY_REGIONS_SUPPORT_FLAGS4+112+64ダーティ領域機能のサポート内容を示すフラグを返す。
MapSourcePreferenceRankingDWORD4+116+68複数のマップソース間での推奨順位を示す。値が小さいほど推奨。

各言語での定義

#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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC  (x64 8 / x86 8 バイト)
typedef struct D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC {
    DWORD Width;
    DWORD Height;
} D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC;

// D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION  (x64 16 / x86 8 バイト)
typedef struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION {
    DWORD DataSize;
    _Anonymous_e__Union Anonymous;
} D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION;

// D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA  (x64 16 / x86 8 バイト)
typedef struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA {
    DWORD DataSize;
    _Anonymous_e__Union Anonymous;
} D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA;

// D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO  (x64 96 / x86 52 バイト)
typedef struct D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO {
    D3D12_VIDEO_ENCODER_CODEC Codec;
    D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
    D3D12_VIDEO_ENCODER_LEVEL_SETTING Level;
    DXGI_FORMAT InputFormat;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC InputResolution;
    D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
    D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE SubregionFrameEncoding;
    D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA SubregionFrameEncodingData;
} D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO;

// D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS  (x64 120 / x86 72 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS {
    DWORD NodeIndex;
    D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO SessionInfo;
    D3D12_VIDEO_ENCODER_INPUT_MAP_SOURCE MapSource;
    D3D12_VIDEO_ENCODER_DIRTY_REGIONS_MAP_VALUES_MODE MapValuesType;
    D3D12_VIDEO_ENCODER_DIRTY_REGIONS_SUPPORT_FLAGS SupportFlags;
    DWORD MapSourcePreferenceRanking;
} D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS;
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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
{
    public uint Width;
    public uint Height;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
{
    public uint DataSize;
    public _Anonymous_e__Union Anonymous;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
{
    public uint DataSize;
    public _Anonymous_e__Union Anonymous;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO
{
    public int Codec;
    public D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
    public D3D12_VIDEO_ENCODER_LEVEL_SETTING Level;
    public int InputFormat;
    public D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC InputResolution;
    public D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
    public int SubregionFrameEncoding;
    public D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA SubregionFrameEncodingData;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS
{
    public uint NodeIndex;
    public D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO SessionInfo;
    public int MapSource;
    public int MapValuesType;
    public int SupportFlags;
    public uint MapSourcePreferenceRanking;
}
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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    Public Width As UInteger
    Public Height As UInteger
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
    Public DataSize As UInteger
    Public Anonymous As _Anonymous_e__Union
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
    Public DataSize As UInteger
    Public Anonymous As _Anonymous_e__Union
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO
    Public Codec As Integer
    Public Profile As D3D12_VIDEO_ENCODER_PROFILE_DESC
    Public Level As D3D12_VIDEO_ENCODER_LEVEL_SETTING
    Public InputFormat As Integer
    Public InputResolution As D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    Public CodecConfiguration As D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
    Public SubregionFrameEncoding As Integer
    Public SubregionFrameEncodingData As D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS
    Public NodeIndex As UInteger
    Public SessionInfo As D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO
    Public MapSource As Integer
    Public MapValuesType As Integer
    Public SupportFlags As Integer
    Public MapSourcePreferenceRanking As UInteger
End Structure
import 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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC(ctypes.Structure):
    _fields_ = [
        ("Width", wintypes.DWORD),
        ("Height", wintypes.DWORD),
    ]

class D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION(ctypes.Structure):
    _fields_ = [
        ("DataSize", wintypes.DWORD),
        ("Anonymous", _Anonymous_e__Union),
    ]

class D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA(ctypes.Structure):
    _fields_ = [
        ("DataSize", wintypes.DWORD),
        ("Anonymous", _Anonymous_e__Union),
    ]

class D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO(ctypes.Structure):
    _fields_ = [
        ("Codec", ctypes.c_int),
        ("Profile", D3D12_VIDEO_ENCODER_PROFILE_DESC),
        ("Level", D3D12_VIDEO_ENCODER_LEVEL_SETTING),
        ("InputFormat", ctypes.c_int),
        ("InputResolution", D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC),
        ("CodecConfiguration", D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION),
        ("SubregionFrameEncoding", ctypes.c_int),
        ("SubregionFrameEncodingData", D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA),
    ]

class D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS(ctypes.Structure):
    _fields_ = [
        ("NodeIndex", wintypes.DWORD),
        ("SessionInfo", D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO),
        ("MapSource", ctypes.c_int),
        ("MapValuesType", ctypes.c_int),
        ("SupportFlags", ctypes.c_int),
        ("MapSourcePreferenceRanking", wintypes.DWORD),
    ]
#[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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC {
    pub Width: u32,
    pub Height: u32,
}

#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION {
    pub DataSize: u32,
    pub Anonymous: _Anonymous_e__Union,
}

#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA {
    pub DataSize: u32,
    pub Anonymous: _Anonymous_e__Union,
}

#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO {
    pub Codec: i32,
    pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
    pub Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
    pub InputFormat: i32,
    pub InputResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    pub CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
    pub SubregionFrameEncoding: i32,
    pub SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA,
}

#[repr(C)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS {
    pub NodeIndex: u32,
    pub SessionInfo: D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO,
    pub MapSource: i32,
    pub MapValuesType: i32,
    pub SupportFlags: i32,
    pub MapSourcePreferenceRanking: u32,
}
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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC struct {
	Width uint32
	Height uint32
}

type D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION struct {
	DataSize uint32
	Anonymous _Anonymous_e__Union
}

type D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA struct {
	DataSize uint32
	Anonymous _Anonymous_e__Union
}

type D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO struct {
	Codec int32
	Profile D3D12_VIDEO_ENCODER_PROFILE_DESC
	Level D3D12_VIDEO_ENCODER_LEVEL_SETTING
	InputFormat int32
	InputResolution D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
	CodecConfiguration D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
	SubregionFrameEncoding int32
	SubregionFrameEncodingData D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
}

type D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS struct {
	NodeIndex uint32
	SessionInfo D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO
	MapSource int32
	MapValuesType int32
	SupportFlags int32
	MapSourcePreferenceRanking uint32
}
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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC = record
    Width: DWORD;
    Height: DWORD;
  end;

  D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION = record
    DataSize: DWORD;
    Anonymous: _Anonymous_e__Union;
  end;

  D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA = record
    DataSize: DWORD;
    Anonymous: _Anonymous_e__Union;
  end;

  D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO = record
    Codec: Integer;
    Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC;
    Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING;
    InputFormat: Integer;
    InputResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC;
    CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION;
    SubregionFrameEncoding: Integer;
    SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA;
  end;

  D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS = record
    NodeIndex: DWORD;
    SessionInfo: D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO;
    MapSource: Integer;
    MapValuesType: Integer;
    SupportFlags: Integer;
    MapSourcePreferenceRanking: DWORD;
  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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC = extern struct {
    Width: u32,
    Height: u32,
};

const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION = extern struct {
    DataSize: u32,
    Anonymous: _Anonymous_e__Union,
};

const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA = extern struct {
    DataSize: u32,
    Anonymous: _Anonymous_e__Union,
};

const D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO = extern struct {
    Codec: i32,
    Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
    Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
    InputFormat: i32,
    InputResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
    SubregionFrameEncoding: i32,
    SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA,
};

const D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS = extern struct {
    NodeIndex: u32,
    SessionInfo: D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO,
    MapSource: i32,
    MapValuesType: i32,
    SupportFlags: i32,
    MapSourcePreferenceRanking: u32,
};
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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC {.bycopy.} = object
    Width: uint32
    Height: uint32

  D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION {.bycopy.} = object
    DataSize: uint32
    Anonymous: _Anonymous_e__Union

  D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA {.bycopy.} = object
    DataSize: uint32
    Anonymous: _Anonymous_e__Union

  D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO {.bycopy.} = object
    Codec: int32
    Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC
    Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING
    InputFormat: int32
    InputResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
    SubregionFrameEncoding: int32
    SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA

  D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS {.bycopy.} = object
    NodeIndex: uint32
    SessionInfo: D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO
    MapSource: int32
    MapValuesType: int32
    SupportFlags: int32
    MapSourcePreferenceRanking: uint32
struct 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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
{
    uint Width;
    uint Height;
}

struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
{
    uint DataSize;
    _Anonymous_e__Union Anonymous;
}

struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
{
    uint DataSize;
    _Anonymous_e__Union Anonymous;
}

struct D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO
{
    int Codec;
    D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
    D3D12_VIDEO_ENCODER_LEVEL_SETTING Level;
    int InputFormat;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC InputResolution;
    D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
    int SubregionFrameEncoding;
    D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA SubregionFrameEncodingData;
}

struct D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS
{
    uint NodeIndex;
    D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO SessionInfo;
    int MapSource;
    int MapValuesType;
    int SupportFlags;
    uint MapSourcePreferenceRanking;
}

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_DIRTY_REGIONS サイズ: 72 バイト(x86)
dim st, 18    ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; SessionInfo : D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO (+4, 52byte)  varptr(st)+4 を基点に操作(52byte:入れ子/配列)
; MapSource : D3D12_VIDEO_ENCODER_INPUT_MAP_SOURCE (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; MapValuesType : D3D12_VIDEO_ENCODER_DIRTY_REGIONS_MAP_VALUES_MODE (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; SupportFlags : D3D12_VIDEO_ENCODER_DIRTY_REGIONS_SUPPORT_FLAGS (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; MapSourcePreferenceRanking : DWORD (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS サイズ: 120 バイト(x64)
dim st, 30    ; 4byte整数×30(構造体サイズ 120 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; SessionInfo : D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO (+8, 96byte)  varptr(st)+8 を基点に操作(96byte:入れ子/配列)
; MapSource : D3D12_VIDEO_ENCODER_INPUT_MAP_SOURCE (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; MapValuesType : D3D12_VIDEO_ENCODER_DIRTY_REGIONS_MAP_VALUES_MODE (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; SupportFlags : D3D12_VIDEO_ENCODER_DIRTY_REGIONS_SUPPORT_FLAGS (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; MapSourcePreferenceRanking : DWORD (+116, 4byte)  st.29 = 値  /  値 = st.29   (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_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    #field int Width
    #field int Height
#endstruct

#defstruct global D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
    #field int DataSize
    #field byte Anonymous 8
#endstruct

#defstruct global D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
    #field int DataSize
    #field byte Anonymous 8
#endstruct

#defstruct global D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO
    #field int Codec
    #field D3D12_VIDEO_ENCODER_PROFILE_DESC Profile
    #field D3D12_VIDEO_ENCODER_LEVEL_SETTING Level
    #field int InputFormat
    #field D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC InputResolution
    #field D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration
    #field int SubregionFrameEncoding
    #field D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA SubregionFrameEncodingData
#endstruct

#defstruct global D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS
    #field int NodeIndex
    #field D3D12_VIDEO_ENCODER_INPUT_MAP_SESSION_INFO SessionInfo
    #field int MapSource
    #field int MapValuesType
    #field int SupportFlags
    #field int MapSourcePreferenceRanking
#endstruct

stdim st, D3D12_FEATURE_DATA_VIDEO_ENCODER_DIRTY_REGIONS        ; NSTRUCT 変数を確保
st->NodeIndex = 100
mes "NodeIndex=" + st->NodeIndex