*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> dmedia/dmG726Encode (3d)              
Title
Content
Arch
Section
 

Contents


dmG726Encode(3dm)					     dmG726Encode(3dm)


NAME    [Toc]    [Back]

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

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/dm_audioutil.h>

     DMstatus dmG726Encode(DMG726encoder handle,
			   void	*ibuf,
		      unsigned char *obuf
			   int numSamples)

PARAMETER    [Toc]    [Back]

     handle    DMG726encoder structure,	created	by dmG726EncoderCreate(3dm),
	       specifies the signal processing parameters.


     ibuf      pointer to input	sample data buffer, an array of	short (16
	       bits) for linear	input or unsigned char for A-law or mu-law
	       input.  For linear input, samples are assumed to	be two's
	       complement.  Data buffer	must be	a multiple (the	same multiple
	       as that of output 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.


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


     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    [Toc]    [Back]

     Returns DM_FAILURE	or DM_SUCCESS.

DESCRIPTION    [Toc]    [Back]

     dmG726Encode(3dm) implements ITU G726 compression.	 G.726 compression
     compresses	one input sample to 2, 3, 4, or	5 bits for 16, 24, 32, or 40
     kbit/s operations respectively. 16, 24, 32, or 40 kbit/s operation	is
     indicated by setting parameter DM_AUDIO_BITRATE to	DM_G726_16_KBITS,
     DM_G726_24_KBITS, DM_G726_32_KBITS, or DM_G726_40_KBITS using DMparams



									Page 1






dmG726Encode(3dm)					     dmG726Encode(3dm)



     and passed	to dmG726EncoderSetParams(3dm).	 Input format is indicated by
     setting DM_G726_NATIVE_FORMAT to DM_G726_ULAW, DM_G726_ALAW, or
     DM_G726_LINEAR_PCM, respectively for inputting of mu-law, A-law, or
     linear PCM	data, using DMparams and passed	to
     dmG726EncoderSetParams(3dm).  If input format is DM_G726_LINEAR_PCM, the
     PCM data type will	be short.  Otherwise, the PCM data type	will be
     unsigned char.  Therefore,	the inbuf is void in the function prototyping.


     G726 compression uses a linear prediction scheme.	This means that	the
     compressed	bits, which carrying compressed	information, are interrelated
     or	interdependent.	 If a application calls	afSeekFrame(3dm) to an offset
     into the compressed bit stream file and then starts reading bits in the
     middle of the bit stream and decompress them with dmG726Decode(3dm), the
     interdependency of	the bits at the	cutting	point is lost.	The
     application will initially	get back data with a lower amplitude than if
     he	had read the same data back during a complete pass over	the file from
     the beginning.


     There is no way to	exactly	recreate the decoded data in the middle	of the
     bit stream	file without going all the way back to the beginning.
     However, with a "preroll" value to	read ahead a portion of	the compressed
     file, application can compensate for the amplitude	problem.

NOTE    [Toc]    [Back]

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

SEE ALSO    [Toc]    [Back]

      
      
     dmG726EncoderCreate(3dm), dmG726EncoderSetParams(3dm),
     dmG726EncoderDestroy(3dm),	dmG726Decode(3dm), ITU (International
     Telecommunication Union) Recommendation G.726.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
dmG728Decode IRIX implements the ITU (International Telecommunication Union)
dmG728Encode IRIX implements the ITU (International Telecommunication Union)
dmG722Decode IRIX implements the ITU (International Telecommunication Union) Recommendation G.722 decompression.
dmG722Encode IRIX implements the ITU (International Telecommunication Union) Recommendation G.722 compression.
dmG726Decode IRIX implements ITU (International Telecommunication Union) Recommendation G.726 ADPCM decompression for input comp
mount_union OpenBSD mount union filesystems
mount_unionfs FreeBSD mount union file systems
cs_oid_set_union Tru64 create an new object identifier (OID) set that is an union of two existingsets.
compose IRIX International compose key input
composetable IRIX International compose key list
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service