ホーム › Media.MediaFoundation › D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1
D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NodeIndex | DWORD | 4 | +0 | +0 | マルチGPUアダプタにおける対象ノードのインデックスを指定する。 |
| Codec | D3D12_VIDEO_ENCODER_CODEC | 4 | +4 | +4 | 問い合わせ対象のエンコードコーデックを指定する。 |
| InputFormat | DXGI_FORMAT | 4 | +8 | +8 | 入力フレームのDXGIピクセルフォーマットを指定する。 |
| CodecConfiguration | D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION | 16/8 | +16 | +12 | 問い合わせ対象のコーデック構成を指定する。 |
| CodecGopSequence | D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE | 16/8 | +32 | +20 | 問い合わせ対象のGOP構造を指定する。 |
| RateControl | D3D12_VIDEO_ENCODER_RATE_CONTROL | 32/24 | +48 | +28 | 問い合わせ対象のレート制御設定を指定する。 |
| IntraRefresh | D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE | 4 | +80 | +52 | 問い合わせ対象のイントラリフレッシュモードを指定する。 |
| SubregionFrameEncoding | D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE | 4 | +84 | +56 | 問い合わせ対象のサブリージョン分割モードを指定する。 |
| ResolutionsListCount | DWORD | 4 | +88 | +60 | pResolutionListが指す解像度配列の要素数を指定する。 |
| pResolutionList | D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC* | 8/4 | +96 | +64 | 問い合わせ対象の解像度記述子配列へのポインタである。 |
| MaxReferenceFramesInDPB | DWORD | 4 | +104 | +68 | DPBに保持できる参照フレームの最大数を返す。 |
| ValidationFlags | D3D12_VIDEO_ENCODER_VALIDATION_FLAGS | 4 | +108 | +72 | 指定構成が非対応の場合の原因を示す検証フラグを返す。 |
| SupportFlags | D3D12_VIDEO_ENCODER_SUPPORT_FLAGS | 4 | +112 | +76 | サポートされる機能を示すフラグの組み合わせを返す。 |
| SuggestedProfile | D3D12_VIDEO_ENCODER_PROFILE_DESC | 16/8 | +120 | +80 | ドライバが推奨するプロファイル記述子を返す。 |
| SuggestedLevel | D3D12_VIDEO_ENCODER_LEVEL_SETTING | 16/8 | +136 | +88 | ドライバが推奨するレベル設定を返す。 |
| pResolutionDependentSupport | D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS* | 8/4 | +152 | +96 | 解像度ごとのサポート上限情報配列へのポインタである。 |
| SubregionFrameEncodingData | D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA | 16/8 | +160 | +100 | 問い合わせ対象のサブリージョン分割レイアウトデータを指定する。 |
| MaxQualityVsSpeed | DWORD | 4 | +176 | +108 | 品質と速度のトレードオフを示すレベルの最大値を返す。0が最速側。 |
各言語での定義
#include <windows.h>
// 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_SEQUENCE_GOP_STRUCTURE (x64 16 / x86 8 バイト)
typedef struct D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE {
DWORD DataSize;
_Anonymous_e__Union Anonymous;
} D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE;
// D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS (x64 16 / x86 8 バイト)
typedef struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS {
DWORD DataSize;
_Anonymous_e__Union Anonymous;
} D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS;
// DXGI_RATIONAL (x64 8 / x86 8 バイト)
typedef struct DXGI_RATIONAL {
DWORD Numerator;
DWORD Denominator;
} DXGI_RATIONAL;
// D3D12_VIDEO_ENCODER_RATE_CONTROL (x64 32 / x86 24 バイト)
typedef struct D3D12_VIDEO_ENCODER_RATE_CONTROL {
D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE Mode;
D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS Flags;
D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS ConfigParams;
DXGI_RATIONAL TargetFrameRate;
} D3D12_VIDEO_ENCODER_RATE_CONTROL;
// 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_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_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 (x64 184 / x86 112 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 {
DWORD NodeIndex;
D3D12_VIDEO_ENCODER_CODEC Codec;
DXGI_FORMAT InputFormat;
D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE CodecGopSequence;
D3D12_VIDEO_ENCODER_RATE_CONTROL RateControl;
D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE IntraRefresh;
D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE SubregionFrameEncoding;
DWORD ResolutionsListCount;
D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC* pResolutionList;
DWORD MaxReferenceFramesInDPB;
D3D12_VIDEO_ENCODER_VALIDATION_FLAGS ValidationFlags;
D3D12_VIDEO_ENCODER_SUPPORT_FLAGS SupportFlags;
D3D12_VIDEO_ENCODER_PROFILE_DESC SuggestedProfile;
D3D12_VIDEO_ENCODER_LEVEL_SETTING SuggestedLevel;
D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS* pResolutionDependentSupport;
D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA SubregionFrameEncodingData;
DWORD MaxQualityVsSpeed;
} D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1;using System;
using System.Runtime.InteropServices;
[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_SEQUENCE_GOP_STRUCTURE
{
public uint DataSize;
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS
{
public uint DataSize;
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXGI_RATIONAL
{
public uint Numerator;
public uint Denominator;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_RATE_CONTROL
{
public int Mode;
public int Flags;
public D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS ConfigParams;
public DXGI_RATIONAL TargetFrameRate;
}
[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_CONTROL_SUBREGIONS_LAYOUT_DATA
{
public uint DataSize;
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1
{
public uint NodeIndex;
public int Codec;
public int InputFormat;
public D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
public D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE CodecGopSequence;
public D3D12_VIDEO_ENCODER_RATE_CONTROL RateControl;
public int IntraRefresh;
public int SubregionFrameEncoding;
public uint ResolutionsListCount;
public IntPtr pResolutionList;
public uint MaxReferenceFramesInDPB;
public int ValidationFlags;
public int SupportFlags;
public D3D12_VIDEO_ENCODER_PROFILE_DESC SuggestedProfile;
public D3D12_VIDEO_ENCODER_LEVEL_SETTING SuggestedLevel;
public IntPtr pResolutionDependentSupport;
public D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA SubregionFrameEncodingData;
public uint MaxQualityVsSpeed;
}Imports System.Runtime.InteropServices
<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_SEQUENCE_GOP_STRUCTURE
Public DataSize As UInteger
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS
Public DataSize As UInteger
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXGI_RATIONAL
Public Numerator As UInteger
Public Denominator As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_RATE_CONTROL
Public Mode As Integer
Public Flags As Integer
Public ConfigParams As D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS
Public TargetFrameRate As DXGI_RATIONAL
End Structure
<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_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_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1
Public NodeIndex As UInteger
Public Codec As Integer
Public InputFormat As Integer
Public CodecConfiguration As D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
Public CodecGopSequence As D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE
Public RateControl As D3D12_VIDEO_ENCODER_RATE_CONTROL
Public IntraRefresh As Integer
Public SubregionFrameEncoding As Integer
Public ResolutionsListCount As UInteger
Public pResolutionList As IntPtr
Public MaxReferenceFramesInDPB As UInteger
Public ValidationFlags As Integer
Public SupportFlags As Integer
Public SuggestedProfile As D3D12_VIDEO_ENCODER_PROFILE_DESC
Public SuggestedLevel As D3D12_VIDEO_ENCODER_LEVEL_SETTING
Public pResolutionDependentSupport As IntPtr
Public SubregionFrameEncodingData As D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
Public MaxQualityVsSpeed As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION(ctypes.Structure):
_fields_ = [
("DataSize", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]
class D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE(ctypes.Structure):
_fields_ = [
("DataSize", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]
class D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS(ctypes.Structure):
_fields_ = [
("DataSize", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]
class DXGI_RATIONAL(ctypes.Structure):
_fields_ = [
("Numerator", wintypes.DWORD),
("Denominator", wintypes.DWORD),
]
class D3D12_VIDEO_ENCODER_RATE_CONTROL(ctypes.Structure):
_fields_ = [
("Mode", ctypes.c_int),
("Flags", ctypes.c_int),
("ConfigParams", D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS),
("TargetFrameRate", DXGI_RATIONAL),
]
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_CONTROL_SUBREGIONS_LAYOUT_DATA(ctypes.Structure):
_fields_ = [
("DataSize", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]
class D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1(ctypes.Structure):
_fields_ = [
("NodeIndex", wintypes.DWORD),
("Codec", ctypes.c_int),
("InputFormat", ctypes.c_int),
("CodecConfiguration", D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION),
("CodecGopSequence", D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE),
("RateControl", D3D12_VIDEO_ENCODER_RATE_CONTROL),
("IntraRefresh", ctypes.c_int),
("SubregionFrameEncoding", ctypes.c_int),
("ResolutionsListCount", wintypes.DWORD),
("pResolutionList", ctypes.c_void_p),
("MaxReferenceFramesInDPB", wintypes.DWORD),
("ValidationFlags", ctypes.c_int),
("SupportFlags", ctypes.c_int),
("SuggestedProfile", D3D12_VIDEO_ENCODER_PROFILE_DESC),
("SuggestedLevel", D3D12_VIDEO_ENCODER_LEVEL_SETTING),
("pResolutionDependentSupport", ctypes.c_void_p),
("SubregionFrameEncodingData", D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA),
("MaxQualityVsSpeed", wintypes.DWORD),
]#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION {
pub DataSize: u32,
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE {
pub DataSize: u32,
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS {
pub DataSize: u32,
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct DXGI_RATIONAL {
pub Numerator: u32,
pub Denominator: u32,
}
#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL {
pub Mode: i32,
pub Flags: i32,
pub ConfigParams: D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS,
pub TargetFrameRate: DXGI_RATIONAL,
}
#[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_CONTROL_SUBREGIONS_LAYOUT_DATA {
pub DataSize: u32,
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 {
pub NodeIndex: u32,
pub Codec: i32,
pub InputFormat: i32,
pub CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
pub CodecGopSequence: D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE,
pub RateControl: D3D12_VIDEO_ENCODER_RATE_CONTROL,
pub IntraRefresh: i32,
pub SubregionFrameEncoding: i32,
pub ResolutionsListCount: u32,
pub pResolutionList: *mut core::ffi::c_void,
pub MaxReferenceFramesInDPB: u32,
pub ValidationFlags: i32,
pub SupportFlags: i32,
pub SuggestedProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub SuggestedLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub pResolutionDependentSupport: *mut core::ffi::c_void,
pub SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA,
pub MaxQualityVsSpeed: u32,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION struct {
DataSize uint32
Anonymous _Anonymous_e__Union
}
type D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE struct {
DataSize uint32
Anonymous _Anonymous_e__Union
}
type D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS struct {
DataSize uint32
Anonymous _Anonymous_e__Union
}
type DXGI_RATIONAL struct {
Numerator uint32
Denominator uint32
}
type D3D12_VIDEO_ENCODER_RATE_CONTROL struct {
Mode int32
Flags int32
ConfigParams D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS
TargetFrameRate DXGI_RATIONAL
}
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_CONTROL_SUBREGIONS_LAYOUT_DATA struct {
DataSize uint32
Anonymous _Anonymous_e__Union
}
type D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 struct {
NodeIndex uint32
Codec int32
InputFormat int32
CodecConfiguration D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
CodecGopSequence D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE
RateControl D3D12_VIDEO_ENCODER_RATE_CONTROL
IntraRefresh int32
SubregionFrameEncoding int32
ResolutionsListCount uint32
pResolutionList uintptr
MaxReferenceFramesInDPB uint32
ValidationFlags int32
SupportFlags int32
SuggestedProfile D3D12_VIDEO_ENCODER_PROFILE_DESC
SuggestedLevel D3D12_VIDEO_ENCODER_LEVEL_SETTING
pResolutionDependentSupport uintptr
SubregionFrameEncodingData D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
MaxQualityVsSpeed uint32
}type
D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION = record
DataSize: DWORD;
Anonymous: _Anonymous_e__Union;
end;
D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE = record
DataSize: DWORD;
Anonymous: _Anonymous_e__Union;
end;
D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS = record
DataSize: DWORD;
Anonymous: _Anonymous_e__Union;
end;
DXGI_RATIONAL = record
Numerator: DWORD;
Denominator: DWORD;
end;
D3D12_VIDEO_ENCODER_RATE_CONTROL = record
Mode: Integer;
Flags: Integer;
ConfigParams: D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS;
TargetFrameRate: DXGI_RATIONAL;
end;
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_CONTROL_SUBREGIONS_LAYOUT_DATA = record
DataSize: DWORD;
Anonymous: _Anonymous_e__Union;
end;
D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 = record
NodeIndex: DWORD;
Codec: Integer;
InputFormat: Integer;
CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION;
CodecGopSequence: D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE;
RateControl: D3D12_VIDEO_ENCODER_RATE_CONTROL;
IntraRefresh: Integer;
SubregionFrameEncoding: Integer;
ResolutionsListCount: DWORD;
pResolutionList: Pointer;
MaxReferenceFramesInDPB: DWORD;
ValidationFlags: Integer;
SupportFlags: Integer;
SuggestedProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC;
SuggestedLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING;
pResolutionDependentSupport: Pointer;
SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA;
MaxQualityVsSpeed: DWORD;
end;const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION = extern struct {
DataSize: u32,
Anonymous: _Anonymous_e__Union,
};
const D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE = extern struct {
DataSize: u32,
Anonymous: _Anonymous_e__Union,
};
const D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS = extern struct {
DataSize: u32,
Anonymous: _Anonymous_e__Union,
};
const DXGI_RATIONAL = extern struct {
Numerator: u32,
Denominator: u32,
};
const D3D12_VIDEO_ENCODER_RATE_CONTROL = extern struct {
Mode: i32,
Flags: i32,
ConfigParams: D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS,
TargetFrameRate: DXGI_RATIONAL,
};
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_CONTROL_SUBREGIONS_LAYOUT_DATA = extern struct {
DataSize: u32,
Anonymous: _Anonymous_e__Union,
};
const D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 = extern struct {
NodeIndex: u32,
Codec: i32,
InputFormat: i32,
CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
CodecGopSequence: D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE,
RateControl: D3D12_VIDEO_ENCODER_RATE_CONTROL,
IntraRefresh: i32,
SubregionFrameEncoding: i32,
ResolutionsListCount: u32,
pResolutionList: ?*anyopaque,
MaxReferenceFramesInDPB: u32,
ValidationFlags: i32,
SupportFlags: i32,
SuggestedProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
SuggestedLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pResolutionDependentSupport: ?*anyopaque,
SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA,
MaxQualityVsSpeed: u32,
};type
D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION {.bycopy.} = object
DataSize: uint32
Anonymous: _Anonymous_e__Union
D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE {.bycopy.} = object
DataSize: uint32
Anonymous: _Anonymous_e__Union
D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS {.bycopy.} = object
DataSize: uint32
Anonymous: _Anonymous_e__Union
DXGI_RATIONAL {.bycopy.} = object
Numerator: uint32
Denominator: uint32
D3D12_VIDEO_ENCODER_RATE_CONTROL {.bycopy.} = object
Mode: int32
Flags: int32
ConfigParams: D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS
TargetFrameRate: DXGI_RATIONAL
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_CONTROL_SUBREGIONS_LAYOUT_DATA {.bycopy.} = object
DataSize: uint32
Anonymous: _Anonymous_e__Union
D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 {.bycopy.} = object
NodeIndex: uint32
Codec: int32
InputFormat: int32
CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
CodecGopSequence: D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE
RateControl: D3D12_VIDEO_ENCODER_RATE_CONTROL
IntraRefresh: int32
SubregionFrameEncoding: int32
ResolutionsListCount: uint32
pResolutionList: pointer
MaxReferenceFramesInDPB: uint32
ValidationFlags: int32
SupportFlags: int32
SuggestedProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC
SuggestedLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING
pResolutionDependentSupport: pointer
SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA
MaxQualityVsSpeed: uint32struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
{
uint DataSize;
_Anonymous_e__Union Anonymous;
}
struct D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE
{
uint DataSize;
_Anonymous_e__Union Anonymous;
}
struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS
{
uint DataSize;
_Anonymous_e__Union Anonymous;
}
struct DXGI_RATIONAL
{
uint Numerator;
uint Denominator;
}
struct D3D12_VIDEO_ENCODER_RATE_CONTROL
{
int Mode;
int Flags;
D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS ConfigParams;
DXGI_RATIONAL TargetFrameRate;
}
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_CONTROL_SUBREGIONS_LAYOUT_DATA
{
uint DataSize;
_Anonymous_e__Union Anonymous;
}
struct D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1
{
uint NodeIndex;
int Codec;
int InputFormat;
D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration;
D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE CodecGopSequence;
D3D12_VIDEO_ENCODER_RATE_CONTROL RateControl;
int IntraRefresh;
int SubregionFrameEncoding;
uint ResolutionsListCount;
void* pResolutionList;
uint MaxReferenceFramesInDPB;
int ValidationFlags;
int SupportFlags;
D3D12_VIDEO_ENCODER_PROFILE_DESC SuggestedProfile;
D3D12_VIDEO_ENCODER_LEVEL_SETTING SuggestedLevel;
void* pResolutionDependentSupport;
D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA SubregionFrameEncodingData;
uint MaxQualityVsSpeed;
}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_SUPPORT1 サイズ: 112 バイト(x86)
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 も可)
; InputFormat : DXGI_FORMAT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; CodecConfiguration : D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION (+12, 8byte) varptr(st)+12 を基点に操作(8byte:入れ子/配列)
; CodecGopSequence : D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE (+20, 8byte) varptr(st)+20 を基点に操作(8byte:入れ子/配列)
; RateControl : D3D12_VIDEO_ENCODER_RATE_CONTROL (+28, 24byte) varptr(st)+28 を基点に操作(24byte:入れ子/配列)
; IntraRefresh : D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; SubregionFrameEncoding : D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; ResolutionsListCount : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; pResolutionList : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC* (+64, 4byte) varptr(st)+64 を基点に操作(4byte:入れ子/配列)
; MaxReferenceFramesInDPB : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ValidationFlags : D3D12_VIDEO_ENCODER_VALIDATION_FLAGS (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; SupportFlags : D3D12_VIDEO_ENCODER_SUPPORT_FLAGS (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; SuggestedProfile : D3D12_VIDEO_ENCODER_PROFILE_DESC (+80, 8byte) varptr(st)+80 を基点に操作(8byte:入れ子/配列)
; SuggestedLevel : D3D12_VIDEO_ENCODER_LEVEL_SETTING (+88, 8byte) varptr(st)+88 を基点に操作(8byte:入れ子/配列)
; pResolutionDependentSupport : D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS* (+96, 4byte) varptr(st)+96 を基点に操作(4byte:入れ子/配列)
; SubregionFrameEncodingData : D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA (+100, 8byte) varptr(st)+100 を基点に操作(8byte:入れ子/配列)
; MaxQualityVsSpeed : DWORD (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 サイズ: 184 バイト(x64)
dim st, 46 ; 4byte整数×46(構造体サイズ 184 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Codec : D3D12_VIDEO_ENCODER_CODEC (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; InputFormat : DXGI_FORMAT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; CodecConfiguration : D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; CodecGopSequence : D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; RateControl : D3D12_VIDEO_ENCODER_RATE_CONTROL (+48, 32byte) varptr(st)+48 を基点に操作(32byte:入れ子/配列)
; IntraRefresh : D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; SubregionFrameEncoding : D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ResolutionsListCount : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; pResolutionList : D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC* (+96, 8byte) varptr(st)+96 を基点に操作(8byte:入れ子/配列)
; MaxReferenceFramesInDPB : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; ValidationFlags : D3D12_VIDEO_ENCODER_VALIDATION_FLAGS (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; SupportFlags : D3D12_VIDEO_ENCODER_SUPPORT_FLAGS (+112, 4byte) st.28 = 値 / 値 = st.28 (lpoke/lpeek も可)
; SuggestedProfile : D3D12_VIDEO_ENCODER_PROFILE_DESC (+120, 16byte) varptr(st)+120 を基点に操作(16byte:入れ子/配列)
; SuggestedLevel : D3D12_VIDEO_ENCODER_LEVEL_SETTING (+136, 16byte) varptr(st)+136 を基点に操作(16byte:入れ子/配列)
; pResolutionDependentSupport : D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS* (+152, 8byte) varptr(st)+152 を基点に操作(8byte:入れ子/配列)
; SubregionFrameEncodingData : D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA (+160, 16byte) varptr(st)+160 を基点に操作(16byte:入れ子/配列)
; MaxQualityVsSpeed : DWORD (+176, 4byte) st.44 = 値 / 値 = st.44 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION
#field int DataSize
#field byte Anonymous 8
#endstruct
#defstruct global D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE
#field int DataSize
#field byte Anonymous 8
#endstruct
#defstruct global D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS
#field int DataSize
#field byte Anonymous 8
#endstruct
#defstruct global DXGI_RATIONAL
#field int Numerator
#field int Denominator
#endstruct
#defstruct global D3D12_VIDEO_ENCODER_RATE_CONTROL
#field int Mode
#field int Flags
#field D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS ConfigParams
#field DXGI_RATIONAL TargetFrameRate
#endstruct
#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_CONTROL_SUBREGIONS_LAYOUT_DATA
#field int DataSize
#field byte Anonymous 8
#endstruct
#defstruct global D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1
#field int NodeIndex
#field int Codec
#field int InputFormat
#field D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration
#field D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE CodecGopSequence
#field D3D12_VIDEO_ENCODER_RATE_CONTROL RateControl
#field int IntraRefresh
#field int SubregionFrameEncoding
#field int ResolutionsListCount
#field intptr pResolutionList
#field int MaxReferenceFramesInDPB
#field int ValidationFlags
#field int SupportFlags
#field D3D12_VIDEO_ENCODER_PROFILE_DESC SuggestedProfile
#field D3D12_VIDEO_ENCODER_LEVEL_SETTING SuggestedLevel
#field intptr pResolutionDependentSupport
#field D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA SubregionFrameEncodingData
#field int MaxQualityVsSpeed
#endstruct
stdim st, D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 ; NSTRUCT 変数を確保
st->NodeIndex = 100
mes "NodeIndex=" + st->NodeIndex