cl_jpeg(3dm)
cl_jpeg - JPEG schemes in the Compression Library
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME cl_jpeg - JPEG schemes in the Compression Library SYNOPSIS #include <dmedia/cl.h> DESCRIPTION The JPEG compression standard, jpeg(4), is supported in the Compression Library, CLintro(3dm), with two schemes 1. CL_JPEG_SOFTWARE software implementation 2. CL_JPEG_COSMO real-time hardware device Each scheme is accessed using the basic CL API and parameter set. This man page describes the additional, JPEG-specific, parameters that are common to both schemes. Note that there are two methods of controlling the quantization tables. An overall quality rating can be specified that will be used to scale a default set of quantization tables, or alternatively, the quantization tables may be manually specified. CL_JPEG_QUALITY_FACTOR Type: CL_RANGE_VALUE This is one method to control the image loss and therefore the compression ratio. The quality factor controls the scaling of the quantization tables and thereby represents a rough percentage of image detail preservation. Each time the quality factor is set, the reference quantization tables are scaled and downloaded into the codec. The formula used to obtain the scale factor is scalefactor = 50/quality (quality < 50) scalefactor = 2 - 2*quality/100; (otherwise) A value of 1 causes very coarse quantization and results in a high compression ratio, the image quality is practically useless. A value of 100 causes the codec to quantize as finely as possible, often resulting in image expansion and near-perfect quality. A value of CL_JPEG_QUALITY_NO_SCALE will bypass any scaling. The default quality is CL_JPEG_QUALITY_DEFAULT and represents a good quality compressed image. A typical useful range is 25-95. When CL_QUALITY_FACTOR is set, the approximate value of CL_COMPRESSION_RATIO is calculated and when CL_COMPRESSION_RATIO is set, the approximate value of CL_QUALITY_FACTOR is calculated. When decompressing JPEG, clDecompress() fills this value in. CL_JPEG_QUANTIZATION_TABLES Type: CL_RANGE_VALUE Sets or gets the quantization tables to be used. For setting, an unsigned short *qtables[4] argument is specified as the parameter value. For each j, qtables[j] must either be NULL or point to a unsigned short[64] area of memory which represents a JPEG baseline (values from 0-255) quantization table in natural scan order. The user specified tables are stored as reference tables and scaled versions of them based on the current CL_JPEG_QUALITY_FACTOR are downloaded into the codec and become the table associated with id j. For getting, the library returns a pointer to static memory containing a similar array of four points. MACHINE DEPENDENCIES The CL programming interface is supported on the following platforms: Cosmo Compress for Indy and Indigo2 for use with Indy Video, Galileo Video, Indigo2 Video, Impact Video and Octane Compression. The CL is NOT supported on O2. Refer to dm_jpeg for information on programming the built-in compression hardware on O2. SEE ALSO jpeg(4), CLintro(3dm), cl_cosmo(3dm)