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

Indeo 3.2 Encoder

Ultimedia Services supports version 3.2 of Intel's Indeo video codec. To learn more about using the Indeo 3.2 encoder, see:

For introductory information, see Programming with Video Codec Objects.

File Format

Indeo 3.2 video is always embedded in Microsoft's AVI file format.

Algorithm Overview

The Indeo 3.2 codec is a much more advanced codec than the Indeo 2.1 codec. Indeo 3.x and Indeo 2.1 formats are incompatible.

Common frame sizes for Indeo 3.2 video are 160 x 120, 240 x 180, 320 x 240, and 640 x 480. In fact, an Indeo 3.2 encoder, such as the UMSIndeo3Encoder here, must be able to encode video with dimensions that are arbitrary multiples of 4, between 16 x 16 and 640 x 480.

Note that an Indeo 3.2 decoder decodes all files generated by Indeo 3.0 and 3.1 encoders, but an earlier version of the decoder does not decode Indeo 3.2 files. The UMSIndeo3VideoDecoder object has been updated to handle Indeo 3.2 video.

The Indeo 3.2 codec is highly asymmetric. The decoder is very fast, producing smooth video, while the encoder takes on the order of a second per frame. The actual times depend on the particular workstation used.

The UMSIndeo3Encoder object supports the RGB, YUV9, and YVU9 formats. YUV9 is Ultimedia Services' interleaved YUV format; YVU9 is Intel's planar YUV frame format, which is used with Microsoft's AVI file format.

In both Indeo 2.1 video and Indeo 3.2 video, the chrominance components U and V are subsampled by 4:1 in both directions relative to the luminance component Y. Therefore, both codecs exhibit blurriness and color smudging around the edges of objects. However, the Indeo 3.2 codec handles motion much better than the Indeo 2.1 codec.

For an Indeo 3.2 encoder with YVU9 input, the compression ratio is usually between 5:1 and 10:1.

Encoding Indeo 3.2 Video

To encode Indeo 3.2 video, do the following:

  1. Set up the source for the video.
  2. Create UMSAVIReadWrite and UMSIndeo3Encoder objects.
  3. Open an AVI file for writing, and write the necessary headers.
  4. Set the format of the input frames with the encoder's set_image_format method.
  5. Set the size of the input frames with the encoder's set_image_size method.
  6. Optionally, call the encoder's set_subimage_size method to encode only a subimage of each frame.
  7. Call the encoder's get_max_buffer_size method to get the size of the buffers for the compressed frames.
  8. Allocate memory for the input and output buffers, and insert them into SOM sequences.
  9. To compress a frame with a given quality factor, call the encoder's compress_frame_QF method.
  10. To compress a frame to within a requested maximum compressed size, call the encoder's compress_frame_RC method (RC = rate control).

When the video has been encoded, close the file, free all buffers, and destroy the objects with _somFree.

Tips for Using the Indeo 3.2 Encoder

The following tips provide important information for using the Indeo 3.2 encoder:

For introductory information, see Programming with Video Codec Objects.


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