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

DXVA2_FilterValues

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

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

フィールド

フィールドサイズx64x86説明
LevelDXVA2_Fixed328/4+0+0フィルタの適用強度(レベル)を示すDXVA2_Fixed32。
ThresholdDXVA2_Fixed328/4+8+4フィルタ適用のしきい値を示すDXVA2_Fixed32。
RadiusDXVA2_Fixed328/4+16+8フィルタの作用半径を示すDXVA2_Fixed32。

各言語での定義

#include <windows.h>

// DXVA2_Fixed32  (x64 8 / x86 4 バイト)
typedef struct DXVA2_Fixed32 {
    _Anonymous_e__Union Anonymous;
} DXVA2_Fixed32;

// DXVA2_FilterValues  (x64 24 / x86 12 バイト)
typedef struct DXVA2_FilterValues {
    DXVA2_Fixed32 Level;
    DXVA2_Fixed32 Threshold;
    DXVA2_Fixed32 Radius;
} DXVA2_FilterValues;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA2_Fixed32
{
    public _Anonymous_e__Union Anonymous;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA2_FilterValues
{
    public DXVA2_Fixed32 Level;
    public DXVA2_Fixed32 Threshold;
    public DXVA2_Fixed32 Radius;
}
Imports System.Runtime.InteropServices

<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_FilterValues
    Public Level As DXVA2_Fixed32
    Public Threshold As DXVA2_Fixed32
    Public Radius As DXVA2_Fixed32
End Structure
import ctypes
from ctypes import wintypes

class DXVA2_Fixed32(ctypes.Structure):
    _fields_ = [
        ("Anonymous", _Anonymous_e__Union),
    ]

class DXVA2_FilterValues(ctypes.Structure):
    _fields_ = [
        ("Level", DXVA2_Fixed32),
        ("Threshold", DXVA2_Fixed32),
        ("Radius", DXVA2_Fixed32),
    ]
#[repr(C)]
pub struct DXVA2_Fixed32 {
    pub Anonymous: _Anonymous_e__Union,
}

#[repr(C)]
pub struct DXVA2_FilterValues {
    pub Level: DXVA2_Fixed32,
    pub Threshold: DXVA2_Fixed32,
    pub Radius: DXVA2_Fixed32,
}
import "golang.org/x/sys/windows"

type DXVA2_Fixed32 struct {
	Anonymous _Anonymous_e__Union
}

type DXVA2_FilterValues struct {
	Level DXVA2_Fixed32
	Threshold DXVA2_Fixed32
	Radius DXVA2_Fixed32
}
type
  DXVA2_Fixed32 = record
    Anonymous: _Anonymous_e__Union;
  end;

  DXVA2_FilterValues = record
    Level: DXVA2_Fixed32;
    Threshold: DXVA2_Fixed32;
    Radius: DXVA2_Fixed32;
  end;
const DXVA2_Fixed32 = extern struct {
    Anonymous: _Anonymous_e__Union,
};

const DXVA2_FilterValues = extern struct {
    Level: DXVA2_Fixed32,
    Threshold: DXVA2_Fixed32,
    Radius: DXVA2_Fixed32,
};
type
  DXVA2_Fixed32 {.bycopy.} = object
    Anonymous: _Anonymous_e__Union

  DXVA2_FilterValues {.bycopy.} = object
    Level: DXVA2_Fixed32
    Threshold: DXVA2_Fixed32
    Radius: DXVA2_Fixed32
struct DXVA2_Fixed32
{
    _Anonymous_e__Union Anonymous;
}

struct DXVA2_FilterValues
{
    DXVA2_Fixed32 Level;
    DXVA2_Fixed32 Threshold;
    DXVA2_Fixed32 Radius;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DXVA2_FilterValues サイズ: 12 バイト(x86)
dim st, 3    ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; Level : DXVA2_Fixed32 (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; Threshold : DXVA2_Fixed32 (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; Radius : DXVA2_Fixed32 (+8, 4byte)  varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVA2_FilterValues サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; Level : DXVA2_Fixed32 (+0, 8byte)  varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; Threshold : DXVA2_Fixed32 (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; Radius : DXVA2_Fixed32 (+16, 8byte)  varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global DXVA2_Fixed32
    #field byte Anonymous 8
#endstruct

#defstruct global DXVA2_FilterValues
    #field DXVA2_Fixed32 Level
    #field DXVA2_Fixed32 Threshold
    #field DXVA2_Fixed32 Radius
#endstruct

stdim st, DXVA2_FilterValues        ; NSTRUCT 変数を確保