AF_exp_u(3)

NAME
AF_exp_u, AF_exp_a - ULAW and ALAW decompression tables

SYNTAX
#include <AF/AFUtils.h>

extern short int AF_exp_u[];

extern short int AF_exp_a[];

extern short int AF_cvt_u2s[];

extern short int AF_cvt_a2s[];

extern float AF_cvt_u2f[];

extern float AF_cvt_a2f[];

DESCRIPTION
These are preexputed tables you can link with your application. is indexed by a ULAW sample and is indexed by an ALAW sample. Each contains a 16 bit signed integer value representing the corresponding linear value. Table entries are in the range between -8192 and +8191.

and are indexed by ULAW and ALAW samples respectively and contain 16 bit signed linear values scaled to the range between -32767 and +32767.

and are indexed by ULAW and ALAW samples respectively and contain single precision floating point linear values scaled to the range between -1.0 and +1.0.

EXAMPLES
Typical usage is:

unsigned char ulaw; short int lin13; short int lin16; short int linfloat; lin13 = AF_exp_u[ ulaw ]; lin16 = AF_cvt_u2s[ ulaw ]; linflat = AF_cvt_u2f[ ulaw ];

DIAGNOSTICS
If you index a table with an out-of-range value you may cause a protection fault and crash your application.

SEE ALSO
AF_comp_u(3), AF_comp_a(3)
AF(1)

BUGS
If you encounter a reproducible bug, please submit a problem report to (af-bugs@crl.dec.com).

COPYRIGHT
Copyright 1990-1994, Digital Equipment Corporation.
See AF(1) for a full statement of rights and permissions.

AUTHORS
Tom Levergood and Larry Stewart, Digital Cambridge Research Lab