ID3D11VideoContext::VideoProcessorSetStreamPixelAspectRatio method (d3d11.h)

Sets the pixel aspect ratio for an input stream on the video processor.

Syntax

void VideoProcessorSetStreamPixelAspectRatio(
  [in] ID3D11VideoProcessor *pVideoProcessor,
  [in] UINT                 StreamIndex,
  [in] BOOL                 Enable,
  [in] const DXGI_RATIONAL  *pSourceAspectRatio,
  [in] const DXGI_RATIONAL  *pDestinationAspectRatio
);

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 the pSourceAspectRatio and pDestinationAspectRatio parameters contain valid values. Otherwise, the pixel aspect ratios are unspecified.

[in] pSourceAspectRatio

A pointer to a DXGI_RATIONAL structure that contains the pixel aspect ratio of the source rectangle. If Enable is FALSE, this parameter can be NULL.

[in] pDestinationAspectRatio

A pointer to a DXGI_RATIONAL structure that contains the pixel aspect ratio of the destination rectangle. If Enable is FALSE, this parameter can be NULL.

Return value

None

Remarks

This function can only be called if the driver reports the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO capability. If this capability is not set, this function will have no effect.

Pixel aspect ratios of the form 0/n and n/0 are not valid.

The default pixel aspect ratio is 1:1 (square pixels).

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

Picture Aspect Ratio