Win32 API 日本語リファレンス
ホームGraphics.Direct3D11 › D3D11_VIDEO_DECODER_BUFFER_DESC1

D3D11_VIDEO_DECODER_BUFFER_DESC1

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

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

フィールド

フィールドサイズx64x86説明
BufferTypeD3D11_VIDEO_DECODER_BUFFER_TYPE4+0+0バッファの種類を示すD3D11_VIDEO_DECODER_BUFFER_TYPE列挙値。
DataOffsetDWORD4+4+4バッファ内の有効データ開始位置のオフセット(バイト)。
DataSizeDWORD4+8+8バッファ内の有効データのサイズ(バイト)。
pIVvoid*8/4+16+12暗号化に使用する初期化ベクトルへのポインタ。暗号化なしの場合はNULL。
IVSizeDWORD4+24+16pIVが指す初期化ベクトルのサイズ(バイト)。
pSubSampleMappingBlockD3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK*8/4+32+20サブサンプル暗号化マッピング配列へのポインタ。NULL可。
SubSampleMappingCountDWORD4+40+24pSubSampleMappingBlockが指す配列の要素数。

各言語での定義

#include <windows.h>

// D3D11_VIDEO_DECODER_BUFFER_DESC1  (x64 48 / x86 28 バイト)
typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC1 {
    D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType;
    DWORD DataOffset;
    DWORD DataSize;
    void* pIV;
    DWORD IVSize;
    D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* pSubSampleMappingBlock;
    DWORD SubSampleMappingCount;
} D3D11_VIDEO_DECODER_BUFFER_DESC1;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D11_VIDEO_DECODER_BUFFER_DESC1
{
    public int BufferType;
    public uint DataOffset;
    public uint DataSize;
    public IntPtr pIV;
    public uint IVSize;
    public IntPtr pSubSampleMappingBlock;
    public uint SubSampleMappingCount;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D11_VIDEO_DECODER_BUFFER_DESC1
    Public BufferType As Integer
    Public DataOffset As UInteger
    Public DataSize As UInteger
    Public pIV As IntPtr
    Public IVSize As UInteger
    Public pSubSampleMappingBlock As IntPtr
    Public SubSampleMappingCount As UInteger
End Structure
import ctypes
from ctypes import wintypes

class D3D11_VIDEO_DECODER_BUFFER_DESC1(ctypes.Structure):
    _fields_ = [
        ("BufferType", ctypes.c_int),
        ("DataOffset", wintypes.DWORD),
        ("DataSize", wintypes.DWORD),
        ("pIV", ctypes.c_void_p),
        ("IVSize", wintypes.DWORD),
        ("pSubSampleMappingBlock", ctypes.c_void_p),
        ("SubSampleMappingCount", wintypes.DWORD),
    ]
#[repr(C)]
pub struct D3D11_VIDEO_DECODER_BUFFER_DESC1 {
    pub BufferType: i32,
    pub DataOffset: u32,
    pub DataSize: u32,
    pub pIV: *mut core::ffi::c_void,
    pub IVSize: u32,
    pub pSubSampleMappingBlock: *mut core::ffi::c_void,
    pub SubSampleMappingCount: u32,
}
import "golang.org/x/sys/windows"

type D3D11_VIDEO_DECODER_BUFFER_DESC1 struct {
	BufferType int32
	DataOffset uint32
	DataSize uint32
	pIV uintptr
	IVSize uint32
	pSubSampleMappingBlock uintptr
	SubSampleMappingCount uint32
}
type
  D3D11_VIDEO_DECODER_BUFFER_DESC1 = record
    BufferType: Integer;
    DataOffset: DWORD;
    DataSize: DWORD;
    pIV: Pointer;
    IVSize: DWORD;
    pSubSampleMappingBlock: Pointer;
    SubSampleMappingCount: DWORD;
  end;
const D3D11_VIDEO_DECODER_BUFFER_DESC1 = extern struct {
    BufferType: i32,
    DataOffset: u32,
    DataSize: u32,
    pIV: ?*anyopaque,
    IVSize: u32,
    pSubSampleMappingBlock: ?*anyopaque,
    SubSampleMappingCount: u32,
};
type
  D3D11_VIDEO_DECODER_BUFFER_DESC1 {.bycopy.} = object
    BufferType: int32
    DataOffset: uint32
    DataSize: uint32
    pIV: pointer
    IVSize: uint32
    pSubSampleMappingBlock: pointer
    SubSampleMappingCount: uint32
struct D3D11_VIDEO_DECODER_BUFFER_DESC1
{
    int BufferType;
    uint DataOffset;
    uint DataSize;
    void* pIV;
    uint IVSize;
    void* pSubSampleMappingBlock;
    uint SubSampleMappingCount;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; D3D11_VIDEO_DECODER_BUFFER_DESC1 サイズ: 28 バイト(x86)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; BufferType : D3D11_VIDEO_DECODER_BUFFER_TYPE (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; DataOffset : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; DataSize : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; pIV : void* (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; IVSize : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; pSubSampleMappingBlock : D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* (+20, 4byte)  varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; SubSampleMappingCount : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D11_VIDEO_DECODER_BUFFER_DESC1 サイズ: 48 バイト(x64)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; BufferType : D3D11_VIDEO_DECODER_BUFFER_TYPE (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; DataOffset : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; DataSize : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; pIV : void* (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; IVSize : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; pSubSampleMappingBlock : D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* (+32, 8byte)  varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; SubSampleMappingCount : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D11_VIDEO_DECODER_BUFFER_DESC1
    #field int BufferType
    #field int DataOffset
    #field int DataSize
    #field intptr pIV
    #field int IVSize
    #field intptr pSubSampleMappingBlock
    #field int SubSampleMappingCount
#endstruct

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