Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MFGetStrideForBitmapInfoHeader
Collapse the table of content
Expand the table of content

MFGetStrideForBitmapInfoHeader function

Calculates the minimum surface stride for a video format.

Syntax


HRESULT MFGetStrideForBitmapInfoHeader(
  _In_  DWORD format,
  _In_  DWORD dwWidth,
  _Out_ LONG  *pStride
);

Parameters

format [in]

FOURCC code or D3DFORMAT value that specifies the video format. If you have a video subtype GUID, you can use the first DWORD of the subtype.

dwWidth [in]

Width of the image, in pixels.

pStride [out]

Receives the minimum surface stride, in pixels.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This function calculates the minimum stride needed to hold the image in memory. Use this function if you are allocating buffers in system memory. Surfaces allocated in video memory might require a larger stride, depending on the graphics card.

If you are working with a DirectX surface buffer, use the IMF2DBuffer::Lock2D method to find the surface stride.

For planar YUV formats, this function returns the stride for the Y plane. Depending on the format, the chroma planes might have a different stride.

Note  Prior to Windows 7, this function was exported from evr.dll. Starting in Windows 7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows 7.
 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfapi.h

Library

Evr.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
Image Stride

 

 

Community Additions

ADD
Show:
© 2015 Microsoft