Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

G711 Class Reference
[Audio Codec - ITU-T Recomendation G711]

#include <G711.h>

List of all members.


Detailed Description

A class which implements ITU-T (formerly CCITT) Recomendation G711 "Pulse Code Modulation (PCM) of Voice Frequencies".

This encodes and decodes uniform PCM values to/from 8 bit A-law and u-Law values.

Note, the methods in this class use uniform PCM values which are of 16 bits precision, these are 'left justified' values corresponding to the 13 and 14 bit values described in G711.

Version:
2006-05-20

Definition at line 53 of file G711.h.

Static Public Member Functions

static IMPORT uint8_t ALawEncode (int16_t pcm16)
static IMPORT int ALawDecode (uint8_t alaw)
static IMPORT uint8_t ULawEncode (int16_t pcm16)
static IMPORT int ULawDecode (uint8_t ulaw)
static IMPORT uint8_t ALawToULaw (uint8_t alaw)
static IMPORT uint8_t ULawToALaw (uint8_t ulaw)
static IMPORT unsigned ALawEncode (uint8_t *dst, int16_t *src, size_t srcSize)
static IMPORT unsigned ALawDecode (int16_t *dst, const uint8_t *src, size_t srcSize)
static IMPORT unsigned ULawEncode (uint8_t *dst, int16_t *src, size_t srcSize)
static IMPORT unsigned ULawDecode (int16_t *dst, const uint8_t *src, size_t srcSize)
static IMPORT unsigned ALawToULaw (uint8_t *dst, const uint8_t *src, size_t srcSize)
static IMPORT unsigned ULawToALaw (uint8_t *dst, const uint8_t *src, size_t srcSize)


Member Function Documentation

EXPORT uint8_t G711::ALawEncode int16_t  pcm16  )  [static]
 

Encode a single 16 bit uniform PCM value into an A-Law value

Parameters:
pcm16 A 16 bit uniform PCM value (sign extented into an int). If the value doesn't lie in the range -32768 to 32767 then the result is undefined.
Returns:
The A-Law encoded value corresponding to pcm16

Definition at line 41 of file G711.cpp.

EXPORT int G711::ALawDecode uint8_t  alaw  )  [static]
 

Encode a single A-Law value into a 16 bit uniform PCM value

Parameters:
alaw An A-Law encoded value
Returns:
The 16 bit uniform PCM value corresponding to alaw

Definition at line 87 of file G711.cpp.

EXPORT uint8_t G711::ULawEncode int16_t  pcm16  )  [static]
 

Encode single 16 bit uniform PCM value into an u-Law value

Parameters:
pcm16 A 16 bit uniform PCM value (sign extented into an int) If the value doesn't lie in the range -32768 to 32767 then the result is undefined.
Returns:
The u-Law encoded value corresponding to pcm16

Definition at line 112 of file G711.cpp.

EXPORT int G711::ULawDecode uint8_t  ulaw  )  [static]
 

Encode a single u-Law value into a 16 bit uniform PCM value

Parameters:
ulaw An u-Law encoded value
Returns:
The 16 bit uniform PCM value corresponding to ulaw

Definition at line 161 of file G711.cpp.

EXPORT uint8_t G711::ALawToULaw uint8_t  alaw  )  [static]
 

Convert a single A-Law value into a u-law value.

Parameters:
alaw An A-Law encoded value
Returns:
The u-law value.

Definition at line 182 of file G711.cpp.

EXPORT uint8_t G711::ULawToALaw uint8_t  ulaw  )  [static]
 

Convert a single u-Law value into an A-law value.

Parameters:
ulaw An u-Law encoded value
Returns:
The A-Law value

Definition at line 207 of file G711.cpp.

EXPORT unsigned G711::ALawEncode uint8_t dst,
int16_t src,
size_t  srcSize
[static]
 

Encode a buffer of 16 bit uniform PCM values into A-Law values

Parameters:
dst Pointer to location to store A-Law encoded values
src Pointer to the buffer of 16 bit uniform PCM values to be encoded
srcSize The size, in bytes, of the buffer at src
Returns:
The number of bytes which were stored at dst (equal to srcSize>>1)

Definition at line 232 of file G711.cpp.

EXPORT unsigned G711::ALawDecode int16_t dst,
const uint8_t src,
size_t  srcSize
[static]
 

Decode a buffer of A-Law values into 16 bit uniform PCM values

Parameters:
dst Pointer to location to store decoded 16 bit uniform PCM values
src Pointer to the buffer of A-Law values to be decoded
srcSize The size, in bytes, of the buffer at src
Returns:
The number of bytes which were stored at dst (equal to srcSize<<1)

Definition at line 242 of file G711.cpp.

EXPORT unsigned G711::ULawEncode uint8_t dst,
int16_t src,
size_t  srcSize
[static]
 

Encode a buffer of 16 bit uniform PCM values into u-Law values

Parameters:
dst Pointer to location to store u-Law encoded values
src Pointer to the buffer of 16 bit uniform PCM values to be encoded
srcSize The size, in bytes, of the buffer at src
Returns:
The number of bytes which were stored at dst (equal to srcSize>>1)

Definition at line 251 of file G711.cpp.

EXPORT unsigned G711::ULawDecode int16_t dst,
const uint8_t src,
size_t  srcSize
[static]
 

Decode a buffer of u-Law values into 16 bit uniform PCM values

Parameters:
dst Pointer to location to store decoded 16 bit uniform PCM values
src Pointer to the buffer of u-Law values to be decoded
srcSize The size, in bytes, of the buffer at src
Returns:
The number of bytes which were stored at dst (equal to srcSize<<1)

Definition at line 261 of file G711.cpp.

EXPORT unsigned G711::ALawToULaw uint8_t dst,
const uint8_t src,
size_t  srcSize
[static]
 

Convert a buffer of A-Law values into u-law values.

Parameters:
dst Pointer to location to store u-law values
src Pointer to the buffer of A-Law values to be converted
srcSize The size, in bytes, of the buffer at src
Returns:
The number of bytes which were stored at dst (equal to srcSize)

Definition at line 270 of file G711.cpp.

EXPORT unsigned G711::ULawToALaw uint8_t dst,
const uint8_t src,
size_t  srcSize
[static]
 

Convert a buffer of u-Law values into A-law values.

Parameters:
dst Pointer to location to store A-law values
src Pointer to the buffer of u-Law values to be converted
srcSize The size, in bytes, of the buffer at src
Returns:
The number of bytes which were stored at dst (equal to srcSize)

Definition at line 279 of file G711.cpp.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.4.4