ホーム › Media.DirectShow › DXVA2_VIDEOPROCESSBLT
DXVA2_VIDEOPROCESSBLT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| TargetFrame | LONGLONG | 8 | +0 | +0 | 出力対象フレームの時刻。単位は100ナノ秒。 |
| TargetRect | RECT | 16 | +8 | +8 | 出力先の描画矩形領域(RECT)。 |
| ConstrictionSize | SIZE | 8 | +24 | +24 | 出力解像度を制限するサイズ(SIZE)。コピー保護用。 |
| StreamingFlags | DWORD | 4 | +32 | +32 | 処理のストリーミング関連フラグ。 |
| BackgroundColor | DXVA2_AYUVSample16 | 8 | +36 | +36 | 背景色(DXVA2_AYUVSample16)。描画されない領域を塗る。 |
| DestFormat | DXVA2_ExtendedFormat | 8/4 | +48 | +44 | 出力先の拡張フォーマット情報(DXVA2_ExtendedFormat)。 |
| DestFlags | DWORD | 4 | +56 | +48 | 出力先に関するフラグ。背景・色域変化等を示す。 |
| ProcAmpValues | DXVA2_ProcAmpValues | 32/16 | +64 | +52 | 輝度・コントラスト等の色調整値(DXVA2_ProcAmpValues)。 |
| Alpha | DXVA2_Fixed32 | 8/4 | +96 | +68 | 出力全体の平面アルファ値(DXVA2_Fixed32固定小数)。 |
| NoiseFilterLuma | DXVA2_FilterValues | 24/12 | +104 | +72 | 輝度(Luma)ノイズ除去フィルタの値(DXVA2_FilterValues)。 |
| NoiseFilterChroma | DXVA2_FilterValues | 24/12 | +128 | +84 | 色差(Chroma)ノイズ除去フィルタの値(DXVA2_FilterValues)。 |
| DetailFilterLuma | DXVA2_FilterValues | 24/12 | +152 | +96 | 輝度(Luma)ディテール強調フィルタの値(DXVA2_FilterValues)。 |
| DetailFilterChroma | DXVA2_FilterValues | 24/12 | +176 | +108 | 色差(Chroma)ディテール強調フィルタの値(DXVA2_FilterValues)。 |
| pSrcSurfaces | DXVA2_VIDEOSAMPLE* | 8/4 | +200 | +120 | 入力サンプル配列(DXVA2_VIDEOSAMPLE)へのポインタ。 |
| NumSrcSurfaces | DWORD | 4 | +208 | +124 | 入力サンプルの数。 |
各言語での定義
#include <windows.h>
// RECT (x64 16 / x86 16 バイト)
typedef struct RECT {
INT left;
INT top;
INT right;
INT bottom;
} RECT;
// SIZE (x64 8 / x86 8 バイト)
typedef struct SIZE {
INT cx;
INT cy;
} SIZE;
// DXVA2_AYUVSample16 (x64 8 / x86 8 バイト)
typedef struct DXVA2_AYUVSample16 {
WORD Cr;
WORD Cb;
WORD Y;
WORD Alpha;
} DXVA2_AYUVSample16;
// DXVA2_ExtendedFormat (x64 8 / x86 4 バイト)
typedef struct DXVA2_ExtendedFormat {
_Anonymous_e__Union Anonymous;
} DXVA2_ExtendedFormat;
// DXVA2_Fixed32 (x64 8 / x86 4 バイト)
typedef struct DXVA2_Fixed32 {
_Anonymous_e__Union Anonymous;
} DXVA2_Fixed32;
// DXVA2_ProcAmpValues (x64 32 / x86 16 バイト)
typedef struct DXVA2_ProcAmpValues {
DXVA2_Fixed32 Brightness;
DXVA2_Fixed32 Contrast;
DXVA2_Fixed32 Hue;
DXVA2_Fixed32 Saturation;
} DXVA2_ProcAmpValues;
// DXVA2_FilterValues (x64 24 / x86 12 バイト)
typedef struct DXVA2_FilterValues {
DXVA2_Fixed32 Level;
DXVA2_Fixed32 Threshold;
DXVA2_Fixed32 Radius;
} DXVA2_FilterValues;
// DXVA2_VIDEOPROCESSBLT (x64 216 / x86 128 バイト)
typedef struct DXVA2_VIDEOPROCESSBLT {
LONGLONG TargetFrame;
RECT TargetRect;
SIZE ConstrictionSize;
DWORD StreamingFlags;
DXVA2_AYUVSample16 BackgroundColor;
DXVA2_ExtendedFormat DestFormat;
DWORD DestFlags;
DXVA2_ProcAmpValues ProcAmpValues;
DXVA2_Fixed32 Alpha;
DXVA2_FilterValues NoiseFilterLuma;
DXVA2_FilterValues NoiseFilterChroma;
DXVA2_FilterValues DetailFilterLuma;
DXVA2_FilterValues DetailFilterChroma;
DXVA2_VIDEOSAMPLE* pSrcSurfaces;
DWORD NumSrcSurfaces;
} DXVA2_VIDEOPROCESSBLT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RECT
{
public int left;
public int top;
public int right;
public int bottom;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SIZE
{
public int cx;
public int cy;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA2_AYUVSample16
{
public ushort Cr;
public ushort Cb;
public ushort Y;
public ushort Alpha;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA2_ExtendedFormat
{
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA2_Fixed32
{
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA2_ProcAmpValues
{
public DXVA2_Fixed32 Brightness;
public DXVA2_Fixed32 Contrast;
public DXVA2_Fixed32 Hue;
public DXVA2_Fixed32 Saturation;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA2_FilterValues
{
public DXVA2_Fixed32 Level;
public DXVA2_Fixed32 Threshold;
public DXVA2_Fixed32 Radius;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA2_VIDEOPROCESSBLT
{
public long TargetFrame;
public RECT TargetRect;
public SIZE ConstrictionSize;
public uint StreamingFlags;
public DXVA2_AYUVSample16 BackgroundColor;
public DXVA2_ExtendedFormat DestFormat;
public uint DestFlags;
public DXVA2_ProcAmpValues ProcAmpValues;
public DXVA2_Fixed32 Alpha;
public DXVA2_FilterValues NoiseFilterLuma;
public DXVA2_FilterValues NoiseFilterChroma;
public DXVA2_FilterValues DetailFilterLuma;
public DXVA2_FilterValues DetailFilterChroma;
public IntPtr pSrcSurfaces;
public uint NumSrcSurfaces;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RECT
Public left As Integer
Public top As Integer
Public right As Integer
Public bottom As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SIZE
Public cx As Integer
Public cy As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA2_AYUVSample16
Public Cr As UShort
Public Cb As UShort
Public Y As UShort
Public Alpha As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA2_ExtendedFormat
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA2_Fixed32
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA2_ProcAmpValues
Public Brightness As DXVA2_Fixed32
Public Contrast As DXVA2_Fixed32
Public Hue As DXVA2_Fixed32
Public Saturation As DXVA2_Fixed32
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA2_FilterValues
Public Level As DXVA2_Fixed32
Public Threshold As DXVA2_Fixed32
Public Radius As DXVA2_Fixed32
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA2_VIDEOPROCESSBLT
Public TargetFrame As Long
Public TargetRect As RECT
Public ConstrictionSize As SIZE
Public StreamingFlags As UInteger
Public BackgroundColor As DXVA2_AYUVSample16
Public DestFormat As DXVA2_ExtendedFormat
Public DestFlags As UInteger
Public ProcAmpValues As DXVA2_ProcAmpValues
Public Alpha As DXVA2_Fixed32
Public NoiseFilterLuma As DXVA2_FilterValues
Public NoiseFilterChroma As DXVA2_FilterValues
Public DetailFilterLuma As DXVA2_FilterValues
Public DetailFilterChroma As DXVA2_FilterValues
Public pSrcSurfaces As IntPtr
Public NumSrcSurfaces As UInteger
End Structureimport ctypes
from ctypes import wintypes
class RECT(ctypes.Structure):
_fields_ = [
("left", ctypes.c_int),
("top", ctypes.c_int),
("right", ctypes.c_int),
("bottom", ctypes.c_int),
]
class SIZE(ctypes.Structure):
_fields_ = [
("cx", ctypes.c_int),
("cy", ctypes.c_int),
]
class DXVA2_AYUVSample16(ctypes.Structure):
_fields_ = [
("Cr", ctypes.c_ushort),
("Cb", ctypes.c_ushort),
("Y", ctypes.c_ushort),
("Alpha", ctypes.c_ushort),
]
class DXVA2_ExtendedFormat(ctypes.Structure):
_fields_ = [
("Anonymous", _Anonymous_e__Union),
]
class DXVA2_Fixed32(ctypes.Structure):
_fields_ = [
("Anonymous", _Anonymous_e__Union),
]
class DXVA2_ProcAmpValues(ctypes.Structure):
_fields_ = [
("Brightness", DXVA2_Fixed32),
("Contrast", DXVA2_Fixed32),
("Hue", DXVA2_Fixed32),
("Saturation", DXVA2_Fixed32),
]
class DXVA2_FilterValues(ctypes.Structure):
_fields_ = [
("Level", DXVA2_Fixed32),
("Threshold", DXVA2_Fixed32),
("Radius", DXVA2_Fixed32),
]
class DXVA2_VIDEOPROCESSBLT(ctypes.Structure):
_fields_ = [
("TargetFrame", ctypes.c_longlong),
("TargetRect", RECT),
("ConstrictionSize", SIZE),
("StreamingFlags", wintypes.DWORD),
("BackgroundColor", DXVA2_AYUVSample16),
("DestFormat", DXVA2_ExtendedFormat),
("DestFlags", wintypes.DWORD),
("ProcAmpValues", DXVA2_ProcAmpValues),
("Alpha", DXVA2_Fixed32),
("NoiseFilterLuma", DXVA2_FilterValues),
("NoiseFilterChroma", DXVA2_FilterValues),
("DetailFilterLuma", DXVA2_FilterValues),
("DetailFilterChroma", DXVA2_FilterValues),
("pSrcSurfaces", ctypes.c_void_p),
("NumSrcSurfaces", wintypes.DWORD),
]#[repr(C)]
pub struct RECT {
pub left: i32,
pub top: i32,
pub right: i32,
pub bottom: i32,
}
#[repr(C)]
pub struct SIZE {
pub cx: i32,
pub cy: i32,
}
#[repr(C)]
pub struct DXVA2_AYUVSample16 {
pub Cr: u16,
pub Cb: u16,
pub Y: u16,
pub Alpha: u16,
}
#[repr(C)]
pub struct DXVA2_ExtendedFormat {
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct DXVA2_Fixed32 {
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct DXVA2_ProcAmpValues {
pub Brightness: DXVA2_Fixed32,
pub Contrast: DXVA2_Fixed32,
pub Hue: DXVA2_Fixed32,
pub Saturation: DXVA2_Fixed32,
}
#[repr(C)]
pub struct DXVA2_FilterValues {
pub Level: DXVA2_Fixed32,
pub Threshold: DXVA2_Fixed32,
pub Radius: DXVA2_Fixed32,
}
#[repr(C)]
pub struct DXVA2_VIDEOPROCESSBLT {
pub TargetFrame: i64,
pub TargetRect: RECT,
pub ConstrictionSize: SIZE,
pub StreamingFlags: u32,
pub BackgroundColor: DXVA2_AYUVSample16,
pub DestFormat: DXVA2_ExtendedFormat,
pub DestFlags: u32,
pub ProcAmpValues: DXVA2_ProcAmpValues,
pub Alpha: DXVA2_Fixed32,
pub NoiseFilterLuma: DXVA2_FilterValues,
pub NoiseFilterChroma: DXVA2_FilterValues,
pub DetailFilterLuma: DXVA2_FilterValues,
pub DetailFilterChroma: DXVA2_FilterValues,
pub pSrcSurfaces: *mut core::ffi::c_void,
pub NumSrcSurfaces: u32,
}import "golang.org/x/sys/windows"
type RECT struct {
left int32
top int32
right int32
bottom int32
}
type SIZE struct {
cx int32
cy int32
}
type DXVA2_AYUVSample16 struct {
Cr uint16
Cb uint16
Y uint16
Alpha uint16
}
type DXVA2_ExtendedFormat struct {
Anonymous _Anonymous_e__Union
}
type DXVA2_Fixed32 struct {
Anonymous _Anonymous_e__Union
}
type DXVA2_ProcAmpValues struct {
Brightness DXVA2_Fixed32
Contrast DXVA2_Fixed32
Hue DXVA2_Fixed32
Saturation DXVA2_Fixed32
}
type DXVA2_FilterValues struct {
Level DXVA2_Fixed32
Threshold DXVA2_Fixed32
Radius DXVA2_Fixed32
}
type DXVA2_VIDEOPROCESSBLT struct {
TargetFrame int64
TargetRect RECT
ConstrictionSize SIZE
StreamingFlags uint32
BackgroundColor DXVA2_AYUVSample16
DestFormat DXVA2_ExtendedFormat
DestFlags uint32
ProcAmpValues DXVA2_ProcAmpValues
Alpha DXVA2_Fixed32
NoiseFilterLuma DXVA2_FilterValues
NoiseFilterChroma DXVA2_FilterValues
DetailFilterLuma DXVA2_FilterValues
DetailFilterChroma DXVA2_FilterValues
pSrcSurfaces uintptr
NumSrcSurfaces uint32
}type
RECT = record
left: Integer;
top: Integer;
right: Integer;
bottom: Integer;
end;
SIZE = record
cx: Integer;
cy: Integer;
end;
DXVA2_AYUVSample16 = record
Cr: Word;
Cb: Word;
Y: Word;
Alpha: Word;
end;
DXVA2_ExtendedFormat = record
Anonymous: _Anonymous_e__Union;
end;
DXVA2_Fixed32 = record
Anonymous: _Anonymous_e__Union;
end;
DXVA2_ProcAmpValues = record
Brightness: DXVA2_Fixed32;
Contrast: DXVA2_Fixed32;
Hue: DXVA2_Fixed32;
Saturation: DXVA2_Fixed32;
end;
DXVA2_FilterValues = record
Level: DXVA2_Fixed32;
Threshold: DXVA2_Fixed32;
Radius: DXVA2_Fixed32;
end;
DXVA2_VIDEOPROCESSBLT = record
TargetFrame: Int64;
TargetRect: RECT;
ConstrictionSize: SIZE;
StreamingFlags: DWORD;
BackgroundColor: DXVA2_AYUVSample16;
DestFormat: DXVA2_ExtendedFormat;
DestFlags: DWORD;
ProcAmpValues: DXVA2_ProcAmpValues;
Alpha: DXVA2_Fixed32;
NoiseFilterLuma: DXVA2_FilterValues;
NoiseFilterChroma: DXVA2_FilterValues;
DetailFilterLuma: DXVA2_FilterValues;
DetailFilterChroma: DXVA2_FilterValues;
pSrcSurfaces: Pointer;
NumSrcSurfaces: DWORD;
end;const RECT = extern struct {
left: i32,
top: i32,
right: i32,
bottom: i32,
};
const SIZE = extern struct {
cx: i32,
cy: i32,
};
const DXVA2_AYUVSample16 = extern struct {
Cr: u16,
Cb: u16,
Y: u16,
Alpha: u16,
};
const DXVA2_ExtendedFormat = extern struct {
Anonymous: _Anonymous_e__Union,
};
const DXVA2_Fixed32 = extern struct {
Anonymous: _Anonymous_e__Union,
};
const DXVA2_ProcAmpValues = extern struct {
Brightness: DXVA2_Fixed32,
Contrast: DXVA2_Fixed32,
Hue: DXVA2_Fixed32,
Saturation: DXVA2_Fixed32,
};
const DXVA2_FilterValues = extern struct {
Level: DXVA2_Fixed32,
Threshold: DXVA2_Fixed32,
Radius: DXVA2_Fixed32,
};
const DXVA2_VIDEOPROCESSBLT = extern struct {
TargetFrame: i64,
TargetRect: RECT,
ConstrictionSize: SIZE,
StreamingFlags: u32,
BackgroundColor: DXVA2_AYUVSample16,
DestFormat: DXVA2_ExtendedFormat,
DestFlags: u32,
ProcAmpValues: DXVA2_ProcAmpValues,
Alpha: DXVA2_Fixed32,
NoiseFilterLuma: DXVA2_FilterValues,
NoiseFilterChroma: DXVA2_FilterValues,
DetailFilterLuma: DXVA2_FilterValues,
DetailFilterChroma: DXVA2_FilterValues,
pSrcSurfaces: ?*anyopaque,
NumSrcSurfaces: u32,
};type
RECT {.bycopy.} = object
left: int32
top: int32
right: int32
bottom: int32
SIZE {.bycopy.} = object
cx: int32
cy: int32
DXVA2_AYUVSample16 {.bycopy.} = object
Cr: uint16
Cb: uint16
Y: uint16
Alpha: uint16
DXVA2_ExtendedFormat {.bycopy.} = object
Anonymous: _Anonymous_e__Union
DXVA2_Fixed32 {.bycopy.} = object
Anonymous: _Anonymous_e__Union
DXVA2_ProcAmpValues {.bycopy.} = object
Brightness: DXVA2_Fixed32
Contrast: DXVA2_Fixed32
Hue: DXVA2_Fixed32
Saturation: DXVA2_Fixed32
DXVA2_FilterValues {.bycopy.} = object
Level: DXVA2_Fixed32
Threshold: DXVA2_Fixed32
Radius: DXVA2_Fixed32
DXVA2_VIDEOPROCESSBLT {.bycopy.} = object
TargetFrame: int64
TargetRect: RECT
ConstrictionSize: SIZE
StreamingFlags: uint32
BackgroundColor: DXVA2_AYUVSample16
DestFormat: DXVA2_ExtendedFormat
DestFlags: uint32
ProcAmpValues: DXVA2_ProcAmpValues
Alpha: DXVA2_Fixed32
NoiseFilterLuma: DXVA2_FilterValues
NoiseFilterChroma: DXVA2_FilterValues
DetailFilterLuma: DXVA2_FilterValues
DetailFilterChroma: DXVA2_FilterValues
pSrcSurfaces: pointer
NumSrcSurfaces: uint32struct RECT
{
int left;
int top;
int right;
int bottom;
}
struct SIZE
{
int cx;
int cy;
}
struct DXVA2_AYUVSample16
{
ushort Cr;
ushort Cb;
ushort Y;
ushort Alpha;
}
struct DXVA2_ExtendedFormat
{
_Anonymous_e__Union Anonymous;
}
struct DXVA2_Fixed32
{
_Anonymous_e__Union Anonymous;
}
struct DXVA2_ProcAmpValues
{
DXVA2_Fixed32 Brightness;
DXVA2_Fixed32 Contrast;
DXVA2_Fixed32 Hue;
DXVA2_Fixed32 Saturation;
}
struct DXVA2_FilterValues
{
DXVA2_Fixed32 Level;
DXVA2_Fixed32 Threshold;
DXVA2_Fixed32 Radius;
}
struct DXVA2_VIDEOPROCESSBLT
{
long TargetFrame;
RECT TargetRect;
SIZE ConstrictionSize;
uint StreamingFlags;
DXVA2_AYUVSample16 BackgroundColor;
DXVA2_ExtendedFormat DestFormat;
uint DestFlags;
DXVA2_ProcAmpValues ProcAmpValues;
DXVA2_Fixed32 Alpha;
DXVA2_FilterValues NoiseFilterLuma;
DXVA2_FilterValues NoiseFilterChroma;
DXVA2_FilterValues DetailFilterLuma;
DXVA2_FilterValues DetailFilterChroma;
void* pSrcSurfaces;
uint NumSrcSurfaces;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DXVA2_VIDEOPROCESSBLT サイズ: 128 バイト(x86)
dim st, 32 ; 4byte整数×32(構造体サイズ 128 / 4 切り上げ)
; TargetFrame : LONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; TargetRect : RECT (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; ConstrictionSize : SIZE (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; StreamingFlags : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; BackgroundColor : DXVA2_AYUVSample16 (+36, 8byte) varptr(st)+36 を基点に操作(8byte:入れ子/配列)
; DestFormat : DXVA2_ExtendedFormat (+44, 4byte) varptr(st)+44 を基点に操作(4byte:入れ子/配列)
; DestFlags : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ProcAmpValues : DXVA2_ProcAmpValues (+52, 16byte) varptr(st)+52 を基点に操作(16byte:入れ子/配列)
; Alpha : DXVA2_Fixed32 (+68, 4byte) varptr(st)+68 を基点に操作(4byte:入れ子/配列)
; NoiseFilterLuma : DXVA2_FilterValues (+72, 12byte) varptr(st)+72 を基点に操作(12byte:入れ子/配列)
; NoiseFilterChroma : DXVA2_FilterValues (+84, 12byte) varptr(st)+84 を基点に操作(12byte:入れ子/配列)
; DetailFilterLuma : DXVA2_FilterValues (+96, 12byte) varptr(st)+96 を基点に操作(12byte:入れ子/配列)
; DetailFilterChroma : DXVA2_FilterValues (+108, 12byte) varptr(st)+108 を基点に操作(12byte:入れ子/配列)
; pSrcSurfaces : DXVA2_VIDEOSAMPLE* (+120, 4byte) varptr(st)+120 を基点に操作(4byte:入れ子/配列)
; NumSrcSurfaces : DWORD (+124, 4byte) st.31 = 値 / 値 = st.31 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVA2_VIDEOPROCESSBLT サイズ: 216 バイト(x64)
dim st, 54 ; 4byte整数×54(構造体サイズ 216 / 4 切り上げ)
; TargetFrame : LONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; TargetRect : RECT (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; ConstrictionSize : SIZE (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; StreamingFlags : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; BackgroundColor : DXVA2_AYUVSample16 (+36, 8byte) varptr(st)+36 を基点に操作(8byte:入れ子/配列)
; DestFormat : DXVA2_ExtendedFormat (+48, 8byte) varptr(st)+48 を基点に操作(8byte:入れ子/配列)
; DestFlags : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; ProcAmpValues : DXVA2_ProcAmpValues (+64, 32byte) varptr(st)+64 を基点に操作(32byte:入れ子/配列)
; Alpha : DXVA2_Fixed32 (+96, 8byte) varptr(st)+96 を基点に操作(8byte:入れ子/配列)
; NoiseFilterLuma : DXVA2_FilterValues (+104, 24byte) varptr(st)+104 を基点に操作(24byte:入れ子/配列)
; NoiseFilterChroma : DXVA2_FilterValues (+128, 24byte) varptr(st)+128 を基点に操作(24byte:入れ子/配列)
; DetailFilterLuma : DXVA2_FilterValues (+152, 24byte) varptr(st)+152 を基点に操作(24byte:入れ子/配列)
; DetailFilterChroma : DXVA2_FilterValues (+176, 24byte) varptr(st)+176 を基点に操作(24byte:入れ子/配列)
; pSrcSurfaces : DXVA2_VIDEOSAMPLE* (+200, 8byte) varptr(st)+200 を基点に操作(8byte:入れ子/配列)
; NumSrcSurfaces : DWORD (+208, 4byte) st.52 = 値 / 値 = st.52 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global RECT
#field int left
#field int top
#field int right
#field int bottom
#endstruct
#defstruct global SIZE
#field int cx
#field int cy
#endstruct
#defstruct global DXVA2_AYUVSample16
#field short Cr
#field short Cb
#field short Y
#field short Alpha
#endstruct
#defstruct global DXVA2_ExtendedFormat
#field byte Anonymous 8
#endstruct
#defstruct global DXVA2_Fixed32
#field byte Anonymous 8
#endstruct
#defstruct global DXVA2_ProcAmpValues
#field DXVA2_Fixed32 Brightness
#field DXVA2_Fixed32 Contrast
#field DXVA2_Fixed32 Hue
#field DXVA2_Fixed32 Saturation
#endstruct
#defstruct global DXVA2_FilterValues
#field DXVA2_Fixed32 Level
#field DXVA2_Fixed32 Threshold
#field DXVA2_Fixed32 Radius
#endstruct
#defstruct global DXVA2_VIDEOPROCESSBLT
#field int64 TargetFrame
#field RECT TargetRect
#field SIZE ConstrictionSize
#field int StreamingFlags
#field DXVA2_AYUVSample16 BackgroundColor
#field DXVA2_ExtendedFormat DestFormat
#field int DestFlags
#field DXVA2_ProcAmpValues ProcAmpValues
#field DXVA2_Fixed32 Alpha
#field DXVA2_FilterValues NoiseFilterLuma
#field DXVA2_FilterValues NoiseFilterChroma
#field DXVA2_FilterValues DetailFilterLuma
#field DXVA2_FilterValues DetailFilterChroma
#field intptr pSrcSurfaces
#field int NumSrcSurfaces
#endstruct
stdim st, DXVA2_VIDEOPROCESSBLT ; NSTRUCT 変数を確保
st->TargetFrame = 100
mes "TargetFrame=" + st->TargetFrame