ホーム › Graphics.Direct3D11 › D3D11_VIDEO_DECODER_CONFIG
D3D11_VIDEO_DECODER_CONFIG
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| guidConfigBitstreamEncryption | GUID | 16 | +0 | +0 | ビットストリーム暗号化方式を識別するGUID。暗号化なしの場合はGUID_NULL。 |
| guidConfigMBcontrolEncryption | GUID | 16 | +16 | +16 | マクロブロック制御データの暗号化方式を識別するGUID。暗号化なしの場合はGUID_NULL。 |
| guidConfigResidDiffEncryption | GUID | 16 | +32 | +32 | 残差差分データの暗号化方式を識別するGUID。暗号化なしの場合はGUID_NULL。 |
| ConfigBitstreamRaw | DWORD | 4 | +48 | +48 | ビットストリームを生(raw)形式で渡すか、スライス制御付きで渡すかを示す値。 |
| ConfigMBcontrolRasterOrder | DWORD | 4 | +52 | +52 | マクロブロック制御データがラスタ順かどうかを示す値。 |
| ConfigResidDiffHost | DWORD | 4 | +56 | +56 | 残差差分デコードをホスト側で行うかを示す値。 |
| ConfigSpatialResid8 | DWORD | 4 | +60 | +60 | 空間領域残差を8ビットで表現するかを示す値。 |
| ConfigResid8Subtraction | DWORD | 4 | +64 | +64 | 8ビット残差の減算方式を示す値。 |
| ConfigSpatialHost8or9Clipping | DWORD | 4 | +68 | +68 | ホスト側空間処理で8または9ビットのクリッピングを行うかを示す値。 |
| ConfigSpatialResidInterleaved | DWORD | 4 | +72 | +72 | 空間残差データがインターリーブされているかを示す値。 |
| ConfigIntraResidUnsigned | DWORD | 4 | +76 | +76 | イントラブロックの残差を符号なしで表現するかを示す値。 |
| ConfigResidDiffAccelerator | DWORD | 4 | +80 | +80 | 残差差分デコードをアクセラレータ側で行うかを示す値。 |
| ConfigHostInverseScan | DWORD | 4 | +84 | +84 | 逆スキャンをホスト側で行うかを示す値。 |
| ConfigSpecificIDCT | DWORD | 4 | +88 | +88 | 使用する特定の逆離散コサイン変換(IDCT)実装を示す値。 |
| Config4GroupedCoefs | DWORD | 4 | +92 | +92 | 係数を4個単位でグループ化して渡すかを示す値。 |
| ConfigMinRenderTargetBuffCount | WORD | 2 | +96 | +96 | デコードに必要なレンダーターゲットバッファの最小数。 |
| ConfigDecoderSpecific | WORD | 2 | +98 | +98 | デコーダー固有の構成ビットフラグ。 |
各言語での定義
#include <windows.h>
// D3D11_VIDEO_DECODER_CONFIG (x64 100 / x86 100 バイト)
typedef struct D3D11_VIDEO_DECODER_CONFIG {
GUID guidConfigBitstreamEncryption;
GUID guidConfigMBcontrolEncryption;
GUID guidConfigResidDiffEncryption;
DWORD ConfigBitstreamRaw;
DWORD ConfigMBcontrolRasterOrder;
DWORD ConfigResidDiffHost;
DWORD ConfigSpatialResid8;
DWORD ConfigResid8Subtraction;
DWORD ConfigSpatialHost8or9Clipping;
DWORD ConfigSpatialResidInterleaved;
DWORD ConfigIntraResidUnsigned;
DWORD ConfigResidDiffAccelerator;
DWORD ConfigHostInverseScan;
DWORD ConfigSpecificIDCT;
DWORD Config4GroupedCoefs;
WORD ConfigMinRenderTargetBuffCount;
WORD ConfigDecoderSpecific;
} D3D11_VIDEO_DECODER_CONFIG;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D11_VIDEO_DECODER_CONFIG
{
public Guid guidConfigBitstreamEncryption;
public Guid guidConfigMBcontrolEncryption;
public Guid guidConfigResidDiffEncryption;
public uint ConfigBitstreamRaw;
public uint ConfigMBcontrolRasterOrder;
public uint ConfigResidDiffHost;
public uint ConfigSpatialResid8;
public uint ConfigResid8Subtraction;
public uint ConfigSpatialHost8or9Clipping;
public uint ConfigSpatialResidInterleaved;
public uint ConfigIntraResidUnsigned;
public uint ConfigResidDiffAccelerator;
public uint ConfigHostInverseScan;
public uint ConfigSpecificIDCT;
public uint Config4GroupedCoefs;
public ushort ConfigMinRenderTargetBuffCount;
public ushort ConfigDecoderSpecific;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D11_VIDEO_DECODER_CONFIG
Public guidConfigBitstreamEncryption As Guid
Public guidConfigMBcontrolEncryption As Guid
Public guidConfigResidDiffEncryption As Guid
Public ConfigBitstreamRaw As UInteger
Public ConfigMBcontrolRasterOrder As UInteger
Public ConfigResidDiffHost As UInteger
Public ConfigSpatialResid8 As UInteger
Public ConfigResid8Subtraction As UInteger
Public ConfigSpatialHost8or9Clipping As UInteger
Public ConfigSpatialResidInterleaved As UInteger
Public ConfigIntraResidUnsigned As UInteger
Public ConfigResidDiffAccelerator As UInteger
Public ConfigHostInverseScan As UInteger
Public ConfigSpecificIDCT As UInteger
Public Config4GroupedCoefs As UInteger
Public ConfigMinRenderTargetBuffCount As UShort
Public ConfigDecoderSpecific As UShort
End Structureimport ctypes
from ctypes import wintypes
class D3D11_VIDEO_DECODER_CONFIG(ctypes.Structure):
_fields_ = [
("guidConfigBitstreamEncryption", GUID),
("guidConfigMBcontrolEncryption", GUID),
("guidConfigResidDiffEncryption", GUID),
("ConfigBitstreamRaw", wintypes.DWORD),
("ConfigMBcontrolRasterOrder", wintypes.DWORD),
("ConfigResidDiffHost", wintypes.DWORD),
("ConfigSpatialResid8", wintypes.DWORD),
("ConfigResid8Subtraction", wintypes.DWORD),
("ConfigSpatialHost8or9Clipping", wintypes.DWORD),
("ConfigSpatialResidInterleaved", wintypes.DWORD),
("ConfigIntraResidUnsigned", wintypes.DWORD),
("ConfigResidDiffAccelerator", wintypes.DWORD),
("ConfigHostInverseScan", wintypes.DWORD),
("ConfigSpecificIDCT", wintypes.DWORD),
("Config4GroupedCoefs", wintypes.DWORD),
("ConfigMinRenderTargetBuffCount", ctypes.c_ushort),
("ConfigDecoderSpecific", ctypes.c_ushort),
]#[repr(C)]
pub struct D3D11_VIDEO_DECODER_CONFIG {
pub guidConfigBitstreamEncryption: GUID,
pub guidConfigMBcontrolEncryption: GUID,
pub guidConfigResidDiffEncryption: GUID,
pub ConfigBitstreamRaw: u32,
pub ConfigMBcontrolRasterOrder: u32,
pub ConfigResidDiffHost: u32,
pub ConfigSpatialResid8: u32,
pub ConfigResid8Subtraction: u32,
pub ConfigSpatialHost8or9Clipping: u32,
pub ConfigSpatialResidInterleaved: u32,
pub ConfigIntraResidUnsigned: u32,
pub ConfigResidDiffAccelerator: u32,
pub ConfigHostInverseScan: u32,
pub ConfigSpecificIDCT: u32,
pub Config4GroupedCoefs: u32,
pub ConfigMinRenderTargetBuffCount: u16,
pub ConfigDecoderSpecific: u16,
}import "golang.org/x/sys/windows"
type D3D11_VIDEO_DECODER_CONFIG struct {
guidConfigBitstreamEncryption windows.GUID
guidConfigMBcontrolEncryption windows.GUID
guidConfigResidDiffEncryption windows.GUID
ConfigBitstreamRaw uint32
ConfigMBcontrolRasterOrder uint32
ConfigResidDiffHost uint32
ConfigSpatialResid8 uint32
ConfigResid8Subtraction uint32
ConfigSpatialHost8or9Clipping uint32
ConfigSpatialResidInterleaved uint32
ConfigIntraResidUnsigned uint32
ConfigResidDiffAccelerator uint32
ConfigHostInverseScan uint32
ConfigSpecificIDCT uint32
Config4GroupedCoefs uint32
ConfigMinRenderTargetBuffCount uint16
ConfigDecoderSpecific uint16
}type
D3D11_VIDEO_DECODER_CONFIG = record
guidConfigBitstreamEncryption: TGUID;
guidConfigMBcontrolEncryption: TGUID;
guidConfigResidDiffEncryption: TGUID;
ConfigBitstreamRaw: DWORD;
ConfigMBcontrolRasterOrder: DWORD;
ConfigResidDiffHost: DWORD;
ConfigSpatialResid8: DWORD;
ConfigResid8Subtraction: DWORD;
ConfigSpatialHost8or9Clipping: DWORD;
ConfigSpatialResidInterleaved: DWORD;
ConfigIntraResidUnsigned: DWORD;
ConfigResidDiffAccelerator: DWORD;
ConfigHostInverseScan: DWORD;
ConfigSpecificIDCT: DWORD;
Config4GroupedCoefs: DWORD;
ConfigMinRenderTargetBuffCount: Word;
ConfigDecoderSpecific: Word;
end;const D3D11_VIDEO_DECODER_CONFIG = extern struct {
guidConfigBitstreamEncryption: GUID,
guidConfigMBcontrolEncryption: GUID,
guidConfigResidDiffEncryption: GUID,
ConfigBitstreamRaw: u32,
ConfigMBcontrolRasterOrder: u32,
ConfigResidDiffHost: u32,
ConfigSpatialResid8: u32,
ConfigResid8Subtraction: u32,
ConfigSpatialHost8or9Clipping: u32,
ConfigSpatialResidInterleaved: u32,
ConfigIntraResidUnsigned: u32,
ConfigResidDiffAccelerator: u32,
ConfigHostInverseScan: u32,
ConfigSpecificIDCT: u32,
Config4GroupedCoefs: u32,
ConfigMinRenderTargetBuffCount: u16,
ConfigDecoderSpecific: u16,
};type
D3D11_VIDEO_DECODER_CONFIG {.bycopy.} = object
guidConfigBitstreamEncryption: GUID
guidConfigMBcontrolEncryption: GUID
guidConfigResidDiffEncryption: GUID
ConfigBitstreamRaw: uint32
ConfigMBcontrolRasterOrder: uint32
ConfigResidDiffHost: uint32
ConfigSpatialResid8: uint32
ConfigResid8Subtraction: uint32
ConfigSpatialHost8or9Clipping: uint32
ConfigSpatialResidInterleaved: uint32
ConfigIntraResidUnsigned: uint32
ConfigResidDiffAccelerator: uint32
ConfigHostInverseScan: uint32
ConfigSpecificIDCT: uint32
Config4GroupedCoefs: uint32
ConfigMinRenderTargetBuffCount: uint16
ConfigDecoderSpecific: uint16struct D3D11_VIDEO_DECODER_CONFIG
{
GUID guidConfigBitstreamEncryption;
GUID guidConfigMBcontrolEncryption;
GUID guidConfigResidDiffEncryption;
uint ConfigBitstreamRaw;
uint ConfigMBcontrolRasterOrder;
uint ConfigResidDiffHost;
uint ConfigSpatialResid8;
uint ConfigResid8Subtraction;
uint ConfigSpatialHost8or9Clipping;
uint ConfigSpatialResidInterleaved;
uint ConfigIntraResidUnsigned;
uint ConfigResidDiffAccelerator;
uint ConfigHostInverseScan;
uint ConfigSpecificIDCT;
uint Config4GroupedCoefs;
ushort ConfigMinRenderTargetBuffCount;
ushort ConfigDecoderSpecific;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D11_VIDEO_DECODER_CONFIG サイズ: 100 バイト(x64)
dim st, 25 ; 4byte整数×25(構造体サイズ 100 / 4 切り上げ)
; guidConfigBitstreamEncryption : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; guidConfigMBcontrolEncryption : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; guidConfigResidDiffEncryption : GUID (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; ConfigBitstreamRaw : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ConfigMBcontrolRasterOrder : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ConfigResidDiffHost : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; ConfigSpatialResid8 : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; ConfigResid8Subtraction : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ConfigSpatialHost8or9Clipping : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ConfigSpatialResidInterleaved : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; ConfigIntraResidUnsigned : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; ConfigResidDiffAccelerator : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; ConfigHostInverseScan : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ConfigSpecificIDCT : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; Config4GroupedCoefs : DWORD (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; ConfigMinRenderTargetBuffCount : WORD (+96, 2byte) wpoke st,96,値 / 値 = wpeek(st,96)
; ConfigDecoderSpecific : WORD (+98, 2byte) wpoke st,98,値 / 値 = wpeek(st,98)
; ※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 D3D11_VIDEO_DECODER_CONFIG
#field GUID guidConfigBitstreamEncryption
#field GUID guidConfigMBcontrolEncryption
#field GUID guidConfigResidDiffEncryption
#field int ConfigBitstreamRaw
#field int ConfigMBcontrolRasterOrder
#field int ConfigResidDiffHost
#field int ConfigSpatialResid8
#field int ConfigResid8Subtraction
#field int ConfigSpatialHost8or9Clipping
#field int ConfigSpatialResidInterleaved
#field int ConfigIntraResidUnsigned
#field int ConfigResidDiffAccelerator
#field int ConfigHostInverseScan
#field int ConfigSpecificIDCT
#field int Config4GroupedCoefs
#field short ConfigMinRenderTargetBuffCount
#field short ConfigDecoderSpecific
#endstruct
stdim st, D3D11_VIDEO_DECODER_CONFIG ; NSTRUCT 変数を確保
st->ConfigBitstreamRaw = 100
mes "ConfigBitstreamRaw=" + st->ConfigBitstreamRaw