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

DXVA_DeinterlaceCaps

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

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

フィールド

フィールドサイズx64x86説明
SizeDWORD4+0+0本構造体のバイトサイズを示す。バージョン判定に用いる。
NumPreviousOutputFramesDWORD4+4+4デインターレースに必要な過去の出力フレーム数を示す。
InputPoolDWORD4+8+8入力サーフェスを配置するメモリプールを示す。
NumForwardRefSamplesDWORD4+12+12必要な前方参照サンプルの数を示す。
NumBackwardRefSamplesDWORD4+16+16必要な後方参照サンプルの数を示す。
d3dOutputFormatD3DFORMAT4+20+20出力サーフェスのD3Dフォーマットを示す。
VideoProcessingCapsDXVA_VideoProcessCaps4+24+24対応するビデオ処理能力を示すフラグである。
DeinterlaceTechnologyDXVA_DeinterlaceTech4+28+28使用するデインターレース技術(BOB/適応等)を示す。

各言語での定義

#include <windows.h>

// DXVA_DeinterlaceCaps  (x64 32 / x86 32 バイト)
typedef struct DXVA_DeinterlaceCaps {
    DWORD Size;
    DWORD NumPreviousOutputFrames;
    DWORD InputPool;
    DWORD NumForwardRefSamples;
    DWORD NumBackwardRefSamples;
    D3DFORMAT d3dOutputFormat;
    DXVA_VideoProcessCaps VideoProcessingCaps;
    DXVA_DeinterlaceTech DeinterlaceTechnology;
} DXVA_DeinterlaceCaps;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA_DeinterlaceCaps
{
    public uint Size;
    public uint NumPreviousOutputFrames;
    public uint InputPool;
    public uint NumForwardRefSamples;
    public uint NumBackwardRefSamples;
    public uint d3dOutputFormat;
    public int VideoProcessingCaps;
    public int DeinterlaceTechnology;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA_DeinterlaceCaps
    Public Size As UInteger
    Public NumPreviousOutputFrames As UInteger
    Public InputPool As UInteger
    Public NumForwardRefSamples As UInteger
    Public NumBackwardRefSamples As UInteger
    Public d3dOutputFormat As UInteger
    Public VideoProcessingCaps As Integer
    Public DeinterlaceTechnology As Integer
End Structure
import ctypes
from ctypes import wintypes

class DXVA_DeinterlaceCaps(ctypes.Structure):
    _fields_ = [
        ("Size", wintypes.DWORD),
        ("NumPreviousOutputFrames", wintypes.DWORD),
        ("InputPool", wintypes.DWORD),
        ("NumForwardRefSamples", wintypes.DWORD),
        ("NumBackwardRefSamples", wintypes.DWORD),
        ("d3dOutputFormat", wintypes.DWORD),
        ("VideoProcessingCaps", ctypes.c_int),
        ("DeinterlaceTechnology", ctypes.c_int),
    ]
#[repr(C)]
pub struct DXVA_DeinterlaceCaps {
    pub Size: u32,
    pub NumPreviousOutputFrames: u32,
    pub InputPool: u32,
    pub NumForwardRefSamples: u32,
    pub NumBackwardRefSamples: u32,
    pub d3dOutputFormat: u32,
    pub VideoProcessingCaps: i32,
    pub DeinterlaceTechnology: i32,
}
import "golang.org/x/sys/windows"

type DXVA_DeinterlaceCaps struct {
	Size uint32
	NumPreviousOutputFrames uint32
	InputPool uint32
	NumForwardRefSamples uint32
	NumBackwardRefSamples uint32
	d3dOutputFormat uint32
	VideoProcessingCaps int32
	DeinterlaceTechnology int32
}
type
  DXVA_DeinterlaceCaps = record
    Size: DWORD;
    NumPreviousOutputFrames: DWORD;
    InputPool: DWORD;
    NumForwardRefSamples: DWORD;
    NumBackwardRefSamples: DWORD;
    d3dOutputFormat: DWORD;
    VideoProcessingCaps: Integer;
    DeinterlaceTechnology: Integer;
  end;
const DXVA_DeinterlaceCaps = extern struct {
    Size: u32,
    NumPreviousOutputFrames: u32,
    InputPool: u32,
    NumForwardRefSamples: u32,
    NumBackwardRefSamples: u32,
    d3dOutputFormat: u32,
    VideoProcessingCaps: i32,
    DeinterlaceTechnology: i32,
};
type
  DXVA_DeinterlaceCaps {.bycopy.} = object
    Size: uint32
    NumPreviousOutputFrames: uint32
    InputPool: uint32
    NumForwardRefSamples: uint32
    NumBackwardRefSamples: uint32
    d3dOutputFormat: uint32
    VideoProcessingCaps: int32
    DeinterlaceTechnology: int32
struct DXVA_DeinterlaceCaps
{
    uint Size;
    uint NumPreviousOutputFrames;
    uint InputPool;
    uint NumForwardRefSamples;
    uint NumBackwardRefSamples;
    uint d3dOutputFormat;
    int VideoProcessingCaps;
    int DeinterlaceTechnology;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVA_DeinterlaceCaps サイズ: 32 バイト(x64)
dim st, 8    ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Size : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; NumPreviousOutputFrames : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; InputPool : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; NumForwardRefSamples : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; NumBackwardRefSamples : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; d3dOutputFormat : D3DFORMAT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; VideoProcessingCaps : DXVA_VideoProcessCaps (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; DeinterlaceTechnology : DXVA_DeinterlaceTech (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DXVA_DeinterlaceCaps
    #field int Size
    #field int NumPreviousOutputFrames
    #field int InputPool
    #field int NumForwardRefSamples
    #field int NumBackwardRefSamples
    #field int d3dOutputFormat
    #field int VideoProcessingCaps
    #field int DeinterlaceTechnology
#endstruct

stdim st, DXVA_DeinterlaceCaps        ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size