DXVAHDDDI_STREAM_DATA - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// d3dumddi.h

typedef struct _DXVAHDDDI_STREAM_DATA {
  [in] BOOL              Enable;
  [in] UINT              OutputIndex;
  [in] UINT              InputFrameOrField;
  [in] UINT              PastFrames;
  [in] UINT              FutureFrames;
  [in] DXVAHDDDI_SURFACE *pPastSurfaces;
  [in] DXVAHDDDI_SURFACE InputSurface;
  [in] DXVAHDDDI_SURFACE *pFutureSurfaces;
} DXVAHDDDI_STREAM_DATA;
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-d3dumddi-_dxvahdddi_stream_data)

_DXVAHDDDI_STREAM_DATA structure

Description

The DXVAHDDDI_STREAM_DATA structure describes an input stream that is processed.

Members

Enable [in]

A Boolean value that specifies whether the input stream is enabled. The number of input streams that the runtime enables must not be more than the number, which the driver sets in the MaxStreamStates member of the DXVAHDDDI_VPDEVCAPS structure.

OutputIndex [in]

A zero-based cyclic frame index number of the output frames that are composed.

InputFrameOrField [in]

A zero-based frame number of the input frames or fields that are processed.

PastFrames [in]

The number of past reference frames. This number must not be more than the number that the driver sets in the PastFrames member of the DXVAHDDDI_VPCAPS structure.

FutureFrames [in]

The number of future reference frames. This number must not be more than the number that the driver sets in the FutureFrames member of the DXVAHDDDI_VPCAPS structure.

pPastSurfaces [in]

An array of DXVAHDDDI_SURFACE structures that describe the past reference surfaces.

InputSurface [in]

A DXVAHDDDI_SURFACE structure that describes the input surface.

pFutureSurfaces [in]

An array of DXVAHDDDI_SURFACE structures that describe the future reference surfaces.

Remarks

The driver must allocate the surfaces that the pPastSurfaces, InputSurface, and pFutureSurfaces members specify in the pool type, which the driver sets in the InputPool member of the DXVAHDDDI_VPDEVCAPS structure, and with one of the following surface types; otherwise, the driver's VideoProcessBltHD function returns an error.

The OutputIndex member is a zero-based cyclic number that indicates the frame index number of the output. The driver uses this output-index information to perform the video processing in a certain pattern or cycle, especially when the driver performs deinterlacing, frame-rate conversion, and inverse telecine. For example, with the following output-index pattern, the driver performs the indicated video processing:

The InputFrameOrField member is a zero-based number that indicates the frame or the field number of the input surface. For example, with the following input-frame-or-field number, the driver can perform the indicated video processing:

The application should cause both the OutputIndex and InputFrameOrField members to reset when either the frame format or the output rate is changed so that the driver can reset its internal processing state. For more information about changing frame format or output rate, see DXVAHDDDI_STREAM_STATE_FRAME_FORMAT_DATA and DXVAHDDDI_STREAM_STATE_OUTPUT_RATE_DATA.

However, if the driver switches between normal and half rate (values from the DXVAHDDDI_OUTPUT_RATE enumeration), the driver should not require the reset.

If both the OutputIndex and InputFrameOrField members remain unchanged at the next process time, the driver determines that the frame is unchanged (for example, paused) in the stream processing. Therefore, the driver can optimize the frame by using cached data.

The driver should fallback to a less intensive video processing method as less reference frames are provided. The driver should fallback to Bob de-interlacing when no reference samples are provided.

An application can provide less past and future reference frames than the reference frames that the driver requests. For example, an application can provide less reference frames in the following conditions:

Both the past and the future reference frames are provided in the pPastSurfaces and pFutureSurfaces array members in temporal order from older to newer frames continuously. For example, the order of the elements in the arrays are as shown in the following example:

pPastSurfaces [] = {..., T-3, T-2, T-1}

InputSurface = T

pFutureSurfaces [] = {T+1, T+2, T+3,...}

The input and reference frames change location from the future location to the past location through the current location as the OutputIndex and InputFrameOrField members increment. For example, the input surface changes as the OutputIndex and InputFrameOrField increment when the driver performs the following video processing:

The following pseudo-code example shows the interaction between the application (APP) and the driver (DRV) while performing Inverse Telecine (IVTC) on 3:2 pull-down, 30 frames (60 fields) per second interlaced content:

-[60i -> 60p]
DRV: VPGuid[0] requests 1 past and 2 future reference frames.
APP: Creates VPGuid[0] video processor and set output rate to normal.
APP: Decodes frame 0(A0:A1), 1(A0:B1), 2(B0:C1), 3(C0:C1), 4(D0:D1), ...
    :
-APP: VPBltHD(frame x, 0, 1, 2), InputFrameOrField=0, OutputIndex=0
DRV: Bob [0(A0)+0(A1)] = A'
-APP: VPBltHD(frame x, 0, 1, 2), InputFrameOrField=1, OutputIndex=1
DRV: Weave [0(A1)+1(A0)] = A
-APP: VPBltHD(frame 0, 1, 2, 3), InputFrameOrField=2, OutputIndex=0
DRV: Weave [1(A0)+0(A1)] = A
-APP: VPBltHD(frame 0, 1, 2, 3), InputFrameOrField=3, OutputIndex=1
DRV: Weave [1(B1)+2(B0)] = B
-APP: VPBltHD(frame 1, 2, 3, 4), InputFrameOrField=4, OutputIndex=0
DRV: Weave [2(B0)+1(B1)] = B
-APP: VPBltHD(frame 1, 2, 3, 4), InputFrameOrField=5, OutputIndex=1
DRV: Weave [2(C1)+3(C0)] = C
-APP: VPBltHD(frame 2, 3, 4, 5), InputFrameOrField=6, OutputIndex=0
DRV: Weave [3(C0)+3(C1)] = C
-APP: VPBltHD(frame 2, 3, 4, 5), InputFrameOrField=7, OutputIndex=1
DRV: Weave [3(C1)+3(C0)] = C
-APP: VPBltHD(frame 3, 4, 5, 6), InputFrameOrField=8, OutputIndex=0
DRV: Weave [4(D0)+4(D1)] = D
-APP: VPBltHD(frame 3, 4, 5, 6), InputFrameOrField=9, OutputIndex=1
DRV: Weave [4(D1)+4(D0)] = D
    :
-[60i -> 24p]
DRV: VPGuid[1] requests 4 future reference frames.
DRV: Exports CustomRate=4/5, OutputFrames=4, InputInterlaced=TRUE, InputFramesOrFields=10.
APP: Creates VPGuid[1] video processor and set output rate to 4/5 custom rate.
-APP: VPBltHD(frame 0, 1, 2, 3, 4), InputFrameOrField=0, OutputIndex=0
DRV: Bob [0(A0)+0(A1)] = A' (playback or speed mode) or Weave [0(A0)+0(A1)] = A (quality mode)
-APP: VPBltHD(frame 0, 1, 2, 3, 4), InputFrameOrField=0, OutputIndex=1
DRV: Weave [1(B1)+2(B0)] = B
-APP: VPBltHD(frame 0, 1, 2, 3, 4), InputFrameOrField=0, OutputIndex=2
DRV: Weave [3(C0)+3(C1)] = C
-APP: VPBltHD(frame 0, 1, 2, 3, 4), InputFrameOrField=0, OutputIndex=3
DRV: Weave [4(D0)+4(D1)] = D
-APP: VPBltHD(frame 5, 6, 7, 8, 9), InputFrameOrField=10, OutputIndex=0
DRV: Weave [0(A0)+0(A1)] = A
    :

See also

DXVAHDDDI_OUTPUT_RATE

DXVAHDDDI_STREAM_STATE_FRAME_FORMAT_DATA

DXVAHDDDI_STREAM_STATE_OUTPUT_RATE_DATA

DXVAHDDDI_SURFACE

DXVAHDDDI_VPCAPS

DXVAHDDDI_VPDEVCAPS

VideoProcessBltHD