23 #ifndef AVCODEC_QDM2_TABLEGEN_H 24 #define AVCODEC_QDM2_TABLEGEN_H 30 #define SOFTCLIP_THRESHOLD 27600 31 #define HARDCLIP_THRESHOLD 35716 33 #if CONFIG_HARDCODED_TABLES 34 #define softclip_table_init() 35 #define rnd_table_init() 36 #define init_noise_samples() 37 #include "libavcodec/qdm2_tables.h" 48 float delta = 1.0 / -dfl;
50 softclip_table[i] = SOFTCLIP_THRESHOLD - ((
int)(sin((
float)i * delta) * dfl) & 0x0000FFFF);
58 uint64_t random_seed = 0;
59 float delta = 1.0 / 16384.0;
60 for(i = 0; i < 4096 ;i++) {
61 random_seed = random_seed * 214013 + 2531011;
65 for (i = 0; i < 256 ;i++) {
68 for (j = 0; j < 5 ;j++) {
74 for (i = 0; i < 128 ;i++) {
77 for (j = 0; j < 3 ;j++) {
88 unsigned random_seed = 0;
89 float delta = 1.0 / 16384.0;
90 for (i = 0; i < 128;i++) {
91 random_seed = random_seed * 214013 + 2531011;
92 noise_samples[
i] = (delta * (float)((random_seed >> 16) & 0x00007fff) - 1.0);
static float noise_table[4096+20]
Macro definitions for various function/variable attributes.
#define SOFTCLIP_THRESHOLD
static av_cold void rnd_table_init(void)
static uint8_t random_dequant_type24[128][3]
static float noise_samples[128]
static uint8_t random_dequant_index[256][5]
static uint16_t softclip_table[HARDCLIP_THRESHOLD-SOFTCLIP_THRESHOLD+1]
synthesis window for stochastic i
#define HARDCLIP_THRESHOLD
static av_cold void softclip_table_init(void)
static av_cold void init_noise_samples(void)