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

D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE

構造体
サイズx64: 48 バイト / x86: 32 バイト

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

フィールド

フィールドサイズx64x86説明
NodeMaskDWORD4+0+0対象ノードを示すビットマスク。
pOutputStreamDescD3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC*8/4+8+4出力ストリーム記述子へのポインタD3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC*。
NumInputStreamDescsDWORD4+16+8入力ストリーム記述子の個数。
pInputStreamDescsD3D12_VIDEO_PROCESS_INPUT_STREAM_DESC*8/4+24+12入力ストリーム記述子配列へのポインタD3D12_VIDEO_PROCESS_INPUT_STREAM_DESC*。
MemoryPoolL0SizeULONGLONG8+32+16メモリプールL0に必要なサイズ(バイト単位、出力)。
MemoryPoolL1SizeULONGLONG8+40+24メモリプールL1に必要なサイズ(バイト単位、出力)。

各言語での定義

#include <windows.h>

// D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE  (x64 48 / x86 32 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE {
    DWORD NodeMask;
    D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC* pOutputStreamDesc;
    DWORD NumInputStreamDescs;
    D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC* pInputStreamDescs;
    ULONGLONG MemoryPoolL0Size;
    ULONGLONG MemoryPoolL1Size;
} D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE
{
    public uint NodeMask;
    public IntPtr pOutputStreamDesc;
    public uint NumInputStreamDescs;
    public IntPtr pInputStreamDescs;
    public ulong MemoryPoolL0Size;
    public ulong MemoryPoolL1Size;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE
    Public NodeMask As UInteger
    Public pOutputStreamDesc As IntPtr
    Public NumInputStreamDescs As UInteger
    Public pInputStreamDescs As IntPtr
    Public MemoryPoolL0Size As ULong
    Public MemoryPoolL1Size As ULong
End Structure
import ctypes
from ctypes import wintypes

class D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE(ctypes.Structure):
    _fields_ = [
        ("NodeMask", wintypes.DWORD),
        ("pOutputStreamDesc", ctypes.c_void_p),
        ("NumInputStreamDescs", wintypes.DWORD),
        ("pInputStreamDescs", ctypes.c_void_p),
        ("MemoryPoolL0Size", ctypes.c_ulonglong),
        ("MemoryPoolL1Size", ctypes.c_ulonglong),
    ]
#[repr(C)]
pub struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE {
    pub NodeMask: u32,
    pub pOutputStreamDesc: *mut core::ffi::c_void,
    pub NumInputStreamDescs: u32,
    pub pInputStreamDescs: *mut core::ffi::c_void,
    pub MemoryPoolL0Size: u64,
    pub MemoryPoolL1Size: u64,
}
import "golang.org/x/sys/windows"

type D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE struct {
	NodeMask uint32
	pOutputStreamDesc uintptr
	NumInputStreamDescs uint32
	pInputStreamDescs uintptr
	MemoryPoolL0Size uint64
	MemoryPoolL1Size uint64
}
type
  D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE = record
    NodeMask: DWORD;
    pOutputStreamDesc: Pointer;
    NumInputStreamDescs: DWORD;
    pInputStreamDescs: Pointer;
    MemoryPoolL0Size: UInt64;
    MemoryPoolL1Size: UInt64;
  end;
const D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE = extern struct {
    NodeMask: u32,
    pOutputStreamDesc: ?*anyopaque,
    NumInputStreamDescs: u32,
    pInputStreamDescs: ?*anyopaque,
    MemoryPoolL0Size: u64,
    MemoryPoolL1Size: u64,
};
type
  D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE {.bycopy.} = object
    NodeMask: uint32
    pOutputStreamDesc: pointer
    NumInputStreamDescs: uint32
    pInputStreamDescs: pointer
    MemoryPoolL0Size: uint64
    MemoryPoolL1Size: uint64
struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE
{
    uint NodeMask;
    void* pOutputStreamDesc;
    uint NumInputStreamDescs;
    void* pInputStreamDescs;
    ulong MemoryPoolL0Size;
    ulong MemoryPoolL1Size;
}

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_PROCESSOR_SIZE サイズ: 32 バイト(x86)
dim st, 8    ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; NodeMask : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; pOutputStreamDesc : D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC* (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; NumInputStreamDescs : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; pInputStreamDescs : D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC* (+12, 4byte)  varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; MemoryPoolL0Size : ULONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; MemoryPoolL1Size : ULONGLONG (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE サイズ: 48 バイト(x64)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; NodeMask : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; pOutputStreamDesc : D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC* (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; NumInputStreamDescs : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; pInputStreamDescs : D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC* (+24, 8byte)  varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; MemoryPoolL0Size : ULONGLONG (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; MemoryPoolL1Size : ULONGLONG (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE
    #field int NodeMask
    #field intptr pOutputStreamDesc
    #field int NumInputStreamDescs
    #field intptr pInputStreamDescs
    #field int64 MemoryPoolL0Size
    #field int64 MemoryPoolL1Size
#endstruct

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