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

Ultimotion Matinee Encoder

Ultimotion Matinee provides a fast video codec with an average quality range. Ultimotion Matinee objects play standard Ultimotion Matinee media files.

To learn more about using the Ultimotion Matinee decoder/encoder, see:

For introductory information, see Programming with Video Codec Objects.

File Format

Ultimotion Matinee is always embedded in the AVI file format.

Algorithm Overview

Ultimotion Matinee is a video codec designed for fast video decoding in software, with good image quality, on IBM personal computers.

Ultimotion Matinee supports two modes: a high-quality asymmetric mode and a symmetric mode. In Ultimedia Services, the Ultimotion Matinee decoder object supports both modes; the encoder object supports only the asymmetric mode.

The two most common frame sizes for Ultimotion Matinee video are 160 x 120 and 320 x 240. Both frame sizes display video with the correct aspect ratio on square-pixel monitors. Although it is possible to create 640 x 480 Ultimotion Matinee video, the decompression of such movies in software is slow.

Ultimotion Matinee uses a mixture of I frames and delta frames. An application should always start decoding at an I frame.

When using the encoder object, an application can control the decoded image quality and the compressed bit rate. The nominal Ultimotion Matinee movie is defined as 320 x 240 frames, playing at 15 frames per second and compressed to 150 kilobytes per second. Relative to input frames with 24-bit color, Ultimotion Matinee produces compression ratios of about 15:1 to over 20:1.

Generally, the quality of decoded Ultimotion Matinee video is good. The codec represents color as 14-bits per pixel, so the frames can exhibit some contouring. However, as Ultimotion Matinee adapts to the content of the frames, decoded Ultimotion Matinee video does sometimes appear better than MJPEG video.

Encoding Ultimotion Matinee Video

To encode Ultimotion Matinee video, do the following:

  1. Set up the source for the video.
  2. Create UMSAVIReadWrite and UMSUMEncoder objects.
  3. Open an AVI file for writing.
  4. Set up and write the main header to the AVI file with the filereader's put_avi_header method.
  5. Set up and write the stream header to the AVI file with the filereader's put_stream_header method.
  6. Set the size of the input frames with the encoder's set_image_size method.
  7. Call the encoder's set_subimage_size method to only encode a subimage in each frame (optional).
  8. Call the decoder's get_max_buffer_size method to get the size of the buffers for the compressed frames.
  9. Allocate memory for the input and output buffers, and insert them into SOM sequence structures.
  10. Set the desired quality factor (1 to 100) and the target size for a compressed frame, if one or both are applicable.
  11. To encode a frame with priority given to bit-rate control, call the encoder's compress_frame_seq_RC method.
  12. To encode a frame with priority given to the quality factor, call the encoder's compress_frame_seq_QF method.

When the video has been encoded, free all buffers. When the objects are no longer needed, destroy them with _somFree.

Tips for Using the Ultimotion Matinee Encoder

The following tips provide important information for using the Ultimotion Matinee encoder:

For introductory information, see Programming with Video Codec Objects.

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