Microsoft DirectX 8.1 (C++)

Video and Image Functions

These functions and macros manipulate the DirectShow video format structures.

Function Description
BIT_MASKS_MATCH Compares the color masks for two VIDEOINFO structures.
BITMASKS Retrieves the color masks from a VIDEOINFO structure
COLORS Retrieves the palette entries from a VIDEOINFO structure
ContainsPalette Determines whether a specified VIDEOINFOHEADER structure contains a palette.
ConvertVideoInfoToVideoInfo2 Converts a media type that uses VIDEOINFOHEADER to one that uses VIDEOINFOHEADER2
DIBSIZE Calculates the number of bytes required by a device-independent bitmap (DIB).
GetBitCount Returns the number of bits per pixel used by a specified video subtype.
GetBitmapFormatSize Calculates the size needed for a VIDEOINFO structure that can hold a specified BITMAPINFOHEADER structure.
GetBitmapPalette Returns the first palette entry in a VIDEOINFOHEADER structure.
GetBitmapSize Calculates the number of bytes required by a device-independent bitmap (DIB).
GetBitmapSubtype Returns the media subtype GUID for the specified bitmap.
GetSubtypeName Retrieves the human-readable name of a video subtype.
GetTrueColorType Returns the media subtype GUID for a 16-bit uncompressed RGB bitmap.
HEADER Returns the address of the BITMAPINFOHEADER within a VIDEOINFOHEADER.
MPEG1_SEQUENCE_INFO Returns the address of the sequence header inside an MPEG1VIDEOINFO structure.
PALETTISED Checks whether a bitmap has a color depth of 8 bits or less.
PALETTE_ENTRIES Retrieves the maximum number of colors in the palette of a specified bitmap.
RESET_MASKS Fills the color mask fields in a VIDEOINFO structure with zeroes.
RESET_HEADER Fills a VIDEOINFOHEADER with zeroes.
RESET_PALETTE Fills the palette entries in a VIDEOINFO structure with zeroes.
SIZE_EGA_PALETTE Calculates the size needed for the palette entries in a 4-bit RGB bitmap.
SIZE_MASKS Calculates the size of the color masks in a VIDEOINFO structure.
SIZE_MPEG1VIDEOINFO Calculates the size of an MPEG1VIDEOINFO structure, including the sequence header.
SIZE_PALETTE calculates the size of the palette entries in a VIDEOINFO structure.
SIZE_PREHEADER Calculates the byte offset of the bmiHeader field within a VIDEOINFOHEADER structure.
SIZE_VIDEOHEADER Calculates the size of the VIDEOINFOHEADER structure.
TRUECOLOR Returns the TRUECOLORINFO structure from a VIDEOINFO structure.

Remarks

Most of the macros and functions described in the section are designed for manipulating VIDEOINFOHEADER and VIDEOINFO structures for RGB bitmaps. Use these macros with care: Most of them assume that the specified structure has been initialized properly. Many of them also assume that the BITMAPINFOHEADER structure is the standard size; that is, biSize == sizeof(BITMAPINFOHEADER).

The DirectShow base class library also provide the following global constants, which define the standard color masks for true-color bitmaps.

Global Data Description
bits555 Array of color masks for a 16-bit RGB bitmap in 5-5-5 format.
bits565 Array of color masks for a 16-bit RGB bitmap in 5-6-6 format.
bits888 Array of color masks for a 24-bit RGB bitmap.

Each of these constants in an array of three DWORDs.