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

UMSUMDecoder Object

The Ultimotion Matinee decoder object provides methods to decompress Ultimotion Matinee video formats. It is presented in the class library for editing and format-conversion purposes.

Note: The UMSUMDecoder object is shipped for compatibility with the Ultimedia Services Version 1.1.0 product. The function provided is redundant with the UMSUMVideoDecoder object. The UMSUMVideoDecoder object is the preferred object for decoding Ultimotion Matinee video, since it inherits methods from the UMSVideoDecoder base video decoder class.

To learn more about the UMSUMDecoder object, see:

For introductory information, see Video Codec Objects.

Enumeration Lists

To avoid name collision on defines, integer values have been captured as enumerated lists. The set of valid values from an enumerated list can vary with the application. The detailed method descriptions describe the valid or possible values for the specific use. The enumerated lists that are defined for this object are:

enum ReturnCode {
   Success, 
   Failure, 
   UnsupportedFormat, 
   UnsupportedAlgorithm, 
   OutOfRange, 
   Uninitialized, 
   OutOfMemory 
   };
enum ImageFormatOut {
   RGB8Dither, 
   YUV9, 
   RGB24, 
   Mono8, 
   BGR24Reverse 
   };

Method Descriptions

ReturnCode decompress_frame(in char *comp_frame, in char *image_frame)

Description

This method takes an encoded Ultimotion Matinee frame and produces an output image in the specified format. A working copy of the frame is maintained in the object so that the next frame can be processed as a delta frame. You should begin decompressing a sequence at an I-frame. If the frame width or height values have not been set, this method returns a status code of Uninitialized.

Arguments
in char *comp_frame Pointer to the start of the compressed frame data.
in char *image_frame Pointer to the start of the expanded image data.
Return Values

Success

Failure

Uninitialized

ReturnCode decompress_frame_only(in char *comp_frame)

Description

This method accepts an encoded Ultimotion Matinee frame and updates the internal state of the decoder. It does not produce a frame that can be used for display. It is faster than the decompress_frame method and is the minimum that must be called for each frame in order decode a sequence of frames properly.

Arguments
in char *comp_frame Pointer to the start of the compressed frame data.
Return Values

Success

Failure

Uninitialized

ReturnCode get_color_map(in char *color_map)

Description

This method enables the application to query the decoder's color map.

Arguments
in char *color_map A pointer to a reserved memory area in the application space that can be used to copy the color map from the decoder to the application. The colors are formatted as follows:
Overlay : Red : Green : Blue Entry 0
Overlay : Red : Green : Blue Entry 1
Overlay : Red : Green : Blue Entry Size - 1

where each entry is a 32-bit record containing 8-bit color lookup values.

Return Values

Success

Failure

ReturnCode get_colormap_attributes(out long colormap_base_index, out long colormap_size)

Description

This method gets the attributes for the color map used by the decoder to create the image frame.

Arguments
out long colormap_base_index The base address of the Ultimotion Matinee color map in the output window's color map.
out long colormap_size The length of the color map.
Return Values

Success

ImageFormatOut get_image_format()

Description

This method enables the application to query the output image format. The return value specifies the current setting of the output image format.

Return Values

Any of the ImageFormatOut values are possible.

ReturnCode get_image_size(out long width, out long height)

Description

This method enables the application to query the size of the decoded frames.

Arguments
out long width The width is returned at this location.
out long height The height is returned at this location.
Return Values

Success

ReturnCode set_image_format(in ImageFormatOut ulti_image_format)

Description

This method sets the format of the output image data to be created by the decoder. If an invalid image_format is specified, the UnsupportedFormat error code is returned.

Arguments
in ImageFormatOut ulti_image_format The possible values are those from the ImageFormatOut enumerated list.
Return Values

Success

UnsupportedFormat

ReturnCode set_image_size(in long width, in long height)

Description

This method enables the application to specify the dimensions of the input decoded frame. The size of the image to be created must match the original dimensions of the encoded image. If the dimensions of the image are not multiples of 8, a Failure status is returned. If the dimension values are less than 0 (zero) or greater than 4096, an OutOfRange status is returned. Since internal buffers are allocated as a result of this method, the status message OutOfMemory can be returned. This method should only be called at I-frame boundaries; attempts to decode a delta frame as the initial frame following this call result in incorrect image data.

Arguments
in long width Number of pixels to create in the x dimension.
in long height Number of pixels to create in the y dimension.
Return Values

Success

Failure

OutOfRange

OutOfMemory

ReturnCode set_colormap_attributes(in long colormap_base_index, in long colormap_size)

Description

This method sets up the decoder's internal color map characteristics. This method is applicable only to 8-bit dithered color output.

Arguments
in long colormap_base_index Sets the base address of the Ultimotion Matinee color map in the output window's color map. For example, if the decoder's color map is of length 64, the base address could be set anywhere between 0 and 192.
in long colormap_size Sets the length of the color map array for each color. Any value between 0 and 256 can be given; however, the object selects a suitable value that is a power of 2.
Input Size Color Map Size
0 ... 63 64
64 ... 127 64
128 ... 255 128
256 256
Return Values

Success

Failure

OutOfRange

For introductory information, see Video Codec Objects.


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