#ifndef _pcmu_l_h
#define _pcmu_l_h
#include "types.h"    /* u_char */
extern short pcmu_l14_table[], pcmu_l16_table[];
extern unsigned char l14_pcmu_table[], l8_pcmu_table[];

#define l8_pcmu(x)  (l8_pcmu_table[x])
#define l14_pcmu(x) ((x) >= 0 ? l14_pcmu_table[x] : l14_pcmu_table[-x] - 128)
#define l16_pcmu(x) l14_pcmu((x) >> 2)

#define pcmu_l8(x)  (pcmu_l8_table[x])
#define pcmu_l14(x) (pcmu_l14_table[x])
#define pcmu_l16(x) (pcmu_l16_table[x])

extern u_char l8_to_pcmu(int);
extern u_char l14_to_pcmu(int);
extern unsigned char l16_to_pcmu(short);
extern short  pcmu_to_l8(int);
extern short  pcmu_to_l14(int);
extern short  pcmu_to_l16(unsigned char);
extern void   pcmu_linear_init(void);
#endif
