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

D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1

構造体
サイズx64: 112 バイト / x86: 92 バイト

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

フィールド

フィールドサイズx64x86説明
NodeIndexDWORD4+0+0マルチGPUアダプタにおける対象ノードのインデックスを指定する。
CodecD3D12_VIDEO_ENCODER_CODEC4+4+4問い合わせ対象のエンコードコーデックを指定する。
ProfileD3D12_VIDEO_ENCODER_PROFILE_DESC16/8+8+8問い合わせ対象のプロファイル記述子を指定する。
InputFormatDXGI_FORMAT4+24+16入力フレームのDXGIピクセルフォーマットを指定する。
PictureTargetResolutionD3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC8+28+20エンコード対象ピクチャの解像度を指定する。
IsSupportedBOOL4+36+28指定構成がサポートされるか否かを返す。TRUEで対応。
CompressedBitstreamBufferAccessAlignmentDWORD4+40+32圧縮ビットストリームバッファのアクセスに必要なアライメントを返す。
EncoderMetadataBufferAccessAlignmentDWORD4+44+36エンコーダメタデータバッファのアクセスに必要なアライメントを返す。
MaxEncoderOutputMetadataBufferSizeDWORD4+48+40出力メタデータバッファに必要な最大バイトサイズを返す。
OptionalMetadataD3D12_VIDEO_ENCODER_OPTIONAL_METADATA_ENABLE_FLAGS4+52+44有効化するオプションメタデータ(PSNR/QPマップ等)の種類を示すフラグである。
CodecConfigurationD3D12_VIDEO_ENCODER_CODEC_CONFIGURATION16/8+56+48問い合わせ対象のコーデック構成を指定する。
EncoderOutputMetadataQPMapTextureDimensionsD3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC8+72+56出力QPマップテクスチャの解像度(次元)を返す。
EncoderOutputMetadataSATDMapTextureDimensionsD3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC8+80+64出力SATDマップテクスチャの解像度(次元)を返す。
EncoderOutputMetadataBitAllocationMapTextureDimensionsD3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC8+88+72出力ビット割り当てマップテクスチャの解像度(次元)を返す。
EncoderOutputMetadataFramePSNRComponentsNumberDWORD4+96+80フレーム単位PSNRメタデータの成分数を返す。
EncoderOutputMetadataSubregionsPSNRComponentsNumberDWORD4+100+84サブリージョン単位PSNRメタデータの成分数を返す。
EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSizeDWORD4+104+88サブリージョンPSNR解決済みメタデータバッファに必要なバイトサイズを返す。

各言語での定義

#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_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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1  (x64 112 / x86 92 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 {
    DWORD NodeIndex;
    D3D12_VIDEO_ENCODER_CODEC Codec;
    D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
    DXGI_FORMAT InputFormat;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC PictureTargetResolution;
    BOOL IsSupported;
    DWORD CompressedBitstreamBufferAccessAlignment;
    DWORD EncoderMetadataBufferAccessAlignment;
    DWORD MaxEncoderOutputMetadataBufferSize;
    D3D12_VIDEO_ENCODER_OPTIONAL_METADATA_ENABLE_FLAGS OptionalMetadata;
    D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataQPMapTextureDimensions;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataSATDMapTextureDimensions;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataBitAllocationMapTextureDimensions;
    DWORD EncoderOutputMetadataFramePSNRComponentsNumber;
    DWORD EncoderOutputMetadataSubregionsPSNRComponentsNumber;
    DWORD EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize;
} D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1;
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_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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1
{
    public uint NodeIndex;
    public int Codec;
    public D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
    public int InputFormat;
    public D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC PictureTargetResolution;
    [MarshalAs(UnmanagedType.Bool)] public bool IsSupported;
    public uint CompressedBitstreamBufferAccessAlignment;
    public uint EncoderMetadataBufferAccessAlignment;
    public uint MaxEncoderOutputMetadataBufferSize;
    public int OptionalMetadata;
    public D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
    public D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataQPMapTextureDimensions;
    public D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataSATDMapTextureDimensions;
    public D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataBitAllocationMapTextureDimensions;
    public uint EncoderOutputMetadataFramePSNRComponentsNumber;
    public uint EncoderOutputMetadataSubregionsPSNRComponentsNumber;
    public uint EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize;
}
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_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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1
    Public NodeIndex As UInteger
    Public Codec As Integer
    Public Profile As D3D12_VIDEO_ENCODER_PROFILE_DESC
    Public InputFormat As Integer
    Public PictureTargetResolution As D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    <MarshalAs(UnmanagedType.Bool)> Public IsSupported As Boolean
    Public CompressedBitstreamBufferAccessAlignment As UInteger
    Public EncoderMetadataBufferAccessAlignment As UInteger
    Public MaxEncoderOutputMetadataBufferSize As UInteger
    Public OptionalMetadata As Integer
    Public CodecConfiguration As D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
    Public EncoderOutputMetadataQPMapTextureDimensions As D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    Public EncoderOutputMetadataSATDMapTextureDimensions As D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    Public EncoderOutputMetadataBitAllocationMapTextureDimensions As D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    Public EncoderOutputMetadataFramePSNRComponentsNumber As UInteger
    Public EncoderOutputMetadataSubregionsPSNRComponentsNumber As UInteger
    Public EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize 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_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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1(ctypes.Structure):
    _fields_ = [
        ("NodeIndex", wintypes.DWORD),
        ("Codec", ctypes.c_int),
        ("Profile", D3D12_VIDEO_ENCODER_PROFILE_DESC),
        ("InputFormat", ctypes.c_int),
        ("PictureTargetResolution", D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC),
        ("IsSupported", wintypes.BOOL),
        ("CompressedBitstreamBufferAccessAlignment", wintypes.DWORD),
        ("EncoderMetadataBufferAccessAlignment", wintypes.DWORD),
        ("MaxEncoderOutputMetadataBufferSize", wintypes.DWORD),
        ("OptionalMetadata", ctypes.c_int),
        ("CodecConfiguration", D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION),
        ("EncoderOutputMetadataQPMapTextureDimensions", D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC),
        ("EncoderOutputMetadataSATDMapTextureDimensions", D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC),
        ("EncoderOutputMetadataBitAllocationMapTextureDimensions", D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC),
        ("EncoderOutputMetadataFramePSNRComponentsNumber", wintypes.DWORD),
        ("EncoderOutputMetadataSubregionsPSNRComponentsNumber", wintypes.DWORD),
        ("EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize", 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_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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 {
    pub NodeIndex: u32,
    pub Codec: i32,
    pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
    pub InputFormat: i32,
    pub PictureTargetResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    pub IsSupported: i32,
    pub CompressedBitstreamBufferAccessAlignment: u32,
    pub EncoderMetadataBufferAccessAlignment: u32,
    pub MaxEncoderOutputMetadataBufferSize: u32,
    pub OptionalMetadata: i32,
    pub CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
    pub EncoderOutputMetadataQPMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    pub EncoderOutputMetadataSATDMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    pub EncoderOutputMetadataBitAllocationMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    pub EncoderOutputMetadataFramePSNRComponentsNumber: u32,
    pub EncoderOutputMetadataSubregionsPSNRComponentsNumber: u32,
    pub EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize: u32,
}
import "golang.org/x/sys/windows"

type D3D12_VIDEO_ENCODER_PROFILE_DESC 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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 struct {
	NodeIndex uint32
	Codec int32
	Profile D3D12_VIDEO_ENCODER_PROFILE_DESC
	InputFormat int32
	PictureTargetResolution D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
	IsSupported int32
	CompressedBitstreamBufferAccessAlignment uint32
	EncoderMetadataBufferAccessAlignment uint32
	MaxEncoderOutputMetadataBufferSize uint32
	OptionalMetadata int32
	CodecConfiguration D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
	EncoderOutputMetadataQPMapTextureDimensions D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
	EncoderOutputMetadataSATDMapTextureDimensions D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
	EncoderOutputMetadataBitAllocationMapTextureDimensions D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
	EncoderOutputMetadataFramePSNRComponentsNumber uint32
	EncoderOutputMetadataSubregionsPSNRComponentsNumber uint32
	EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize uint32
}
type
  D3D12_VIDEO_ENCODER_PROFILE_DESC = 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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 = record
    NodeIndex: DWORD;
    Codec: Integer;
    Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC;
    InputFormat: Integer;
    PictureTargetResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC;
    IsSupported: BOOL;
    CompressedBitstreamBufferAccessAlignment: DWORD;
    EncoderMetadataBufferAccessAlignment: DWORD;
    MaxEncoderOutputMetadataBufferSize: DWORD;
    OptionalMetadata: Integer;
    CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION;
    EncoderOutputMetadataQPMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC;
    EncoderOutputMetadataSATDMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC;
    EncoderOutputMetadataBitAllocationMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC;
    EncoderOutputMetadataFramePSNRComponentsNumber: DWORD;
    EncoderOutputMetadataSubregionsPSNRComponentsNumber: DWORD;
    EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize: DWORD;
  end;
const D3D12_VIDEO_ENCODER_PROFILE_DESC = 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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 = extern struct {
    NodeIndex: u32,
    Codec: i32,
    Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
    InputFormat: i32,
    PictureTargetResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    IsSupported: i32,
    CompressedBitstreamBufferAccessAlignment: u32,
    EncoderMetadataBufferAccessAlignment: u32,
    MaxEncoderOutputMetadataBufferSize: u32,
    OptionalMetadata: i32,
    CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
    EncoderOutputMetadataQPMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    EncoderOutputMetadataSATDMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    EncoderOutputMetadataBitAllocationMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
    EncoderOutputMetadataFramePSNRComponentsNumber: u32,
    EncoderOutputMetadataSubregionsPSNRComponentsNumber: u32,
    EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize: u32,
};
type
  D3D12_VIDEO_ENCODER_PROFILE_DESC {.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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 {.bycopy.} = object
    NodeIndex: uint32
    Codec: int32
    Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC
    InputFormat: int32
    PictureTargetResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    IsSupported: int32
    CompressedBitstreamBufferAccessAlignment: uint32
    EncoderMetadataBufferAccessAlignment: uint32
    MaxEncoderOutputMetadataBufferSize: uint32
    OptionalMetadata: int32
    CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
    EncoderOutputMetadataQPMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    EncoderOutputMetadataSATDMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    EncoderOutputMetadataBitAllocationMapTextureDimensions: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC
    EncoderOutputMetadataFramePSNRComponentsNumber: uint32
    EncoderOutputMetadataSubregionsPSNRComponentsNumber: uint32
    EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize: uint32
struct D3D12_VIDEO_ENCODER_PROFILE_DESC
{
    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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1
{
    uint NodeIndex;
    int Codec;
    D3D12_VIDEO_ENCODER_PROFILE_DESC Profile;
    int InputFormat;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC PictureTargetResolution;
    int IsSupported;
    uint CompressedBitstreamBufferAccessAlignment;
    uint EncoderMetadataBufferAccessAlignment;
    uint MaxEncoderOutputMetadataBufferSize;
    int OptionalMetadata;
    D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataQPMapTextureDimensions;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataSATDMapTextureDimensions;
    D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataBitAllocationMapTextureDimensions;
    uint EncoderOutputMetadataFramePSNRComponentsNumber;
    uint EncoderOutputMetadataSubregionsPSNRComponentsNumber;
    uint EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize;
}

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_RESOURCE_REQUIREMENTS1 サイズ: 92 バイト(x86)
dim st, 23    ; 4byte整数×23(構造体サイズ 92 / 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:入れ子/配列)
; InputFormat : DXGI_FORMAT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; PictureTargetResolution : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC (+20, 8byte)  varptr(st)+20 を基点に操作(8byte:入れ子/配列)
; IsSupported : BOOL (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; CompressedBitstreamBufferAccessAlignment : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; EncoderMetadataBufferAccessAlignment : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; MaxEncoderOutputMetadataBufferSize : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; OptionalMetadata : D3D12_VIDEO_ENCODER_OPTIONAL_METADATA_ENABLE_FLAGS (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; CodecConfiguration : D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION (+48, 8byte)  varptr(st)+48 を基点に操作(8byte:入れ子/配列)
; EncoderOutputMetadataQPMapTextureDimensions : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC (+56, 8byte)  varptr(st)+56 を基点に操作(8byte:入れ子/配列)
; EncoderOutputMetadataSATDMapTextureDimensions : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC (+64, 8byte)  varptr(st)+64 を基点に操作(8byte:入れ子/配列)
; EncoderOutputMetadataBitAllocationMapTextureDimensions : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC (+72, 8byte)  varptr(st)+72 を基点に操作(8byte:入れ子/配列)
; EncoderOutputMetadataFramePSNRComponentsNumber : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; EncoderOutputMetadataSubregionsPSNRComponentsNumber : DWORD (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize : DWORD (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 サイズ: 112 バイト(x64)
dim st, 28    ; 4byte整数×28(構造体サイズ 112 / 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:入れ子/配列)
; InputFormat : DXGI_FORMAT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; PictureTargetResolution : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC (+28, 8byte)  varptr(st)+28 を基点に操作(8byte:入れ子/配列)
; IsSupported : BOOL (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; CompressedBitstreamBufferAccessAlignment : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; EncoderMetadataBufferAccessAlignment : DWORD (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; MaxEncoderOutputMetadataBufferSize : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; OptionalMetadata : D3D12_VIDEO_ENCODER_OPTIONAL_METADATA_ENABLE_FLAGS (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; CodecConfiguration : D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION (+56, 16byte)  varptr(st)+56 を基点に操作(16byte:入れ子/配列)
; EncoderOutputMetadataQPMapTextureDimensions : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC (+72, 8byte)  varptr(st)+72 を基点に操作(8byte:入れ子/配列)
; EncoderOutputMetadataSATDMapTextureDimensions : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC (+80, 8byte)  varptr(st)+80 を基点に操作(8byte:入れ子/配列)
; EncoderOutputMetadataBitAllocationMapTextureDimensions : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC (+88, 8byte)  varptr(st)+88 を基点に操作(8byte:入れ子/配列)
; EncoderOutputMetadataFramePSNRComponentsNumber : DWORD (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; EncoderOutputMetadataSubregionsPSNRComponentsNumber : DWORD (+100, 4byte)  st.25 = 値  /  値 = st.25   (lpoke/lpeek も可)
; EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize : DWORD (+104, 4byte)  st.26 = 値  /  値 = st.26   (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_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_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1
    #field int NodeIndex
    #field int Codec
    #field D3D12_VIDEO_ENCODER_PROFILE_DESC Profile
    #field int InputFormat
    #field D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC PictureTargetResolution
    #field bool IsSupported
    #field int CompressedBitstreamBufferAccessAlignment
    #field int EncoderMetadataBufferAccessAlignment
    #field int MaxEncoderOutputMetadataBufferSize
    #field int OptionalMetadata
    #field D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration
    #field D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataQPMapTextureDimensions
    #field D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataSATDMapTextureDimensions
    #field D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC EncoderOutputMetadataBitAllocationMapTextureDimensions
    #field int EncoderOutputMetadataFramePSNRComponentsNumber
    #field int EncoderOutputMetadataSubregionsPSNRComponentsNumber
    #field int EncoderOutputMetadataSubregionsPSNRResolvedMetadataBufferSize
#endstruct

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