DXVA_DeinterlaceContainerDeviceClass::DeinterlaceQueryAvailableModes method

The sample DeinterlaceQueryAvailableModes function queries for available deinterlacing or frame-rate conversion modes for a particular input video format.

Syntax

HRESULT DeinterlaceQueryAvailableModes(
  [in]      LPDXVA_VideoDesc lpVideoDescription,
  [in, out] LPDWORD          lpdwNumModesSupported,
  [in, out] LPGUID           pGuidsDeinterlaceModes
);

Parameters

lpVideoDescription [in] Supplies a pointer to a DXVA_VideoDesc structure that contains a description of the video stream for the deinterlacing or frame-rate conversion to be performed.

lpdwNumModesSupported [in, out] Receives a pointer to the number of deinterlace or frame-rate conversion modes that are returned in the array at pGuidsDeinterlaceModes.

pGuidsDeinterlaceModes [in, out] Receives a pointer to an array of GUIDs that represent the deinterlace or frame-rate conversion modes that are supported by the driver.

Return value

Returns zero (S_OK or DD_OK) if successful; otherwise, returns an error code. Refer to ddraw.h for a complete list of error codes.

Remarks

The lpVideoDescription parameter is passed to the driver so that the driver can support the resolution and format of the source video. For example, the driver might be able to perform a three-field adaptive deinterlace of 480i content, but it might only be able to bob 1080i content. For more information, see Video Content for Deinterlace and Frame-Rate Conversion.

The GUIDs returned by the pGuidsDeinterlaceModes parameter should be returned in order of descending quality (that is, the highest quality mode should occupy the first element of the GUID array returned).

All drivers should be able to support the bob mode using the existing bit-block transfer (blt) hardware. For more information about modes, see the Deinterlace Modes and Frame-Rate Conversion Modes topics.

The driver returns the GUIDs (modes) that it supports in response to a request from the VMR. The driver responds to a call to its DdMoCompRender callback function. The driver returns the GUIDs through the lpOutputData member of the DD_RENDERMOCOMPDATA structure to which the lpRenderData parameter of DdMoCompRender points. The lpOutputData member points to the DXVA_DeinterlaceQueryAvailableModes structure, which contains the array of GUIDs in the Guids member.

Mapping RenderMoComp to DeinterlaceQueryAvailableModes

The sample DeinterlaceQueryAvailableModes function maps directly to a call to the RenderMoComp member of the DD_MOTIONCOMPCALLBACKS structure. The RenderMoComp member points to a display driver-supplied function that references the DD_RENDERMOCOMPDATA structure.

The RenderMoComp callback is called without the display driver-supplied BeginMoCompFrame or EndMoCompFrame function being called first.

The DD_RENDERMOCOMPDATA structure is filled as follows.

Member Value

dwNumBuffers

Zero.

lpBufferInfo

NULL.

dwFunction

DXVA_DeinterlaceQueryAvailableModesFnCode constant (defined in dxva.h).

lpInputData

Pointer to a filled DXVA_VideoDesc structure.

lpOutputData

Pointer to a DXVA_DeinterlaceQueryAvailableModes structure.

After the VMR has determined the deinterlace or frame conversion modes available for a particular video format, the VMR queries the driver to obtain detailed information about the input requirements of a particular deinterlace mode and any additional video processing that might be supported on that mode. The driver returns this information from a call to its DeinterlaceQueryModeCaps function.

See also

DD_MOTIONCOMPCALLBACKS

DD_RENDERMOCOMPDATA

DeinterlaceQueryModeCaps

DXVA_VideoDesc

DXVA_SampleFormat