ホーム › Media.MediaFoundation › D3D12_VIDEO_PROCESS_INPUT_STREAM
D3D12_VIDEO_PROCESS_INPUT_STREAM
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pTexture2D | ID3D12Resource* | 8/4 | +0 | +0 | 入力フレームのテクスチャ(ID3D12Resource)へのポインタ。 |
| Subresource | DWORD | 4 | +8 | +4 | 入力テクスチャのサブリソースインデックス。 |
| ReferenceSet | D3D12_VIDEO_PROCESS_REFERENCE_SET | 48/24 | +16 | +8 | デインターレース等に用いる参照フレーム集合D3D12_VIDEO_PROCESS_REFERENCE_SET。 |
各言語での定義
#include <windows.h>
// D3D12_VIDEO_PROCESS_REFERENCE_SET (x64 48 / x86 24 バイト)
typedef struct D3D12_VIDEO_PROCESS_REFERENCE_SET {
DWORD NumPastFrames;
ID3D12Resource** ppPastFrames;
DWORD* pPastSubresources;
DWORD NumFutureFrames;
ID3D12Resource** ppFutureFrames;
DWORD* pFutureSubresources;
} D3D12_VIDEO_PROCESS_REFERENCE_SET;
// D3D12_VIDEO_PROCESS_INPUT_STREAM (x64 64 / x86 32 バイト)
typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM {
ID3D12Resource* pTexture2D;
DWORD Subresource;
D3D12_VIDEO_PROCESS_REFERENCE_SET ReferenceSet;
} D3D12_VIDEO_PROCESS_INPUT_STREAM;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_PROCESS_REFERENCE_SET
{
public uint NumPastFrames;
public IntPtr ppPastFrames;
public IntPtr pPastSubresources;
public uint NumFutureFrames;
public IntPtr ppFutureFrames;
public IntPtr pFutureSubresources;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_PROCESS_INPUT_STREAM
{
public IntPtr pTexture2D;
public uint Subresource;
public D3D12_VIDEO_PROCESS_REFERENCE_SET ReferenceSet;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_PROCESS_REFERENCE_SET
Public NumPastFrames As UInteger
Public ppPastFrames As IntPtr
Public pPastSubresources As IntPtr
Public NumFutureFrames As UInteger
Public ppFutureFrames As IntPtr
Public pFutureSubresources As IntPtr
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_PROCESS_INPUT_STREAM
Public pTexture2D As IntPtr
Public Subresource As UInteger
Public ReferenceSet As D3D12_VIDEO_PROCESS_REFERENCE_SET
End Structureimport ctypes
from ctypes import wintypes
class D3D12_VIDEO_PROCESS_REFERENCE_SET(ctypes.Structure):
_fields_ = [
("NumPastFrames", wintypes.DWORD),
("ppPastFrames", ctypes.c_void_p),
("pPastSubresources", ctypes.c_void_p),
("NumFutureFrames", wintypes.DWORD),
("ppFutureFrames", ctypes.c_void_p),
("pFutureSubresources", ctypes.c_void_p),
]
class D3D12_VIDEO_PROCESS_INPUT_STREAM(ctypes.Structure):
_fields_ = [
("pTexture2D", ctypes.c_void_p),
("Subresource", wintypes.DWORD),
("ReferenceSet", D3D12_VIDEO_PROCESS_REFERENCE_SET),
]#[repr(C)]
pub struct D3D12_VIDEO_PROCESS_REFERENCE_SET {
pub NumPastFrames: u32,
pub ppPastFrames: *mut core::ffi::c_void,
pub pPastSubresources: *mut core::ffi::c_void,
pub NumFutureFrames: u32,
pub ppFutureFrames: *mut core::ffi::c_void,
pub pFutureSubresources: *mut core::ffi::c_void,
}
#[repr(C)]
pub struct D3D12_VIDEO_PROCESS_INPUT_STREAM {
pub pTexture2D: *mut core::ffi::c_void,
pub Subresource: u32,
pub ReferenceSet: D3D12_VIDEO_PROCESS_REFERENCE_SET,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_PROCESS_REFERENCE_SET struct {
NumPastFrames uint32
ppPastFrames uintptr
pPastSubresources uintptr
NumFutureFrames uint32
ppFutureFrames uintptr
pFutureSubresources uintptr
}
type D3D12_VIDEO_PROCESS_INPUT_STREAM struct {
pTexture2D uintptr
Subresource uint32
ReferenceSet D3D12_VIDEO_PROCESS_REFERENCE_SET
}type
D3D12_VIDEO_PROCESS_REFERENCE_SET = record
NumPastFrames: DWORD;
ppPastFrames: Pointer;
pPastSubresources: Pointer;
NumFutureFrames: DWORD;
ppFutureFrames: Pointer;
pFutureSubresources: Pointer;
end;
D3D12_VIDEO_PROCESS_INPUT_STREAM = record
pTexture2D: Pointer;
Subresource: DWORD;
ReferenceSet: D3D12_VIDEO_PROCESS_REFERENCE_SET;
end;const D3D12_VIDEO_PROCESS_REFERENCE_SET = extern struct {
NumPastFrames: u32,
ppPastFrames: ?*anyopaque,
pPastSubresources: ?*anyopaque,
NumFutureFrames: u32,
ppFutureFrames: ?*anyopaque,
pFutureSubresources: ?*anyopaque,
};
const D3D12_VIDEO_PROCESS_INPUT_STREAM = extern struct {
pTexture2D: ?*anyopaque,
Subresource: u32,
ReferenceSet: D3D12_VIDEO_PROCESS_REFERENCE_SET,
};type
D3D12_VIDEO_PROCESS_REFERENCE_SET {.bycopy.} = object
NumPastFrames: uint32
ppPastFrames: pointer
pPastSubresources: pointer
NumFutureFrames: uint32
ppFutureFrames: pointer
pFutureSubresources: pointer
D3D12_VIDEO_PROCESS_INPUT_STREAM {.bycopy.} = object
pTexture2D: pointer
Subresource: uint32
ReferenceSet: D3D12_VIDEO_PROCESS_REFERENCE_SETstruct D3D12_VIDEO_PROCESS_REFERENCE_SET
{
uint NumPastFrames;
void* ppPastFrames;
void* pPastSubresources;
uint NumFutureFrames;
void* ppFutureFrames;
void* pFutureSubresources;
}
struct D3D12_VIDEO_PROCESS_INPUT_STREAM
{
void* pTexture2D;
uint Subresource;
D3D12_VIDEO_PROCESS_REFERENCE_SET ReferenceSet;
}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_PROCESS_INPUT_STREAM サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; pTexture2D : ID3D12Resource* (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Subresource : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ReferenceSet : D3D12_VIDEO_PROCESS_REFERENCE_SET (+8, 24byte) varptr(st)+8 を基点に操作(24byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_VIDEO_PROCESS_INPUT_STREAM サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; pTexture2D : ID3D12Resource* (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; Subresource : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ReferenceSet : D3D12_VIDEO_PROCESS_REFERENCE_SET (+16, 48byte) varptr(st)+16 を基点に操作(48byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global D3D12_VIDEO_PROCESS_REFERENCE_SET
#field int NumPastFrames
#field intptr ppPastFrames
#field intptr pPastSubresources
#field int NumFutureFrames
#field intptr ppFutureFrames
#field intptr pFutureSubresources
#endstruct
#defstruct global D3D12_VIDEO_PROCESS_INPUT_STREAM
#field intptr pTexture2D
#field int Subresource
#field D3D12_VIDEO_PROCESS_REFERENCE_SET ReferenceSet
#endstruct
stdim st, D3D12_VIDEO_PROCESS_INPUT_STREAM ; NSTRUCT 変数を確保
st->Subresource = 100
mes "Subresource=" + st->Subresource