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) 52 if(seg) t= (t + t + 1 + 32) << (seg + 2);
53 else t= (t + t + 1 ) << 3;
70 t <<= ((unsigned)u_val & SEG_MASK) >>
SEG_SHIFT;
75 #if CONFIG_HARDCODED_TABLES 76 #define pcm_alaw_tableinit() 77 #define pcm_ulaw_tableinit() 78 #include "libavcodec/pcm_tables.h" 85 int (*xlaw2linear)(
unsigned char),
93 v1 = xlaw2linear(i ^ mask);
94 v2 = xlaw2linear((i + 1) ^ mask);
95 v = (v1 + v2 + 4) >> 3;
100 linear_to_xlaw[8192 + j] = (i ^
mask);
102 linear_to_xlaw[8192 - j] = (i ^ (mask ^ 0x80));
105 linear_to_xlaw[0] = linear_to_xlaw[1];
static void pcm_alaw_tableinit(void)
static void pcm_ulaw_tableinit(void)
static av_cold int ulaw2linear(unsigned char u_val)
Macro definitions for various function/variable attributes.
static uint8_t linear_to_ulaw[16384]
static const uint16_t mask[17]
static av_cold void build_xlaw_table(uint8_t *linear_to_xlaw, int(*xlaw2linear)(unsigned char), int mask)
static av_cold int alaw2linear(unsigned char a_val)
synthesis window for stochastic i
static uint8_t linear_to_alaw[16384]