ホーム › Media.MediaFoundation › D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM
D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NodeIndex | DWORD | 4 | +0 | +0 | 単一 GPU で動作する場合は、これを 0 に設定します。複数の GPU ノードがある場合は、コマンド キューの適用先となるノード (デバイスの物理アダプター) を識別するビットを設定します。マスクの各ビットが 1 つのノードに対応します。設定できるビットは 1 つだけです。 |
| DecodeProfile | GUID | 16 | +4 | +4 | ヒストグラム機能を照会するデコード プロファイルを表す GUID です。使用可能なプロファイル GUID の一覧は、指定する機能を D3D12_FEATURE_VIDEO_DECODE_PROFILES にして ID3D12VideoDevice::CheckFeatureSupport を呼び出すことで取得できます。 |
| Width | DWORD | 4 | +20 | +20 | ソース ストリームのデコード幅です。 |
| Height | DWORD | 4 | +24 | +24 | ソース ストリームのデコード高さです。 |
| DecodeFormat | DXGI_FORMAT | 4 | +28 | +28 | デコード形式を表す DXGI_FORMAT です。 |
| Components | D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS | 4 | +32 | +32 | ヒストグラムのサポートを照会する DXGI_FORMAT のコンポーネントを指定する、D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS 列挙型の値のビット単位の OR による組み合わせです。 |
| BinCount | DWORD | 4 | +36 | +36 | サポートされるコンポーネントごとのビンの数です。この値は 64 以上で、かつ 2 のべき乗 (64、128、256、512... など) でなければなりません。 |
| CounterBitDepth | DWORD | 4 | +40 | +40 | ビン カウンターのビット深度です。カウンターは常に 32 ビット値として格納されるため、この値は 32 ビット以下を指定しなければなりません。カウンターは 32 ビットの記憶領域の下位ビットに格納され、上位ビットは 0 に設定されます。ビンのカウントがこのビット深度を超える場合、値はカウンターの最大値に設定されます。CounterBitDepth の有効な値は 16、24、32 です。 |
公式ドキュメント
指定された機能が D3D12_FEATURE_VIDEO_DECODE_HISTOGRAM である場合の ID3D12VideoDevice::CheckFeatureSupport の呼び出しにデータを提供します。指定されたデコーダー構成のヒストグラム機能を取得します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM (x64 44 / x86 44 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM {
DWORD NodeIndex;
GUID DecodeProfile;
DWORD Width;
DWORD Height;
DXGI_FORMAT DecodeFormat;
D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS Components;
DWORD BinCount;
DWORD CounterBitDepth;
} D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM
{
public uint NodeIndex;
public Guid DecodeProfile;
public uint Width;
public uint Height;
public int DecodeFormat;
public int Components;
public uint BinCount;
public uint CounterBitDepth;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM
Public NodeIndex As UInteger
Public DecodeProfile As Guid
Public Width As UInteger
Public Height As UInteger
Public DecodeFormat As Integer
Public Components As Integer
Public BinCount As UInteger
Public CounterBitDepth As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM(ctypes.Structure):
_fields_ = [
("NodeIndex", wintypes.DWORD),
("DecodeProfile", GUID),
("Width", wintypes.DWORD),
("Height", wintypes.DWORD),
("DecodeFormat", ctypes.c_int),
("Components", ctypes.c_int),
("BinCount", wintypes.DWORD),
("CounterBitDepth", wintypes.DWORD),
]#[repr(C)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM {
pub NodeIndex: u32,
pub DecodeProfile: GUID,
pub Width: u32,
pub Height: u32,
pub DecodeFormat: i32,
pub Components: i32,
pub BinCount: u32,
pub CounterBitDepth: u32,
}import "golang.org/x/sys/windows"
type D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM struct {
NodeIndex uint32
DecodeProfile windows.GUID
Width uint32
Height uint32
DecodeFormat int32
Components int32
BinCount uint32
CounterBitDepth uint32
}type
D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM = record
NodeIndex: DWORD;
DecodeProfile: TGUID;
Width: DWORD;
Height: DWORD;
DecodeFormat: Integer;
Components: Integer;
BinCount: DWORD;
CounterBitDepth: DWORD;
end;const D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM = extern struct {
NodeIndex: u32,
DecodeProfile: GUID,
Width: u32,
Height: u32,
DecodeFormat: i32,
Components: i32,
BinCount: u32,
CounterBitDepth: u32,
};type
D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM {.bycopy.} = object
NodeIndex: uint32
DecodeProfile: GUID
Width: uint32
Height: uint32
DecodeFormat: int32
Components: int32
BinCount: uint32
CounterBitDepth: uint32struct D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM
{
uint NodeIndex;
GUID DecodeProfile;
uint Width;
uint Height;
int DecodeFormat;
int Components;
uint BinCount;
uint CounterBitDepth;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM サイズ: 44 バイト(x64)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; DecodeProfile : GUID (+4, 16byte) varptr(st)+4 を基点に操作(16byte:入れ子/配列)
; Width : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Height : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; DecodeFormat : DXGI_FORMAT (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; Components : D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; BinCount : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; CounterBitDepth : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM
#field int NodeIndex
#field GUID DecodeProfile
#field int Width
#field int Height
#field int DecodeFormat
#field int Components
#field int BinCount
#field int CounterBitDepth
#endstruct
stdim st, D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM ; NSTRUCT 変数を確保
st->NodeIndex = 100
mes "NodeIndex=" + st->NodeIndex