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

DXVAUncompDataInfo

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

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

フィールド

フィールドサイズx64x86説明
UncompWidthDWORD4+0+0非圧縮データの幅(ピクセル)を示す。
UncompHeightDWORD4+4+4非圧縮データの高さ(ピクセル)を示す。
UncompFormatD3DFORMAT4+8+8非圧縮データのD3Dサーフェスフォーマットを示す。

各言語での定義

#include <windows.h>

// DXVAUncompDataInfo  (x64 12 / x86 12 バイト)
typedef struct DXVAUncompDataInfo {
    DWORD UncompWidth;
    DWORD UncompHeight;
    D3DFORMAT UncompFormat;
} DXVAUncompDataInfo;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVAUncompDataInfo
{
    public uint UncompWidth;
    public uint UncompHeight;
    public uint UncompFormat;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVAUncompDataInfo
    Public UncompWidth As UInteger
    Public UncompHeight As UInteger
    Public UncompFormat As UInteger
End Structure
import ctypes
from ctypes import wintypes

class DXVAUncompDataInfo(ctypes.Structure):
    _fields_ = [
        ("UncompWidth", wintypes.DWORD),
        ("UncompHeight", wintypes.DWORD),
        ("UncompFormat", wintypes.DWORD),
    ]
#[repr(C)]
pub struct DXVAUncompDataInfo {
    pub UncompWidth: u32,
    pub UncompHeight: u32,
    pub UncompFormat: u32,
}
import "golang.org/x/sys/windows"

type DXVAUncompDataInfo struct {
	UncompWidth uint32
	UncompHeight uint32
	UncompFormat uint32
}
type
  DXVAUncompDataInfo = record
    UncompWidth: DWORD;
    UncompHeight: DWORD;
    UncompFormat: DWORD;
  end;
const DXVAUncompDataInfo = extern struct {
    UncompWidth: u32,
    UncompHeight: u32,
    UncompFormat: u32,
};
type
  DXVAUncompDataInfo {.bycopy.} = object
    UncompWidth: uint32
    UncompHeight: uint32
    UncompFormat: uint32
struct DXVAUncompDataInfo
{
    uint UncompWidth;
    uint UncompHeight;
    uint UncompFormat;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVAUncompDataInfo サイズ: 12 バイト(x64)
dim st, 3    ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; UncompWidth : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; UncompHeight : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; UncompFormat : D3DFORMAT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DXVAUncompDataInfo
    #field int UncompWidth
    #field int UncompHeight
    #field int UncompFormat
#endstruct

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