[ Previous | Next | Contents | Glossary | Home | Search ]
Ultimedia Services Version 2 for AIX: Programmer's Guide and Reference

Concepts Common to Video Objects

To learn more about the common features of all video objects, see:

For introductory information, see Programming with Video Codec Objects.

Image Formats

Common image formats include grayscale, RGB, StaticColor, and YUV.

Grayscale Formats

Grayscale formats include:

Grayscale1HL Pixel format: grayscale, 1 bit per pixel (black and white), 8 pixels per byte. Pixel scan: raster scan, left to right, top to bottom. Within a byte, the display order is bit 7 to bit 0, left to right (HL = High to Low). X11 display class: StaticGray/GrayScale.
Grayscale1LH Same as Grayscale1HL, but the display order within a byte is bit 0 to bit 7, left to right (LH = Low to High).
Grayscale4HL Pixel format: grayscale, 4 bits per pixel, 2 pixels per byte. Pixel scan: raster scan, left to right, top to bottom. Within a byte, the display order is bits 7-4, then bits 3-0, left to right (HL = High to Low). X11 display class: StaticGray/GrayScale.
Grayscale4LH Same as Grayscale4HL, but the display order within a byte is bits 3-0, then bits 7-4, left to right (LH = Low to High).
Grayscale8 Pixel format: grayscale, 8 bits per pixel. Pixel scan: raster scan, left to right, top to bottom. X11 display class: StaticGray/GrayScale.
Mono This is the same as Grayscale8.

RGB Formats: 8-bit

RGB formats with 8-bits per pixel include:

RGB8Dither Pixel format: colormap, 8 bits per pixel. Pixel scan: raster scan, left to right, top to bottom. X11 display class: PseudoColor.
Note: In this format, the format of the pixels and the colormap depend on the object defining the colormap.
RGB8BIT This is the same as RGB8Dither.
RGB8Mask332 This is similar to RGB8Dither, but it uses a specific colormap and pixel format. Pixel format: 8 bits per pixel, 3 bits red (bits 7-5), 3 bits green (bits 4-2), 2 bits blue (bits 1-0).

RGB Formats: 24-bit

RGB formats with 24-bits per pixel include:

PadRGB24 Pixel format: 32 bits per pixel, 8 bits pad (zero), 8 bits red, 8 bits green, 8 bits blue. Pixel scan: raster scan, left to right, top to bottom. X11 display class: TrueColor/DirectColor with pad to 32 bits per pixel.
RGBPad24 Pixel format: 32 bits per pixel, 8 bits red, 8 bits green, 8 bits blue, 8 bits pad (zero). Pixel scan: raster scan, left to right, top to bottom. X11 display class: TrueColor/DirectColor with pad to 32 bits per pixel.
RGBPacked24 Pixel format: 24 bits per pixel, 8 bits red, 8 bits green, 8 bits blue. Pixel scan: raster scan, left to right, top to bottom.
RGB24 This is the same as PadRGB24.
RGB24BIT This is the same as PadRGB24.
RGB24Plane This consists of 3 consecutive raster scans, one per component--for red, green, and blue, in that order. Each scan is left to right, top to bottom, and has 8 bits per pixel.
RGB This is the same as RGB24Plane.
PadBGR24Reverse Pixel format: 32 bits per pixel, 8 bits pad (zero), 8 bits blue, 8 bits green, 8 bits red. Pixel scan: raster scan, left to right, bottom to top.
BGR24Reverse This is the same as PadBGR24Reverse.
PadBGR24 Pixel format: 32 bits per pixel, 8 bits pad (zero), 8 bits, blue, 8 bits green, 8 bits red. Pixel scan: raster scan, left to right, top to bottom.

StaticColor Formats

StaticColor formats include:

StaticColor8 Similar to RGB8Dither, but with a read-only colormap. Pixel format: colormap, 8 bits per pixel. Pixel scan: raster scan, left to right, top to bottom. X11 display class: StaticColor.
StaticColor4HL Similar to StaticColor8, but with a depth of 4. Pixel format: 4 bits per pixel, 2 pixels per byte. Pixel scan: raster scan, left to right, top to bottom. Within a byte, the display order is bits 7-4, then bits 3-0, left to right (HL = High to Low). X11 display class: StaticColor
StaticColor4LH Same as StaticColor4HL, but the display order within a byte is bits 3-0, then bits 7-4, left to right (LH = Low to High).

YUV Formats

YUV formats include:

YUV420Plane This consists of 3 consecutive raster scans, one per component--for Y, U, and V, in that order. Each scan is left to right, top to bottom, and has 8 bits per pixel. The U and V planes are subsampled by 2 in each direction, so that each 2x2 area of pixels is represented by a 2x2 square of Y values, one U value, and one V value.
YUVPlanar Used in some encoders. It is the same as YUV420Plane.
YUV422 In this format, the U and V components are subsampled by 2 horizontally, and interleaved with the Y component. Pixel format: 2 pixels per 4 bytes, 8 bits Y1, 8 bits U, 8 bits Y2, 8 bits V. Pixel scan: raster scan of pixel pairs, left to right, top to bottom. Within a 4-byte pixel pair, Y1 represents the leftmost pixel.
YUV422_UYVY Similar to YUV422, but the pixel format is different. Pixel format: 2 pixels per 4 bytes, 8 bits U, 8 bits Y1, 8 bits V, 8 bits Y2.
YUV9 The original raster-scanned image is divided into 4x4 blocks. Each block is represented by 18 bytes--a 4x4 block of Y values, one U value, and one V value. The Y block is a raster scan--left to right, top to bottom. These 18-byte units are then arranged in a raster scan--left to right, top to bottom.
YVU9 This consists of 3 consecutive raster scans, one per component--for Y, U, and V, in that order. Each scan is left to right, top to bottom, and has 8 bits per pixel. The U and V planes are subsampled by 4 in each direction, so that each 4x4 area of pixels is represented by a 4x4 area of Y values, one U value, and one V value.

Other Formats

Other common formats include JPEG and Photo CD.

JPEG JPEG as an image format. This is really a compression format.
PCDYCC24 The Photo CD native data format.

For introductory information, see Programming with Video Codec Objects.


[ Previous | Next | Contents | Glossary | Home | Search ]