ID3D11VideoContext::VideoProcessorSetStreamStereoFormat method (d3d11.h)

Enables or disables stereo 3D video for an input stream on the video processor. In addition, this method specifies the layout of the video frames in memory.

Syntax

void VideoProcessorSetStreamStereoFormat(
  [in] ID3D11VideoProcessor                   *pVideoProcessor,
  [in] UINT                                   StreamIndex,
  [in] BOOL                                   Enable,
  [in] D3D11_VIDEO_PROCESSOR_STEREO_FORMAT    Format,
  [in] BOOL                                   LeftViewFrame0,
  [in] BOOL                                   BaseViewFrame0,
  [in] D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode,
  [in] int                                    MonoOffset
);

Parameters

[in] pVideoProcessor

A pointer to the ID3D11VideoProcessor interface. To get this pointer, call ID3D11VideoDevice::CreateVideoProcessor.

[in] StreamIndex

The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.

[in] Enable

Specifies whether stereo 3D is enabled for this stream. If the value is FALSE, the remaining parameters of this method are ignored.

[in] Format

Specifies the layout of the two stereo views in memory, as a D3D11_VIDEO_PROCESSOR_STEREO_FORMAT value.

[in] LeftViewFrame0

If TRUE, frame 0 contains the left view. Otherwise, frame 0 contains the right view.

This parameter is ignored for the following stereo formats:

  • D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO
  • D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET

[in] BaseViewFrame0

If TRUE, frame 0 contains the base view. Otherwise, frame 1 contains the base view.

This parameter is ignored for the following stereo formats:

  • D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO
  • D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET
  • When D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE is used and the application wants to convert the stereo data to mono, it can either:
    • Specify the base view as a mono input.
    • Specify both resources and allow the driver to do the conversion from the base view. In this case, D3D11_VIDEO_PROCESSOR_STREAM.hInputSurface is considered frame 0 and D3D11_VIDEO_PROCESSOR_STREAM.hInputSurfaceRight is considered frame 1.

[in] FlipMode

A flag from the D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE enumeration, specifying whether one of the views is flipped.

[in] MonoOffset

For D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET format, this parameter specifies how to generate the left and right views:

  • If MonoOffset is positive, the right view is shifted to the right by that many pixels, and the left view is shifted to the left by the same amount.
  • If MonoOffset is negative, the right view is shifted to the left by that many pixels, and the left view is shifted to right by the same amount.
If Format is not D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET, this parameter must be zero.

Return value

None

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header d3d11.h

See also

ID3D11VideoContext