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)
49 if(seg) t= (t + t + 1 + 32) << (seg + 2);
50 else t= (t + t + 1 ) << 3;
67 t <<= ((unsigned)u_val & SEG_MASK) >>
SEG_SHIFT;
72 #if CONFIG_HARDCODED_TABLES
73 #define pcm_alaw_tableinit()
74 #define pcm_ulaw_tableinit()
75 #include "libavcodec/pcm_tables.h"
82 int (*xlaw2linear)(
unsigned char),
88 linear_to_xlaw[8192] =
mask;
90 v1 = xlaw2linear(i ^ mask);
91 v2 = xlaw2linear((i + 1) ^ mask);
92 v = (v1 + v2 + 4) >> 3;
94 linear_to_xlaw[8192 - j] = (i ^ (mask ^ 0x80));
95 linear_to_xlaw[8192 + j] = (i ^
mask);
99 linear_to_xlaw[8192 - j] = (127 ^ (mask ^ 0x80));
100 linear_to_xlaw[8192 + j] = (127 ^
mask);
102 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)
static uint8_t linear_to_alaw[16384]