Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ H261(3) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_cis_create(3)

xil_cis_get_attribute(3)

xil_cis_get_bits_ptr(3)

xil_compress(3)

xil_decompress(3)

H261(3)

NAME

H261 − H.261 decompressor for compressed image sequences

DESCRIPTION

CCITT Recommendation H.261, Video Codec for Audiovisual Services at p x 64 kbit/s, is an international standard for videophone and videoconferencing.  It describes the moving picture component of audiovisual services at the rates of p x 64 kbit/s, where p is in the range 1 to 30. 

The XIL H261 codec implements the H.261 standard without the transmission coder/decoder; i.e., the XIL bitstream does not contain any Error Correction Framing bits. 

The current release of the XIL library does not contain an implementation of an H.261 compressor.  Calls to xil_compress(3) will produce an error unless a third party H.261 compressor has been installed. 

Image Types

The H261 decompressor produces 3-band, XIL_BYTE images in the XIL library’s "ycc601" color space (The XIL image color space will not be examined or set by the H261 codec, but the codec assumes its input image has the proper color space).  The width and height of the images must be either Common Intermediate Format (CIF), which is 352 wide by 288 high, or Quarter CIF (QCIF), which is 176 wide by 144 high. 

Creating a CIS

To create an H.261 compressed image sequence (CIS), specify "H261" for the compressorname argument in xil_cis_create(3). 

Getting and Setting H261 Attributes

Use xil_cis_get_attribute(3) and xil_cis_set_attribute(3) to get and set H261 CIS attributes.  These attributes are as described in the following sections.  Refer to the example section for additional information. 

H261 Compression Attributes

The following paragraphs describe the H.261 CIS attributes available with the XIL library. All structures and enumerations are defined via xil.h.  Note that if you are setting an attribute and that attribute is a structure, you must pass the address of that structure.  If you are getting an attribute, you must always pass the address of the attribute.  If you are getting a structure attribute, you must pass a pointer to a pointer to the structure and XIL will set the pointer to the structure.  You must free the memory for this structure (using free(3C)) when it is no longer needed. 

COMPRESSOR_BITS_PER_IMAGE

Description Encode images with this number of bits per image.  This is normally bits_per_second/frames_per_second. 

Access get and set

Type Integer

Values value must be greater than or equal to 0

Default 5069 (0.2 bits/pixel at QCIF resolution)

COMPRESSOR_IMAGE_SKIP

Description Number of images that the application is skipping between encoded frames.  Controls the Temporal Reference counter in the bitstream.  (Temporal Reference is incremented by 1 + COMPRESSOR_IMAGE_SKIP)

Access get and set

Type Integer

Values 0-31

Default 0

COMPRESSOR_MV_SEARCH_RANGE

Description Set motion vector search range.  Value 15 is the maximum H.261 search range. Value 0 means that the search range is limited to the spatially corresponding block in the previous picture.  This attribute is only a suggestion and may be ignored by the compressor.  It may be used to speed up compression at the expense of compression quality. 

Access get and set

Type typedef struct {

        int x;    /∗ horizontal search limit ∗/
        int y;    /∗ vertical search limit ∗/
} XilH261MVSearchRange;

Values x: Can have a value in the range of 0-15 y: Can have a value in the range of 0-15

Default 15 for both x and y

COMPRESSOR_LOOP_FILTER

Description Allow encoder to use loop filtering.  This attribute is only a suggestion and may be ignored by the compressor.  It may be used to minimize the bitstream size (at the expense of image quality) by reducing inter-frame differences. 

Access get and set

Type Xil_boolean

Values TRUE: Loop filtering turned on FALSE: Loop filtering turned off

Default TRUE

COMPRESSOR_ENCODE_INTRA

Description Cause encoder to encode pictures in INTRA mode with coding parameters to avoid buffer overflow. (This attribute can be used by the application in response to a Fast Update signal sent via H.221). 

Access get and set

Type Xil_boolean

Values TRUE: Intra-only coding turned on FALSE: Intra-only coding turned off

Default FALSE

COMPRESSOR_FREEZE_RELEASE

Description Set the Freeze Picture Release bit in each picture in the bitstream, starting with the next compressed picture. 

Access get and set

Type Xil_boolean

Values TRUE: Set the Freeze Picture Release bit in the bitstream.  FALSE: Do not set the Freeze Picture Release bit in the bitstream. 

Default FALSE

COMPRESSOR_SPLIT_SCREEN

Description Set the Split Screen Indicator bit in each picture in the bitstream, starting with the next compressed picture. 

Access get and set

Type Xil_boolean

Values TRUE: Set the Split Screen Indicator bit in the bitstream.  FALSE: Do not set the Split Screen Indicator bit in the bitstream. 

Default FALSE

COMPRESSOR_DOC_CAMERA

Description Set the Document Camera Indicator bit in each picture in the bitstream, starting with the next compressed picture. 

Access get and set

Type Xil_boolean

Values TRUE: Set the Document Camera Indicator bit in the bitstream.  FALSE: Do not set the Document Camera Indicator bit in the bitstream. 

Default FALSE

H261 Decompression Attributes

IGNORE_HISTORY

Description If TRUE, perform forward seeks without updating the decoding history and allow backward seeking (decompression after these seeks may yield incomplete results).  If FALSE, maintain proper decoding history during forward seeks and disallow backward seeking.  xil_cis_get_random_access(3) will return TRUE if IGNORE_HISTORY is TRUE, and will return FALSE if IGNORE_HISTORY is FALSE. 

Access get and set

Type Xil_boolean

Values TRUE: Allow backward seeks and perform fast forward seeks.  FALSE: Perform correct seeking. 

Default FALSE

DECOMPRESSOR_FREEZE_RELEASE

Description Return value of the Freeze Picture Release bit from the picture header of the most recently decompressed picture.  Value is available immediately after executing an xil_decompress(3) call and may be "gotten" and tested without compromising the execution of a decompression molecule. 

Access get

Type Xil_boolean

Values TRUE: Freeze Picture Release bit is set.  FALSE: Freeze Picture Release bit is not set. 

Default Value is undefined if no pictures have been decompressed. 

DECOMPRESSOR_SPLIT_SCREEN

Description Return value of the Split Screen Indicator bit from the picture header of the most recently decompressed picture.  Value is available immediately after executing an xil_decompress(3) call and may be "gotten" and tested without compromising the execution of a decompression molecule. 

Access get

Type Xil_boolean

Values TRUE: Split Screen Indicator bit is set.  FALSE: Split Screen Indicator bit is not set. 

Default Value is undefined if no pictures have been decompressed. 

DECOMPRESSOR_DOC_CAMERA

Description Return value of the Document Camera Indicator bit from the picture header of the most recently decompressed picture.  Value is available immediately after executing an xil_decompress(3) call and may be "gotten" and tested without compromising the execution of a decompression molecule. 

Access get

Type Xil_boolean

Values TRUE: Document Camera Indicator bit is set.  FALSE: Document Camera Indicator bit is not set. 

Default Value is undefined if no pictures have been decompressed. 

DECOMPRESSOR_SOURCE_FORMAT

Description Return value of the Source Format bit from the picture header of the most recently decompressed picture.  Value is available immediately after executing an xil_decompress(3) call and may be "gotten" and tested without compromising the execution of a decompression molecule. 

Access get

Type typedef enum {

                QCIF, CIF
} XilH261SourceFormat;

Values CIF: Source Format (picture size) is Common Intermediate Format (CIF) QCIF: Source Format (picture size) is Quarter Common Intermediate Format (QCIF)

Default Value is undefined if no pictures have been decompressed. 

DECOMPRESSOR_TEMPORAL_REFERENCE

Description Return value of the Temporal Reference from the picture header of the most recently decompressed picture.  Temporal Reference is formed by incrementing its value in the previously transmitted picture header by one plus the number of non-transmitted pictures (at 29.97 Hz) since the last transmitted one.  Arithmetic is performed modulo 32.  Value is available immediately after executing an xil_decompress(3) call and may be "gotten" and tested without compromising the execution of a decompression molecule. 

Access get

Type Integer

Values value can be an integer from 0 to 31. 

Default Value is undefined if no pictures have been decompressed. 

EXAMPLES

The following example opens and closes an H.261 CIS using the XIL library:

XilSystemState State;
XilCis cis;
State = xil_open();
cis = xil_cis_create(State, "H261");
 
-- calls to H261-specific compression routines --
 
xil_cis_destroy(cis);
xil_close(State);

The following example sets an H.261 CIS attribute called COMPRESSOR_LOOP_FILTER to TRUE.  Note that because this attribute is not a structure, it is not necessary to pass the address of COMPRESSOR_LOOP_FILTER when setting it. 

XilCis cis;
xil_cis_set_attribute(cis,"COMPRESSOR_LOOP_FILTER", (void ∗) TRUE);

The following example returns the value of an H.261 CIS attribute called DECOMPRESSOR_DOC_CAMERA.  Note that when getting an attribute it is always necessary to pass the address. 

Xil_boolean on;
XilCis cis;
xil_cis_get_attribute(cis, "DECOMPRESSOR_DOC_CAMERA", (void ∗∗) &on);

NOTES

The xil_cis_set_attribute () and xil_cis_get_attribute () calls are used to modify the default behavior of a specific compressor.  Generic attributes of compressors are set by individual function calls.

SEE ALSO

xil_cis_create(3), xil_cis_get_attribute(3), xil_cis_get_bits_ptr(3), xil_compress(3), xil_decompress(3). 

SunOS 5.6  —  Last change: 3 August 1993

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