Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dmG726Decode(3dm) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dmG726DecoderCreate(3dm)

dmG726DecoderSetParams(3dm)

dmG726DecoderDestroy(3dm)

dmG726Encode(3dm)



dmG726Decode(3dm)                                            dmG726Decode(3dm)



NAME
     dmG726Decode - implements ITU (International Telecommunication Union)
     Recommendation G.726 ADPCM decompression for input compressed bit stream
     of 40, 32 ,24, or 16 kbit/s and output data of 64 kbit/s A-law, mu-law,
     or linear PCM.  G.726 replaced G.721 and G.723.


SYNOPSIS
     #include <dmedia/dmaudioutil.h>

     DMstatus dmG726Decode(DMG726decoder handle,
                           unsigned char *inBuffer,
                           void *outBuffer,
                           int numSamples)


PARAMETER
     handle    DMG726decoder structure, created by dmG726DecoderCreate(3dm),
               specifies the signal processing parameters.


     ibuf      pointer to input compressed data buffer, an array of bytes. The
               data format is unsigned char (8-bit).  The input bitstrem
               buffer consists of a multiple of 1, 3, 1, or 5 bytes, for
               operations at 16, 24, 32, or 40 kbit/s respectively.


     obuf      pointer to output sample data buffer, an array of short (16
               bits) for linear output or unsigned char for A-law or mu-law
               output.  For linear output, samples are assumed to be two's
               complement.  Data buffer must be a multiple (the same multiple
               as that of input bitstrem buffer) of 4, 8, 2, or 8 for
               operations at 16, 24, 32, or 40 kbit/s respectively.  This
               assumes the sampling rate of 8 kHz.


     numSamples
               number of samples to be processed. it must always be a multiple
               of 4, 8, 2, or 8 for operations at 16, 24, 32, or 40 kbit/s
               respectively.


RETURNED VALUE
     Returns DMFAILURE or DMSUCCESS.


DESCRIPTION
     dmG726Decode(3dm) implements the ITU G.726 decompression.  G.726
     decompression decompresses 2, 3, 4, or 5 bits to generate one output
     sample for 16, 24, 32, or 40 kbit/s operations respectively. 16, 24, 32,
     or 40 kbit/s operation is indicated by setting parameter DMAUDIOBITRATE
     to 16000, 24000, 32000, or 40000 using DMparams and passed to



                                                                        Page 1





dmG726Decode(3dm)                                            dmG726Decode(3dm)



     dmG726DecoderSetParams(3dm).  Output format is indicated by setting
     DMG726NATIVEFORMAT to AUDIOENCODINGULAW, AUDIOENCODINGALAW, or
     AUDIOENCODINGLINEAR, respectively for outputting mu-law, A-law, or
     linear PCM data, using DMparams and passed to
     dmG726DecoderSetParams(3dm).  If output mode is AUDIOENCODINGLINEAR,
     the PCM data type will be short.  Otherwise, the PCM data type will be
     unsigned char.  Therefore, obuf is void in the function prototyping.


NOTE
     G.726 algorithm was developed for sampling rate of 8 kHz, but could be
     used from 8 kHz to 48 kHz.


SEE ALSO
     dmG726DecoderCreate(3dm), dmG726DecoderSetParams(3dm),
     dmG726DecoderDestroy(3dm), dmG726Encode(3dm), ITU (International
     Telecommunication Union) Recommendation G.726.





































                                                                        Page 2



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