The Wxutil.h header file in the DirectShow base classes provides functions and macros to help convert between VIDEOINFOHEADER and BITMAPINFO structures.
Function | Description |
BIT_MASKS_MATCH | Compares the masks of two video images. |
BITMASKS | Retrieves a pointer to the array of bitmasks for the specified VIDEOINFOHEADER structure. |
COLORS | Retrieves a pointer to an array of RGBQUAD structures that describes the color palette for the specified VIDEOINFOHEADER structure. |
ContainsPalette | Checks if the video image cotnains a color palette. |
DIBSIZE | Calculates the byte size of the specified bitmap |
GetBitCount | Finds the number of bits per pixel. |
GetBitmapFormatSize | Finds the size (in bytes) needed to build a VIDEOINFOHEADER structure and related data. |
GetBitmapPalette | Finds the first palette entry in a VIDEOINFOHEADER structure. |
GetBitmapSize | Finds the size (in bytes) needed to hold an image. |
GetBitmapSubtype | Finds the GUID subtype for a given bitmap info header structure. |
GetSubtypeName | Finds the (debug) name for a given GUID subtype. |
GetTrueColorType | Finds the GUID subtype for a given bitmap header. |
HEADER | Retrieves a pointer to the image data from the specified video image. |
MPEG1_SEQUENCE_INFO | Retrieves the sequence header for the specified MPEG-1 video image. |
PALETTISED | Checks if the video image's color palette is 8-bit or less. |
PALETTE_ENTRIES | Returns the number of colors in the video image's palette. |
RESET_MASKS | Clears the specified video image's bitmasks. |
RESET_HEADER | Clears the specified video image. |
RESET_PALETTE | Clears the specified video image's color palette. |
SIZE_EGA_PALETTE | Calculates the size of the EGA (4-bit) color palette. |
SIZE_MASKS | Calculates the size of the mask's color palette. |
SIZE_MPEG1VIDEOINFO | Calculates the size of the specified MPEG-1 video image. |
SIZE_PALETTE | Calculates the size of the 8-bit color palette. |
SIZE_PREHEADER | Calculates the byte offset for the video image's bitmap information. |
SIZE_VIDEOHEADER | Calculates the size of the video image. |
TRUECOLORINFO | Retrieves a pointer to an array of TRUECOLORINFO structures that describes the bitmasks and color palette for the specified VIDEOINFOHEADER structure. |
These functions are made available to help manage VIDEOINFOHEADER structures, which are used throughout DirectShow™ to describe video data streams. Although similar to the BITMAPINFO structure used in Microsoft® Win32® and existing multimedia, VIDEOINFOHEADER also adds some new video-specific fields.
Global Data | Description |
bits555 | Array of color bitmasks for an RGB 555 bitmap. |
bits565 | Array of color bitmasks for an RGB 565 bitmap. |
bits888 | Array of color bitmasks for an RGB 24-bit bitmap. |
Retrieves the bitmasks for the specified video image.
BIT_MASKS_MATCH(
pbmi1,
pbmi2
)
Returns nonzero if the bitmasks for both video images are identical or zero otherwise.
Retrieves the bitmasks for the specified video image.
BITMASKS(
pbmi
)
Returns a pointer to the array of bitmasks for the specified VIDEOINFOHEADER structure.
Retrieves the color palette for the specified video image.
COLORS(
pbmi
)
Returns a pointer to an array of RGBQUAD structures that describes the color palette for the specified VIDEOINFOHEADER structure.
Checks if the specified video image contains a color palette.
BOOL ContainsPalette(
const VIDEOINFOHEADER *pVideoInfo
);
Returns TRUE if the VIDEOINFOHEADER structure contains a color palette or FALSE otherwise.
Calculates the byte size of the specified bitmap.
DIBSIZE(
bi
)
Returns the byte size of the bi parameter.
Finds the number of bits per pixel.
WORD GetBitCount(
const GUID *pSubtype
);
Returns the number of bits per pixel for this subtype, or USHRT_MAX if an error occurred.
Finds the size (in bytes) needed to build a VIDEOINFOHEADER structure and related data.
LONG GetBitmapFormatSize(
const BITMAPINFOHEADER *pHeader
);
Returns the number of bytes for the VIDEOINFOHEADER structure described by this BITMAPINFOHEADER, including prefix information, the BITMAPINFOHEADER field, and any other color information on the end.
Finds the first palette for a VIDEOINFOHEADER structure.
const RGBQUAD * GetBitmapPalette(
const VIDEOINFOHEADER *pVideoInfo
);
Returns a pointer to the first entry in a palette.
Finds the number of bytes needed to hold an image.
DWORD GetBitmapSize(
const BITMAPINFOHEADER *pHeader
);
Returns the number of bytes needed to hold an image.
Finds the subtype for the specified bitmap.
const GUID GetBitmapSubtype(
const BITMAPINFOHEADER *pHeader
);
Returns the video subtype GUID of the bitmap specified by pHeader, or GUID_NULL if pHeader is NULL.
Retrieves the name for a given GUID subtype.
TCHAR * GetSubtypeName(
const GUID *pSubtype
);
Returns the debug name of this GUID, or UNKNOWN if the name is not known.
Finds the subtype for the specified 16-bit color bitmap.
const GUID GetTrueColorType(
const BITMAPINFOHEADER *pHeader
);
Returns the video subtype GUID of the 16-bit color bitmap specified by pHeader, or GUID_NULL if pHeader is NULL.
Retrieves a pointer to the image data from the specified video image.
HEADER(
pVideoInfo
)
Returns a pointer to the Win32 BITMAPINFOHEADER structure contained in the VIDEOINFOHEADER structure's bmiHeader data member.
Retrieves the sequence header for the specified MPEG-1 video image.
MPEG1_SEQUENCE_INFO(
pv
)
Returns the bSequenceHeader data member of the specified MPEG1VIDEOINFO structure.
Checks if the video image's color palette is 8-bit or less.
PALETTISED(
pbmi
)
Returns nonzero if the video image's palette contains 256 or fewer colors, or zero otherwise.
Retrieves the number of colors in the video image's palette.
PALETTE_ENTRIES(
pbmi
)
Returns the number of colors in the video image's palette.
Clears the specified video image's bitmasks.
RESET_MASKS(
pbmi
)
No return value.
Clears the specified video image.
RESET_HEADER(
pbmi
)
No return value.
Clears the specified video image's color palette.
RESET_PALETTE(
pbmi
)
No return value.
Calculates the size of a 4-bit color palette.
SIZE_EGA_PALETTE
Returns the size, in bytes, of a 16-color palette.
Calculates the size of a bitmask's color palette.
SIZE_MASKS
Returns the size, in bytes, of a bitmap mask's color palette, which has three colors.
Calculates the size of the specified MPEG-1 video image.
SIZE_MPEG1VIDEOINFO(
pv
)
Returns the byte size of the specified MPEG1VIDEOINFO structure.
Calculates the size of the 8-bit color palette.
SIZE_PALETTE
Returns the size of the 256-color palette.
Calculates the byte offset for the video image's bitmap information.
SIZE_PREHEADER
Returns the byte offset of the VIDEOINFOHEADER structure's bmiHeader data member.
Calculates the size of the video image.
SIZE_VIDEOHEADER
Returns the combined size of all of the VIDEOINFOHEADER structure's data members.
Retrieves the color palette and bitmasks for the specified video image.
TRUECOLORINFO(
pbmi
)
Returns a pointer to an array of TRUECOLORINFO structures that describes the bitmasks and color palette for the specified VIDEOINFOHEADER structure.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.