23 #ifndef AVCODEC_PCM_TABLEGEN_H
24 #define AVCODEC_PCM_TABLEGEN_H
31 #define SIGN_BIT (0x80)
32 #define QUANT_MASK (0xf)
35 #define SEG_MASK (0x70)
39 #define VIDC_SIGN_BIT (1)
40 #define VIDC_QUANT_MASK (0x1E)
41 #define VIDC_QUANT_SHIFT (1)
42 #define VIDC_SEG_SHIFT (5)
43 #define VIDC_SEG_MASK (0xE0)
55 if(seg) t= (t + t + 1 + 32) << (seg + 2);
56 else t= (t + t + 1 ) << 3;
92 #if CONFIG_HARDCODED_TABLES
93 #define pcm_alaw_tableinit()
94 #define pcm_ulaw_tableinit()
95 #define pcm_vidc_tableinit()
96 #include "libavcodec/pcm_tables.h"
104 int (*xlaw2linear)(
unsigned char),
110 linear_to_xlaw[8192] =
mask;
112 v1 = xlaw2linear(
i ^
mask);
113 v2 = xlaw2linear((
i + 1) ^
mask);
114 v = (v1 + v2 + 4) >> 3;
116 linear_to_xlaw[8192 - j] = (
i ^ (
mask ^ 0x80));
117 linear_to_xlaw[8192 + j] = (
i ^
mask);
121 linear_to_xlaw[8192 - j] = (127 ^ (
mask ^ 0x80));
122 linear_to_xlaw[8192 + j] = (127 ^
mask);
124 linear_to_xlaw[0] = linear_to_xlaw[1];