MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ps_tableinit

Function ps_tableinit

libavcodec/aacps_tablegen.h:80–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80static void ps_tableinit(void)
81{
82 static const float ipdopd_sin[] = { 0, M_SQRT1_2, 1, M_SQRT1_2, 0, -M_SQRT1_2, -1, -M_SQRT1_2 };
83 static const float ipdopd_cos[] = { 1, M_SQRT1_2, 0, -M_SQRT1_2, -1, -M_SQRT1_2, 0, M_SQRT1_2 };
84 int pd0, pd1, pd2;
85
86 static const float iid_par_dequant[] = {
87 //iid_par_dequant_default
88 0.05623413251903, 0.12589254117942, 0.19952623149689, 0.31622776601684,
89 0.44668359215096, 0.63095734448019, 0.79432823472428, 1,
90 1.25892541179417, 1.58489319246111, 2.23872113856834, 3.16227766016838,
91 5.01187233627272, 7.94328234724282, 17.7827941003892,
92 //iid_par_dequant_fine
93 0.00316227766017, 0.00562341325190, 0.01, 0.01778279410039,
94 0.03162277660168, 0.05623413251903, 0.07943282347243, 0.11220184543020,
95 0.15848931924611, 0.22387211385683, 0.31622776601684, 0.39810717055350,
96 0.50118723362727, 0.63095734448019, 0.79432823472428, 1,
97 1.25892541179417, 1.58489319246111, 1.99526231496888, 2.51188643150958,
98 3.16227766016838, 4.46683592150963, 6.30957344480193, 8.91250938133745,
99 12.5892541179417, 17.7827941003892, 31.6227766016838, 56.2341325190349,
100 100, 177.827941003892, 316.227766016837,
101 };
102 static const float icc_invq[] = {
103 1, 0.937, 0.84118, 0.60092, 0.36764, 0, -0.589, -1
104 };
105 static const float acos_icc_invq[] = {
106 0, 0.35685527, 0.57133466, 0.92614472, 1.1943263, M_PI/2, 2.2006171, M_PI
107 };
108 int iid, icc;
109
110 int k, m;
111 static const int8_t f_center_20[] = {
112 -3, -1, 1, 3, 5, 7, 10, 14, 18, 22,
113 };
114 static const int8_t f_center_34[] = {
115 2, 6, 10, 14, 18, 22, 26, 30,
116 34,-10, -6, -2, 51, 57, 15, 21,
117 27, 33, 39, 45, 54, 66, 78, 42,
118 102, 66, 78, 90,102,114,126, 90,
119 };
120 static const float fractional_delay_links[] = { 0.43f, 0.75f, 0.347f };
121 const float fractional_delay_gain = 0.39f;
122
123 for (pd0 = 0; pd0 < 8; pd0++) {
124 float pd0_re = ipdopd_cos[pd0];
125 float pd0_im = ipdopd_sin[pd0];
126 for (pd1 = 0; pd1 < 8; pd1++) {
127 float pd1_re = ipdopd_cos[pd1];
128 float pd1_im = ipdopd_sin[pd1];
129 for (pd2 = 0; pd2 < 8; pd2++) {
130 float pd2_re = ipdopd_cos[pd2];
131 float pd2_im = ipdopd_sin[pd2];
132 float re_smooth = 0.25f * pd0_re + 0.5f * pd1_re + pd2_re;
133 float im_smooth = 0.25f * pd0_im + 0.5f * pd1_im + pd2_im;
134 float pd_mag = 1 / sqrt(im_smooth * im_smooth + re_smooth * re_smooth);
135 pd_re_smooth[pd0*64+pd1*8+pd2] = re_smooth * pd_mag;
136 pd_im_smooth[pd0*64+pd1*8+pd2] = im_smooth * pd_mag;
137 }

Callers 2

mainFunction · 0.85
ff_ps_initFunction · 0.85

Calls 1

make_filters_from_protoFunction · 0.85

Tested by

no test coverage detected