Go to the documentation of this file.
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];
static uint8_t linear_to_alaw[16384]
static void pcm_ulaw_tableinit(void)
static av_cold int vidc2linear(unsigned char u_val)
static void pcm_alaw_tableinit(void)
static const uint16_t mask[17]
static uint8_t linear_to_ulaw[16384]
static av_cold int alaw2linear(unsigned char a_val)
static av_cold void build_xlaw_table(uint8_t *linear_to_xlaw, int(*xlaw2linear)(unsigned char), int mask)
static void pcm_vidc_tableinit(void)
#define i(width, name, range_min, range_max)
static uint8_t linear_to_vidc[16384]
static av_cold int ulaw2linear(unsigned char u_val)