FOURCC.org - Video Codecs and Pixel Formats

RGB pixel formats

These formats are defined below. Click on the Label/FOURCC to be taken to its definition.

Please see "Bitmap Orientation and biHeight" for important additional information. Also, if you are interested in RGB to YCrCb conversion, you may find this page helpful.

Label FOURCC in Hex Bits per pixel Description
BI_BITFIELDS 0x00000003 16,24,32 Raw RGB with arbitrary sample packing within a pixel. Packing and precision of R, G and B components is determined by bit masks for each.
BI_RGB 0x00000000 1,4,8,16,24,32 Basic Windows bitmap format. 1, 4 and 8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples.
BI_RLE4 0x00000002 4 Run length encoded 4bpp RGB image.
BI_RLE8 0x00000001 8 Run length encoded 8bpp RGB image.
raw 0x32776173 ? Apparently "raw, uncompressed RGB bitmaps" but I have no idea how many bits per pixel (uses bpp field in header?)
RGB
(BI_RGB)
0x32424752 1,4,8,16,24,32 Alias for BI_RGB
RGBA 0x41424752 16,32 Raw RGB with alpha. Sample precision and packing is arbitrary and determined using bit masks for each component, as for BI_BITFIELDS.
RGBT 0x54424752 16,32 Raw RGB with a transparency field. Layout is as for BI_RGB at 16 and 32 bits per pixel but the msb in each pixel indicates whether the pixel is transparent or not.
RLE
(BI_RLE4)
0x34454C52 4 Alias for BI_RLE4
RLE8
(BI_RLE8)
0x38454C52 8 Alias for BI_RLE8

Bayer Data Formats

Recently, a collection of "Bayer" data formats have been registered. These encode images with only a single color sample at each pixel position and are frequently used in acquisition of digital images where the image is captured through a color filter array. It is not clear to me how these formats define the layout of the filter array used but it may be fair to assume that they relate to a commonly used Bayer pattern originally developed by Kodak which has builds an image out of 2x2 blocks containing green samples in the top left and bottom right positions, red in the top right and blue in the bottom left.

Silicon Imaging's web site offers further explanation here.

Label FOURCC in Hex Bits per pixel Description
BA81 0x 8 Raw Bayer data with 8 bits per sample
BYR1 0x 8 Raw Bayer data with 8 bits per sample. May be a duplicate of BA81?
BYR2 0x 16 Raw Bayer data with 12 bit precision samples stored in 16 bit words.