ホーム › Media.MediaFoundation › D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT
D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Use128SuperBlocks | BOOL | 4 | +0 | +0 | 128x128スーパーブロックを使用するか否かを示すBOOL。 |
| TilesConfiguration | D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES | 1048 | +8 | +8 | タイル構成を示すD3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES。 |
| ValidationFlags | D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS | 4 | +1056 | +1056 | タイル構成の検証結果を示すD3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(出力)。 |
| MinTileRows | DWORD | 4 | +1060 | +1060 | 許容される最小タイル行数(出力)。 |
| MaxTileRows | DWORD | 4 | +1064 | +1064 | 許容される最大タイル行数(出力)。 |
| MinTileCols | DWORD | 4 | +1068 | +1068 | 許容される最小タイル列数(出力)。 |
| MaxTileCols | DWORD | 4 | +1072 | +1072 | 許容される最大タイル列数(出力)。 |
| MinTileWidth | DWORD | 4 | +1076 | +1076 | 許容される最小タイル幅(スーパーブロック単位、出力)。 |
| MaxTileWidth | DWORD | 4 | +1080 | +1080 | 許容される最大タイル幅(スーパーブロック単位、出力)。 |
| MinTileArea | DWORD | 4 | +1084 | +1084 | 許容される最小タイル面積(出力)。 |
| MaxTileArea | DWORD | 4 | +1088 | +1088 | 許容される最大タイル面積(出力)。 |
| TileSizeBytesMinus1 | DWORD | 4 | +1092 | +1092 | タイルサイズフィールドのバイト数から1を引いた値(出力)。 |
各言語での定義
#include <windows.h>
// D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES (x64 1048 / x86 1048 バイト)
typedef struct D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES {
ULONGLONG RowCount;
ULONGLONG ColCount;
ULONGLONG RowHeights[64];
ULONGLONG ColWidths[64];
ULONGLONG ContextUpdateTileId;
} D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES;
// D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT (x64 1096 / x86 1096 バイト)
typedef struct D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT {
BOOL Use128SuperBlocks;
D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES TilesConfiguration;
D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS ValidationFlags;
DWORD MinTileRows;
DWORD MaxTileRows;
DWORD MinTileCols;
DWORD MaxTileCols;
DWORD MinTileWidth;
DWORD MaxTileWidth;
DWORD MinTileArea;
DWORD MaxTileArea;
DWORD TileSizeBytesMinus1;
} D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES
{
public ulong RowCount;
public ulong ColCount;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public ulong[] RowHeights;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] public ulong[] ColWidths;
public ulong ContextUpdateTileId;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT
{
[MarshalAs(UnmanagedType.Bool)] public bool Use128SuperBlocks;
public D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES TilesConfiguration;
public int ValidationFlags;
public uint MinTileRows;
public uint MaxTileRows;
public uint MinTileCols;
public uint MaxTileCols;
public uint MinTileWidth;
public uint MaxTileWidth;
public uint MinTileArea;
public uint MaxTileArea;
public uint TileSizeBytesMinus1;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES
Public RowCount As ULong
Public ColCount As ULong
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public RowHeights() As ULong
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public ColWidths() As ULong
Public ContextUpdateTileId As ULong
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT
<MarshalAs(UnmanagedType.Bool)> Public Use128SuperBlocks As Boolean
Public TilesConfiguration As D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES
Public ValidationFlags As Integer
Public MinTileRows As UInteger
Public MaxTileRows As UInteger
Public MinTileCols As UInteger
Public MaxTileCols As UInteger
Public MinTileWidth As UInteger
Public MaxTileWidth As UInteger
Public MinTileArea As UInteger
Public MaxTileArea As UInteger
Public TileSizeBytesMinus1 As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES(ctypes.Structure):
_fields_ = [
("RowCount", ctypes.c_ulonglong),
("ColCount", ctypes.c_ulonglong),
("RowHeights", ctypes.c_ulonglong * 64),
("ColWidths", ctypes.c_ulonglong * 64),
("ContextUpdateTileId", ctypes.c_ulonglong),
]
class D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT(ctypes.Structure):
_fields_ = [
("Use128SuperBlocks", wintypes.BOOL),
("TilesConfiguration", D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES),
("ValidationFlags", ctypes.c_int),
("MinTileRows", wintypes.DWORD),
("MaxTileRows", wintypes.DWORD),
("MinTileCols", wintypes.DWORD),
("MaxTileCols", wintypes.DWORD),
("MinTileWidth", wintypes.DWORD),
("MaxTileWidth", wintypes.DWORD),
("MinTileArea", wintypes.DWORD),
("MaxTileArea", wintypes.DWORD),
("TileSizeBytesMinus1", wintypes.DWORD),
]#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES {
pub RowCount: u64,
pub ColCount: u64,
pub RowHeights: [u64; 64],
pub ColWidths: [u64; 64],
pub ContextUpdateTileId: u64,
}
#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT {
pub Use128SuperBlocks: i32,
pub TilesConfiguration: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES,
pub ValidationFlags: i32,
pub MinTileRows: u32,
pub MaxTileRows: u32,
pub MinTileCols: u32,
pub MaxTileCols: u32,
pub MinTileWidth: u32,
pub MaxTileWidth: u32,
pub MinTileArea: u32,
pub MaxTileArea: u32,
pub TileSizeBytesMinus1: u32,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES struct {
RowCount uint64
ColCount uint64
RowHeights [64]uint64
ColWidths [64]uint64
ContextUpdateTileId uint64
}
type D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT struct {
Use128SuperBlocks int32
TilesConfiguration D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES
ValidationFlags int32
MinTileRows uint32
MaxTileRows uint32
MinTileCols uint32
MaxTileCols uint32
MinTileWidth uint32
MaxTileWidth uint32
MinTileArea uint32
MaxTileArea uint32
TileSizeBytesMinus1 uint32
}type
D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES = record
RowCount: UInt64;
ColCount: UInt64;
RowHeights: array[0..63] of UInt64;
ColWidths: array[0..63] of UInt64;
ContextUpdateTileId: UInt64;
end;
D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT = record
Use128SuperBlocks: BOOL;
TilesConfiguration: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES;
ValidationFlags: Integer;
MinTileRows: DWORD;
MaxTileRows: DWORD;
MinTileCols: DWORD;
MaxTileCols: DWORD;
MinTileWidth: DWORD;
MaxTileWidth: DWORD;
MinTileArea: DWORD;
MaxTileArea: DWORD;
TileSizeBytesMinus1: DWORD;
end;const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES = extern struct {
RowCount: u64,
ColCount: u64,
RowHeights: [64]u64,
ColWidths: [64]u64,
ContextUpdateTileId: u64,
};
const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT = extern struct {
Use128SuperBlocks: i32,
TilesConfiguration: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES,
ValidationFlags: i32,
MinTileRows: u32,
MaxTileRows: u32,
MinTileCols: u32,
MaxTileCols: u32,
MinTileWidth: u32,
MaxTileWidth: u32,
MinTileArea: u32,
MaxTileArea: u32,
TileSizeBytesMinus1: u32,
};type
D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES {.bycopy.} = object
RowCount: uint64
ColCount: uint64
RowHeights: array[64, uint64]
ColWidths: array[64, uint64]
ContextUpdateTileId: uint64
D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT {.bycopy.} = object
Use128SuperBlocks: int32
TilesConfiguration: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES
ValidationFlags: int32
MinTileRows: uint32
MaxTileRows: uint32
MinTileCols: uint32
MaxTileCols: uint32
MinTileWidth: uint32
MaxTileWidth: uint32
MinTileArea: uint32
MaxTileArea: uint32
TileSizeBytesMinus1: uint32struct D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES
{
ulong RowCount;
ulong ColCount;
ulong[64] RowHeights;
ulong[64] ColWidths;
ulong ContextUpdateTileId;
}
struct D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT
{
int Use128SuperBlocks;
D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES TilesConfiguration;
int ValidationFlags;
uint MinTileRows;
uint MaxTileRows;
uint MinTileCols;
uint MaxTileCols;
uint MinTileWidth;
uint MaxTileWidth;
uint MinTileArea;
uint MaxTileArea;
uint TileSizeBytesMinus1;
}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_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT サイズ: 1096 バイト(x64)
dim st, 274 ; 4byte整数×274(構造体サイズ 1096 / 4 切り上げ)
; Use128SuperBlocks : BOOL (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; TilesConfiguration : D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES (+8, 1048byte) varptr(st)+8 を基点に操作(1048byte:入れ子/配列)
; ValidationFlags : D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS (+1056, 4byte) st.264 = 値 / 値 = st.264 (lpoke/lpeek も可)
; MinTileRows : DWORD (+1060, 4byte) st.265 = 値 / 値 = st.265 (lpoke/lpeek も可)
; MaxTileRows : DWORD (+1064, 4byte) st.266 = 値 / 値 = st.266 (lpoke/lpeek も可)
; MinTileCols : DWORD (+1068, 4byte) st.267 = 値 / 値 = st.267 (lpoke/lpeek も可)
; MaxTileCols : DWORD (+1072, 4byte) st.268 = 値 / 値 = st.268 (lpoke/lpeek も可)
; MinTileWidth : DWORD (+1076, 4byte) st.269 = 値 / 値 = st.269 (lpoke/lpeek も可)
; MaxTileWidth : DWORD (+1080, 4byte) st.270 = 値 / 値 = st.270 (lpoke/lpeek も可)
; MinTileArea : DWORD (+1084, 4byte) st.271 = 値 / 値 = st.271 (lpoke/lpeek も可)
; MaxTileArea : DWORD (+1088, 4byte) st.272 = 値 / 値 = st.272 (lpoke/lpeek も可)
; TileSizeBytesMinus1 : DWORD (+1092, 4byte) st.273 = 値 / 値 = st.273 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES
#field int64 RowCount
#field int64 ColCount
#field int64 RowHeights 64
#field int64 ColWidths 64
#field int64 ContextUpdateTileId
#endstruct
#defstruct global D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT
#field bool Use128SuperBlocks
#field D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES TilesConfiguration
#field int ValidationFlags
#field int MinTileRows
#field int MaxTileRows
#field int MinTileCols
#field int MaxTileCols
#field int MinTileWidth
#field int MaxTileWidth
#field int MinTileArea
#field int MaxTileArea
#field int TileSizeBytesMinus1
#endstruct
stdim st, D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT ; NSTRUCT 変数を確保
st->Use128SuperBlocks = 100
mes "Use128SuperBlocks=" + st->Use128SuperBlocks