ホーム › Media.MediaFoundation › DXVA2_ProcAmpValues
DXVA2_ProcAmpValues
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Brightness | DXVA2_Fixed32 | 8/4 | +0 | +0 | 明るさの調整値を示すDXVA2_Fixed32。 |
| Contrast | DXVA2_Fixed32 | 8/4 | +8 | +4 | コントラストの調整値を示すDXVA2_Fixed32。 |
| Hue | DXVA2_Fixed32 | 8/4 | +16 | +8 | 色相の調整値を示すDXVA2_Fixed32。 |
| Saturation | DXVA2_Fixed32 | 8/4 | +24 | +12 | 彩度の調整値を示すDXVA2_Fixed32。 |
各言語での定義
#include <windows.h>
// 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;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_ProcAmpValues
{
public DXVA2_Fixed32 Brightness;
public DXVA2_Fixed32 Contrast;
public DXVA2_Fixed32 Hue;
public DXVA2_Fixed32 Saturation;
}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_ProcAmpValues
Public Brightness As DXVA2_Fixed32
Public Contrast As DXVA2_Fixed32
Public Hue As DXVA2_Fixed32
Public Saturation As DXVA2_Fixed32
End Structureimport ctypes
from ctypes import wintypes
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),
]#[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,
}import "golang.org/x/sys/windows"
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_Fixed32 = record
Anonymous: _Anonymous_e__Union;
end;
DXVA2_ProcAmpValues = record
Brightness: DXVA2_Fixed32;
Contrast: DXVA2_Fixed32;
Hue: DXVA2_Fixed32;
Saturation: DXVA2_Fixed32;
end;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,
};type
DXVA2_Fixed32 {.bycopy.} = object
Anonymous: _Anonymous_e__Union
DXVA2_ProcAmpValues {.bycopy.} = object
Brightness: DXVA2_Fixed32
Contrast: DXVA2_Fixed32
Hue: DXVA2_Fixed32
Saturation: DXVA2_Fixed32struct DXVA2_Fixed32
{
_Anonymous_e__Union Anonymous;
}
struct DXVA2_ProcAmpValues
{
DXVA2_Fixed32 Brightness;
DXVA2_Fixed32 Contrast;
DXVA2_Fixed32 Hue;
DXVA2_Fixed32 Saturation;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DXVA2_ProcAmpValues サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; Brightness : DXVA2_Fixed32 (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; Contrast : DXVA2_Fixed32 (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; Hue : DXVA2_Fixed32 (+8, 4byte) varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; Saturation : DXVA2_Fixed32 (+12, 4byte) varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVA2_ProcAmpValues サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Brightness : DXVA2_Fixed32 (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; Contrast : DXVA2_Fixed32 (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; Hue : DXVA2_Fixed32 (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; Saturation : DXVA2_Fixed32 (+24, 8byte) varptr(st)+24 を基点に操作(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_ProcAmpValues
#field DXVA2_Fixed32 Brightness
#field DXVA2_Fixed32 Contrast
#field DXVA2_Fixed32 Hue
#field DXVA2_Fixed32 Saturation
#endstruct
stdim st, DXVA2_ProcAmpValues ; NSTRUCT 変数を確保