Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_decompress(3) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_compress(3)

xil_cis_has_frame(3)

xil_cis_put_bits(3)

xil_cis_put_bits_ptr(3)

xil_cis_get_output_type(3)

xil_decompress(3)

NAME

xil_decompress − decompress an image from a compressed image sequence

SYNOPSIS

#include <xil/xil.h>

void xil_decompress ( XilCis cis,

XilImage dst);

DESCRIPTION

This function decompresses the current read frame in a compressed image sequence (CIS) and puts its output into an image object.  It also increments the CIS’s current read frame.  cis is the input compressed image sequence.  dst is the output XilImage.  If the function is successful, an image from the CIS will be decompressed into the destination. 

The XIL library supports a number of compression formats, including CCITT G3/G4, JPEG, MPEG-1, H.261, Cell, and CellB. 

ROI Behavior

If the destination image has had an ROI set on it (with xil_set_roi(3)) the ROI functions as a "write mask" for the destination image.  Note that, in general, decompression to destination images with ROIs will not be accelerated by decompression molecules or by device-specific acceleration libraries. 

Origin Behavior

Images stored in a CIS inherently have origins of (0.0,0.0).  If a CIS image is decompressed into an image with a non-zero origin, the normal origin handling procedures will be invoked. See xil_set_origin(3) for more detail. 

XIL Decompressors

The XIL library provides the functions necessary to decompress an image or sequence of images from a CIS. The compressed data may have been stored into the CIS either by using calls to xil_compress(3) or by inserting data into the CIS with xil_cis_put_bits(3) or xil_cis_put_bits_ptr(3).  A standard XIL decompressor provides functions to:

Decompress data from a single frame of a CIS to an XilImage. 

Provide a pointer to compressed data in a CIS. This can be used by applications to write the data out to a file, for example. 

Seek to a new position in a CIS. 

Determine the number of frames remaining in the CIS. 

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

Decompress the current read frame of a compressed image sequence:

XilCis cis;
XilImage dst;
XilImageType type;
XilSystemState State;
type = xil_cis_get_output_type(cis);
dst = xil_create_from_type(State, type);
while (xil_cis_has_frame(cis))
   xil_decompress(cis, dst);

NOTES

The data type and number of bands of the destination image must match the attributes of the images that are stored in the compressed image sequence.  Use xil_cis_get_output_type(3) to get a CIS’s image type. It is, however, permissible to decompress from a CIS into an image with larger or smaller dimensions than that of the CIS frame. In that case, the origins will be aligned and clipping calculations performed to find the intersected region. 

SEE ALSO

xil_compress(3), xil_cis_has_frame(3), xil_cis_put_bits(3), xil_cis_put_bits_ptr(3), xil_cis_get_output_type(3). 

SunOS 5.6  —  Last change: 09 June 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026