This appendix contains the APIs of the individual image and audio conversion libraries. These libraries are not discussed in detail. As discussed in Chapter 6, “Digital Media Data Conversion,” most developers need only use the Image Conversion Library and the Audio Conversion Library. Those two libraries call the libraries described in this appendix as needed.
The Color Space Library (CSL) provides developers with the ability to convert the color spaces, packings, subsamplings, and data types of images. It also enables them to perform operations on image data, such as adjusting contrast. Like the Image Conversion Library, the CSL uses parameters describing the source and destination images as well as the conversion settings to create a color converter The image parameters are set using a DMparams structure using dmColorSetSrcParams() and dmColorSetDstParams(). The conversion parameters are set with dmColorSetConvParams(). In most cases, only the source and destination packings need to be specified; all other values will default to appropriate values. The CSL supports the RGB, YCrCb, and Y (Luminance) color spaces.
Table A-1. The Color Space Library API
Function | Description |
---|---|
DMstatus | Perform the image conversion |
DMstatus | Create and initialize the color converter. |
DMstatus | Destroy the color converter. |
DMstatus | Return the value of the error flag. |
const char * | Returns a text error message. |
DMstatus | Get the source image size in bytes. |
DMstatus | Get the destination image size in bytes. |
DMstatus | Perform any required early computations. |
DMstatus | Set the brightness delta value. |
DMstatus | Get brightness delta value. See also dmColorSetBrightness(3dm). |
DMstatus | Set the contrast multiplier. See also dmColorSetContrast(3dm). |
DMstatus | Get the contrast multiplier. See also dmColorSetContrast(3dm). |
DMstatus | Set the default alpha value of the source image. See also dmColorSetDefaultAlpha(3dm). |
DMstatus | Get the default alpha value of the source image. See also dmColorSetDefaultAlpha(3dm). |
DMstatus | Set the hue rotation. See also dmColorSetHue(3dm). |
DMstatus | Get the hue rotation. See also dmColorSetHue(3dm). |
DMstatus | Set the saturation multiplier. See also dmColorSetSaturation(3dm). |
DMstatus | Get the saturation multiplier. See also dmColorGetSaturation(3dm). |
DMstatus | Set the source image parameters. See also dmColorSetSrcParams(3dm). |
DMstatus | Set the image conversion parameters. See also dmColorSetConvParams(3dm). |
DMstatus | Set the destination image parameters. See also dmColorSetSrcParams(3dm). |
DMstatus | Get the source image parameters. See also dmColorSetSrcParams(3dm). |
DMstatus | Get the image conversion parameters. See also dmColorGetConvParams(3dm). |
DMstatus | Get the destination image parameters. See also dmColorSetSrcParams(3dm). |
DMstatus | Set the subsampling filter type. See also dmColorSetSubsamplingFilter(3dm). |
DMstatus | Get the subsampling filter type. See also dmColorSetSubsamplingFilter(3dm). |
The DVI Audio Compression Library is based on Intel's Digital Video Interactive audio compression technology for multimedia applications. It implements the IMA (Interactive Multimedia Association) recommendations for ADPCM compression and decompression based on Intel's DVI algorithm.
Table A-2. The DVI Audio Library API
Function | Description |
---|---|
DMstatus | Do ADPCM decompression based on Intel's DVI algorithm. See also dmDVIAudioDecode(3dm). |
DMstatus | Allocate a new DMDVIaudiodecoder structure. See also dmDVIAudioDecoderCreate(3dm). |
DMstatus | Deallocate a DMDVIaudiodecoder. See also dmDVIAudioDecoderDestroy(3dm). |
DMstatus | Set parameter values for a DMDVIaudiodecoder structure. See also dmDVIAudioDecoderSetParams(3dm). |
DMstatus | Get parameter values for a DMDVIaudiodecoder structure. See also dmDVIAudioDecoderGetParams(3dm). |
DMstatus | Fill buffers of a DMDVIaudiodecoder structure with zeroes. See also dmDVIAudioDecoderReset(3dm). |
DMstatus | Do ADPCM compression based on Intel's DVI algorithm. See also dmDVIAudioEncode(3dm). |
DMstatus | Allocate a new DMDVIaudioencoder structure. See also dmDVIAudioEncoderCreate(3dm). |
DMstatus | Deallocate a DMDVIaudioencoder structure. See also dmDVIAudioEncoderDestroy(3dm). |
DMstatus | Set parameter values for DMDVIaudioencoder structure. See also dmDVIAudioEncoderSetParams(3dm). |
DMstatus | Get parameter values for DMDVIaudioencoder structure. See also dmDVIAudioEncoderGetParams(3dm). |
DMstatus | Fill buffers of a DMDVIaudioencoder structure with zeroes. See also dmDVIAudioEncoderReset(3dm). |
This library implements International Telecommunication Union Standard (ITU-T, formerly CCITT) G.711 for compression and decompression. The standard is for 64 Kb/s, 8 kHz, 16-bit pulse code modulation (PCM) audio encoding of voice frequencies.
Table A-3. The G.711 Audio Compression Library API
Function | Description |
---|---|
void | Convert a 16-bit linear PCM value to an 8-bit μ-law value. See also dmG711(3dm). |
void | Convert an 8-bit μ-law value to a 16-bit linear PCM value. See also dmG711(3dm). |
void | Do ITU G.711 μ-law compression with zero trap during compression. See also dmG711(3dm). |
void | Same as dmG711MulawDecode(). See also dmG711(3dm). |
void | Convert a 16-bit linear PCM value to an 8-bit Α-law value. See also dmG711(3dm). |
void | Convert an 8-bit Α-law value to a 16-bit linear PCM value. See also dmG711(3dm). |
void | Convert μ -law data to A-law data. See also dmG711(3dm). |
void | Convert A-law date to μ-law data. See also dmG711(3dm). |
void | Convert a 16-bit linear PCM value to an 8-bit μ-law value using the conversion tables of Sun Microsystems. See also dmG711(3dm). |
void | Convert an 8-bit μ-law value to a 16-bit linear PCM value using the conversion tables of Sun Microsystems. See also dmG711(3dm). |
void | Convert a 16-bit linear PCM value to an 8-bit μ-law value using the conversion tables of NeXT Computers. See also dmG711(3dm). |
void | Convert an 8-bit μ-law value to a 16-bit linear PCM value using the conversion tables of NeXT Computers. See also dmG711(3dm). |
This library implements International Telecommunication Union Standard (ITU-T, formerly CCITT) G.722 for compression and decompression. The standard is for 7 kHz audio encoding within 64 Kb/s.
Table A-4. The G.722 Audio Compression Library API
Function | Description |
---|---|
DMstatus | Do G.722 decompression. See also dmG722Decode(3dm). |
DMstatus | Allocate a new DMG722decoder structure. See also dmG722DecoderCreate(3dm). |
DMstatus | Deallocate a DMG722decoder structure. See also dmG722DecoderDestroy(3dm). |
DMstatus | Get parameter values for a DMG722decoder structure. See also dmG722DecoderGetParams(3dm). |
DMstatus | Fill buffers of a DMG722decoder structure with zeroes. See also dmG722DecoderReset(3dm). |
DMstatus | Do G.722 compression. See also dmG722Encode(3dm). |
DMstatus | Allocate a new DMG722encoder structure. See also dmG722EncoderCreate(3dm). |
DMstatus | Deallocate a DMG722Encoder structure. See also dmG722EncoderDestroy(3dm). |
DMstatus | Get parameter values for aDMG722encoder structure. See also dmG722EncoderGetParams(3dm). |
DMstatus | Fill buffers of a DMG722encoder structure with zeroes. See also dmG722EncoderReset(3dm). |
This library implements International Telecommunication Union Standard (ITU-T, formerly CCITT) G.726 for ADPCM compression and decompression. The standard is for a compressed data bit stream of 40, 32, 24, or 16 Kb/s and a decompressed A-law, μ-law, or linear PCM data stream of 64 Kb/s.
Table A-5. The G.726 Audio Compression Library API
Function | Description |
---|---|
DMstatus | Do G.726 ADPCM decompression. See also dmG726Decode(3dm). |
DMstatus | Allocate a new DMG726decoder structure. See also dmG726DecoderCreate(3dm). |
DMstatus | Deallocate a DMG726decoder structure. See also dmG726DecoderDestroy(3dm). |
DMstatus | Set a DMG726decoder structure's parameter values. See also dmG726DecoderSetParams(3dm). |
DMstatus | Get a DMG726decoder structure's parameter values. See also dmG726DecoderGetParams(3dm). |
DMstatus | Fill a DMG726decoder structure's internal buffers with zeroes. See also dmG726DecoderReset(3dm). |
DMstatus | Do G.726 ADPCM compression. See also dmG726Encode(3dm). |
DMstatus | Allocate a new DMG726encoder structure. See also dmG726EncoderCreate(3dm). |
DMstatus | Deallocate a DMG726Encoder structure. See also dmG726EncoderDestroy(3dm). |
DMstatus | Set a DMG726encoder structure's parameter values. See also dmG726EncoderSetParams(3dm). |
DMstatus | Get a DMG726decoder structure's parameter values. See also dmG726EncoderGetParams(3dm). |
DMstatus | Fill a DMG726encoder structure's internal buffers with zeroes. See also dmG726EncoderReset(3dm). |
This library implements International Telecommunication Union Standard (ITU-T, formerly CCITT) G.728 for the audio encoding used in videoconferencing. The standard controls the coding of speech at 16 Kb/s using Low-Delay Code Excited Linear Prediction (LD-CELP).
Table A-6. The G.728 Audio Compression Library API
Function | Description |
---|---|
DMstatus | Do ITU G.728 decompression (LD-CELP). See also dmG728Decode(3dm). |
DMstatus | Allocate a new DMG728decoder structure. See also dmG728DecoderCreate(3dm). |
DMstatus | Deallocate a DMG728decoder structure. See also dmG728DecoderDestroy(3dm). |
DMstatus | Get the parameter values of a DMG728decoder structure. See also dmG728DecoderGetParams(3dm). |
DMstatus | Set the parameter values of a DMG728decoder structure. See also dmG728DecoderSetParams(3dm). |
DMstatus | Fill internal buffers of a DMG728decoder structure with zeroes. See also dmG728DecoderReset(3dm). |
DMstatus | Do G.728 compression (LD-CELP). See also dmG728Encode(3dm). |
DMstatus | Allocate a new DMG728encoder structure. See also dmG728EncoderCreate(3dm). |
DMstatus | Deallocate a DMG728Encoder structure. See also dmG728EncoderDestroy(3dm). |
DMstatus | Get the parameter values of a DMG728encoder structure. See also dmG728EncoderGetParams(3dm). |
DMstatus | Fill the internal buffers of a DMG728encoder structure with zeroes. See also dmG728EncoderReset(3dm). |
This library implements the European Global System for Mobile telecommunication (GSM) 06.10 provisional standard used for digital cellular phones. The standard, prI-ETS 300 036, describes full-rate speech transcoding which uses RPE–LTP (Regular–Pulse Excitation Long–Term Predictor)) coding at 13 Kb/s.
Table A-7. The GSM Audio Compression Library API
Function | Description |
---|---|
DMstatus | Do GSM decoding. See also dmGSMDecode(3dm). |
DMstatus | Allocate a new DMGSMdecoder structure. See also dmGSMDecoderCreate(3dm). |
DMstatus | Deallocate a DMGSMdecoder structure. See also dmGSMDecoderDestroy(3dm). |
DMstatus | Get the parameter values of a DMGSMdecoder structure. See also dmGSMDecoderGetParams(3dm). |
DMstatus | Fill internal buffers of a DMGSMdecoder structure with zeroes. See also dmGSMDecoderReset(3dm). |
DMstatus | Do GSM encoding. See also dmGSMEncode(3dm). |
DMstatus | Allocate a new DMGSMencoder structure. See also dmGSMEncoderCreate(3dm). |
DMstatus | Deallocate a DMGSMEncoder structure. See also dmGSMEncoderDestroy(3dm). |
DMstatus | Get the parameter values of a DMGSMencoder structure. See also dmGSMEncoderGetParams(3dm). |
DMstatus | Fill internal buffers of a DMGSMencoder structure with zeroes. See also dmGSMEncoderReset(3dm). |
This library implements the Moving Pictures Experts Group MPEG-1 audio standard. The standard is designed for encoding non-interlaced material and is optimized for single-speed CD-ROM bit rates (about 1.5 Mb/s). The compression is based on subband coding with adaptive quantization. Input data is divided into different frequency bands which are weighted by their perceptual importance. Mono and stereo sources are supported at sampling rates of 32, 44.1 and 48 kHz. Allowable bit rates range from 32 to 448 Kb/s.
Table A-8. The MPEG-1 Audio Compression Library API
Function | Description |
---|---|
DMstatus | Decode a single compressed block of data created by a call to dmMPEG1AudioEncode(). See also dmMPEG1AudioDecode(3dm). |
DMstatus dmMPEG1AudioDecoderCreate ( DMMPEG1audiodecoder *decoder ) | Allocate a new DMMPEG1audiodecoder structure. See also dmMPEG1AudioDecoderCreate(3dm). |
DMstatus dmMPEG1AudioDecoderDestroy ( DMMPEG1audiodecoder decoder) | Deallocate an DMMPEG1audiodecoder structure. See also dmMPEG1AudioDecoderDestroy(3dm). |
DMstatus dmMPEG1AudioDecoderGetParams ( DMMPEG1audiodecoder decoder, DMparams *params ) | Get the parameter values for a DMMPEG1audiodecoder structure. See also dmMPEG1AudioDecoderGetParams(3dm). |
DMstatus dmMPEG1AudioDecoderSetParams ( DMMPEG1audiodecoder decoder, DMparams *params ) | Set the parameter values for a DMMPEG1audiodecoder structure. See also dmMPEG1AudioDecoderSetParams(3dm). |
DMstatus | Fill the internal buffers of an DMMPEG1audiodecoder structure with zeros. See also dmMPEG1AudioDecoderReset(3dm). |
DMstatus | Compress a single block of audio data using MPEG-1 audio compression algorithm. See also dmMPEG1AudioEncode(3dm). |
DMstatus dmMPEG1AudioEncoderCreate ( DMMPEG1audioencoder *encoder ) | Allocate a new DMMPEG1audioencoder structure. See also dmMPEG1AudioEncoderCreate(3dm). |
DMstatus dmMPEG1AudioEncoderDestroy ( DMMPEG1audioencoder encoder) | Deallocate a DMMPEG1audioencoder structure. See also dmMPEG1AudioEncoderDestroy(3dm). |
DMstatus dmMPEG1AudioEncoderGetParams ( DMMPEG1audioencoder encoder, DMparams *params ) | Get the parameter values for an DMMPEG1audioencoder structure. See also dmMPEG1AudioEncoderGetParams(3dm). |
DMstatus dmMPEG1AudioEncoderSetParams ( DMMPEG1audioencoder encoder, DMparams *params ) | Set the parameter values for an DMMPEG1audioencoder structure. See also dmMPEG1AudioEncoderSetParams(3dm). |
DMstatus | Fill the internal buffers of a DMMPEG1audioencoder with zeros. See also dmMPEG1AudioEncoderReset(3dm). |
DMstatus dmMPEG1AudioFilterStateCreate ( DMMPEG1audiofilterstate *filterState) | Allocate a new DMMPEG1audiofilterstate structure. See also dmMPEG1AudioFilterStateCreate(3dm). |
DMstatus dmMPEG1AudioFilterStateDestroy ( DMMPEG1audiofilterstate filterState) | Free a DMMPEG1audiofilterstate structure. See also dmMPEG1AudioFilterStateDestroy(3dm). |
DMstatus dmMPEG1AudioFilterStateRestore ( void *coder, DMMPEG1audiofilterstate filterState ) | Restore a DMMPEG1audiofilterstate structure. See also dmMPEG1AudioFilterStateRestore(3dm). |
DMstatus dmMPEG1AudioFilterStateSave ( void *coder, DMMPEG1audiofilterstate filterState ) | Save a DMMPEG1audiofilterstate structure. See also dmMPEG1AudioFilterStateSave(3dm). |
DMstatus dmMPEG1AudioHeaderGetBlockBytes ( DMMPEG1audiodecoder decoder, unsigned char *cmpData, int *blockSize ) | Get the expected length in bytes of a compressed data block. See also dmMPEG1AudioHeaderGetBlockBytes(3dm). |
DMstatus dmMPEG1AudioHeaderGetParams ( unsigned char *cmpData, DMparams *params ) | Get decoder parameter information from the header of a compressed MPEG-1 audio data block. See also dmMPEG1AudioHeaderGetParams(3dm). |
This library enables the sampling rate conversion of single-channel, 32-bit, floating point audio data.
Table A-9. The Audio Rate Conversion Library API
Function | Description |
---|---|
DMstatus | Convert the data sampling rate. See also dmAudioRateConvert(3dm). |
DMstatus | Allocate a new DMaudiorateconverter structure. See also dmAudioRateConverterCreate(3dm). |
DMstatus | Deallocate an DMaudiorateconverter structure. See also dmAudioRateConverterDestroy(3dm). |
DMstatus | Get the parameter values of a DMaudiorateconverter structure. See also dmAudioRateConverterGetParams(3dm). |
DMstatus dmAudioRateConverterSetParams ( DMaudiorateconverter handle, DMparams *params ) | Set the parameter values of a DMaudiorateconverter structure. See also dmAudioRateConverterSetParams(3dm). |
DMstatus | Fill the internal buffers of a DMaudiorateconverter structure with a constant value. See also dmAudioRateConverterReset(3dm). |