ホーム › Media.MediaFoundation › D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM
D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| BufferMode | D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM_BUFFER_MODE | 4 | +0 | +0 | サブリージョン単位ビットストリームのバッファ管理モードを指定する。 |
| ExpectedSubregionCount | DWORD | 4 | +4 | +4 | 出力が見込まれるサブリージョン(スライス)の数を指定する。 |
| pSubregionBitstreamsBaseOffsets | ULONGLONG* | 8/4 | +8 | +8 | 各サブリージョンビットストリームの基準バイトオフセット配列へのポインタである。 |
| ppSubregionBitstreams | ID3D12Resource** | 8/4 | +16 | +12 | 各サブリージョンのビットストリーム出力先リソース配列へのポインタである。 |
| ppSubregionSizes | ID3D12Resource** | 8/4 | +24 | +16 | 各サブリージョンのサイズ情報を格納するリソース配列へのポインタである。 |
| ppSubregionOffsets | ID3D12Resource** | 8/4 | +32 | +20 | 各サブリージョンのオフセット情報を格納するリソース配列へのポインタである。 |
| ppSubregionFences | ID3D12Fence** | 8/4 | +40 | +24 | 各サブリージョン完了を通知するID3D12Fence配列へのポインタである。 |
| pSubregionFenceValues | ULONGLONG* | 8/4 | +48 | +28 | 各サブリージョン完了時にフェンスへ通知する値の配列へのポインタである。 |
各言語での定義
#include <windows.h>
// D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM (x64 56 / x86 32 バイト)
typedef struct D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM {
D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM_BUFFER_MODE BufferMode;
DWORD ExpectedSubregionCount;
ULONGLONG* pSubregionBitstreamsBaseOffsets;
ID3D12Resource** ppSubregionBitstreams;
ID3D12Resource** ppSubregionSizes;
ID3D12Resource** ppSubregionOffsets;
ID3D12Fence** ppSubregionFences;
ULONGLONG* pSubregionFenceValues;
} D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM
{
public int BufferMode;
public uint ExpectedSubregionCount;
public IntPtr pSubregionBitstreamsBaseOffsets;
public IntPtr ppSubregionBitstreams;
public IntPtr ppSubregionSizes;
public IntPtr ppSubregionOffsets;
public IntPtr ppSubregionFences;
public IntPtr pSubregionFenceValues;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM
Public BufferMode As Integer
Public ExpectedSubregionCount As UInteger
Public pSubregionBitstreamsBaseOffsets As IntPtr
Public ppSubregionBitstreams As IntPtr
Public ppSubregionSizes As IntPtr
Public ppSubregionOffsets As IntPtr
Public ppSubregionFences As IntPtr
Public pSubregionFenceValues As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM(ctypes.Structure):
_fields_ = [
("BufferMode", ctypes.c_int),
("ExpectedSubregionCount", wintypes.DWORD),
("pSubregionBitstreamsBaseOffsets", ctypes.c_void_p),
("ppSubregionBitstreams", ctypes.c_void_p),
("ppSubregionSizes", ctypes.c_void_p),
("ppSubregionOffsets", ctypes.c_void_p),
("ppSubregionFences", ctypes.c_void_p),
("pSubregionFenceValues", ctypes.c_void_p),
]#[repr(C)]
pub struct D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM {
pub BufferMode: i32,
pub ExpectedSubregionCount: u32,
pub pSubregionBitstreamsBaseOffsets: *mut core::ffi::c_void,
pub ppSubregionBitstreams: *mut core::ffi::c_void,
pub ppSubregionSizes: *mut core::ffi::c_void,
pub ppSubregionOffsets: *mut core::ffi::c_void,
pub ppSubregionFences: *mut core::ffi::c_void,
pub pSubregionFenceValues: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM struct {
BufferMode int32
ExpectedSubregionCount uint32
pSubregionBitstreamsBaseOffsets uintptr
ppSubregionBitstreams uintptr
ppSubregionSizes uintptr
ppSubregionOffsets uintptr
ppSubregionFences uintptr
pSubregionFenceValues uintptr
}type
D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM = record
BufferMode: Integer;
ExpectedSubregionCount: DWORD;
pSubregionBitstreamsBaseOffsets: Pointer;
ppSubregionBitstreams: Pointer;
ppSubregionSizes: Pointer;
ppSubregionOffsets: Pointer;
ppSubregionFences: Pointer;
pSubregionFenceValues: Pointer;
end;const D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM = extern struct {
BufferMode: i32,
ExpectedSubregionCount: u32,
pSubregionBitstreamsBaseOffsets: ?*anyopaque,
ppSubregionBitstreams: ?*anyopaque,
ppSubregionSizes: ?*anyopaque,
ppSubregionOffsets: ?*anyopaque,
ppSubregionFences: ?*anyopaque,
pSubregionFenceValues: ?*anyopaque,
};type
D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM {.bycopy.} = object
BufferMode: int32
ExpectedSubregionCount: uint32
pSubregionBitstreamsBaseOffsets: pointer
ppSubregionBitstreams: pointer
ppSubregionSizes: pointer
ppSubregionOffsets: pointer
ppSubregionFences: pointer
pSubregionFenceValues: pointerstruct D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM
{
int BufferMode;
uint ExpectedSubregionCount;
void* pSubregionBitstreamsBaseOffsets;
void* ppSubregionBitstreams;
void* ppSubregionSizes;
void* ppSubregionOffsets;
void* ppSubregionFences;
void* pSubregionFenceValues;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; BufferMode : D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM_BUFFER_MODE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ExpectedSubregionCount : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pSubregionBitstreamsBaseOffsets : ULONGLONG* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ppSubregionBitstreams : ID3D12Resource** (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ppSubregionSizes : ID3D12Resource** (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ppSubregionOffsets : ID3D12Resource** (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ppSubregionFences : ID3D12Fence** (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; pSubregionFenceValues : ULONGLONG* (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; BufferMode : D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM_BUFFER_MODE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ExpectedSubregionCount : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pSubregionBitstreamsBaseOffsets : ULONGLONG* (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ppSubregionBitstreams : ID3D12Resource** (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ppSubregionSizes : ID3D12Resource** (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ppSubregionOffsets : ID3D12Resource** (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ppSubregionFences : ID3D12Fence** (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; pSubregionFenceValues : ULONGLONG* (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM
#field int BufferMode
#field int ExpectedSubregionCount
#field intptr pSubregionBitstreamsBaseOffsets
#field intptr ppSubregionBitstreams
#field intptr ppSubregionSizes
#field intptr ppSubregionOffsets
#field intptr ppSubregionFences
#field intptr pSubregionFenceValues
#endstruct
stdim st, D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM ; NSTRUCT 変数を確保
st->BufferMode = 100
mes "BufferMode=" + st->BufferMode