Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xil_compress(3) — Solaris 2.4 x86 SDK

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_decompress(3)

xil_cis_get_bits_ptr(3)

xil_cis_get_input_type(3)

xil_cis_create(3)

xil_cis_number_of_frames(3)

xil_cis_flush(3)

xil_compress(3)

NAME

xil_compress − compress an image and write it to a compressed image sequence

SYNOPSIS

#include <xil/xil.h>

void xil_compress ( XilImage src,

XilCis cis);

DESCRIPTION

This function compresses an image and writes the compressed data to a compressed image sequence (CIS).  If the source image is a SEQUENTIAL device image, the function may compress multiple frames during a single execution. 

src is the image (possibly a device image) containing the uncompressed data to be compressed.  cis is the compressed image sequence to which the compressed data will be written.  This object knows which compressor should be used to compress the data. 

This function appends the compressed image at the CIS’s current write_frame location, and then increments write_frame.  Note that even after the xil_compress () operation occurs, the data for that frame is not guaranteed to be gotten by an xil_cis_get_bits_ptr(3) function, nor to be detectable by an xil_cis_has_data(3) operation, until xil_cis_flush(3) is called. 

XIL Compressors

The XIL library provides the functions necessary to compress and decompress an image or sequence of images.  This compressed data is stored in an object called a compressed image sequence ( XilCis ).  A standard XIL compressor provides the following functions:

Compresses data and places it in a compressed image sequence (CIS). 
Determines how much data a CIS contains. 
Gets a pointer to compressed data in a CIS. 
Empties a CIS. 

A standard XIL decompressor provides the following functions:

Copies compressed data to a CIS. 
Tells the decompressor to use the compressed data pointed to as the compressed
data for a CIS. 
Decompresses a frame of image data from a CIS and puts it in an image object
( XilImage ). 
Locates a frame in a compressed image structure. 
Determines the number of frames between the current frame and the end of the
sequence, inclusive. 

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

ROI Behavior

This function does not support source image ROIs. 

ERRORS

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

EXAMPLES

Compress an image into a compressed image sequence:

XilImage src;
XilCis cis;
XilImageType type;
XilSystemState State;
type = xil_cis_get_input_type(cis);
src = xil_create_from_type(State, type);
/∗ generate the src image... ∗/
xil_compress( src, cis );

NOTES

The XilImageType of the source image must match the input XilImageType of the CIS.  Use xil_cis_get_input_type(3) to determine the required type. 

SEE ALSO

xil_decompress(3), xil_cis_get_bits_ptr(3), xil_cis_get_input_type(3), xil_cis_create(3), xil_cis_number_of_frames(3), xil_cis_flush(3). 

SunOS   —  Last change: 04 August 1993

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