Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 32) sorted by relevance

12

/liblc3-3.5.0-3.4.0/src/
Dsns.c125 for (int i = 0, j; i < 16; i++) in dct16_forward() local
126 for (y[i] = 0, j = 0; j < 16; j++) in dct16_forward()
127 y[i] += x[j] * dct16_m[j][i]; in dct16_forward()
136 for (int i = 0, j; i < 16; i++) in dct16_inverse() local
137 for (y[i] = 0, j = 0; j < 16; j++) in dct16_inverse()
138 y[i] += x[j] * dct16_m[i][j]; in dct16_inverse()
272 for (int i = 0; i < LC3_NUM_BANDS-1; ) { in compute_scale_factors() local
273 e[i] = (e0 * 0.25f + e1 * 0.5f + (e2 = e[i+1]) * 0.25f) * ge[i]; in compute_scale_factors()
274 e_sum += e[i++]; in compute_scale_factors()
276 e[i] = (e1 * 0.25f + e2 * 0.5f + (e0 = e[i+1]) * 0.25f) * ge[i]; in compute_scale_factors()
[all …]
Dtns.c122 for (int i = 1; i < k; i++) in compute_lpc_coeffs() local
123 rc -= a0[i] * r[f][k-i]; in compute_lpc_coeffs()
128 for (int i = 1; i < k; i++) in compute_lpc_coeffs() local
129 a1[i] = a0[i] + rc * a0[k-i]; in compute_lpc_coeffs()
133 for (int i = 1; i < k; i++) in compute_lpc_coeffs() local
134 rc -= a1[i] * r[f][k-i]; in compute_lpc_coeffs()
139 for (int i = 1; i < k; i++) in compute_lpc_coeffs() local
140 a0[i] = a1[i] + rc * a1[k-i]; in compute_lpc_coeffs()
157 for (int i = 1; i < 9; i++) in lpc_weighting() local
158 a[i] *= (g *= gamma); in lpc_weighting()
[all …]
Dspec.c60 for (int i = 0; i < ne; i++, x += 4) { in estimate_gain() local
71 e[i] = fast_db_q16(fmaxf(x0 + x1 + x2 + x3, 1e-10f)); in estimate_gain()
83 for (int i = 128, j, j0 = ne-1, j1 ; i > 0; i >>= 1) { in estimate_gain() local
84 int gn = (g_int - i) * k_20_28; in estimate_gain()
100 g_int = g_int - i; in estimate_gain()
216 for (int i = 0; i < ne; i += 2) { in quantize() local
219 x[i+0] *= g_inv; in quantize()
220 x[i+1] *= g_inv; in quantize()
222 x0 = fminf(fabsf(x[i+0]) + 6.f/16, INT16_MAX); in quantize()
223 x1 = fminf(fabsf(x[i+1]) + 6.f/16, INT16_MAX); in quantize()
[all …]
Dattdet.c45 for (int i = 0; i < nblk; i++) { in lc3_attdet_run() local
46 e[i] = 0; in lc3_attdet_run()
56 e[i] += (xf * xf) >> 5; in lc3_attdet_run()
68 e[i] += (xf * xf) >> 5; in lc3_attdet_run()
80 for (int i = 0; i < nblk; i++) { in lc3_attdet_run() local
81 a[i] = LC3_MAX(attdet->an1 >> 2, attdet->en1); in lc3_attdet_run()
82 attdet->en1 = e[i], attdet->an1 = a[i]; in lc3_attdet_run()
84 if ((e[i] >> 3) > a[i] + (a[i] >> 4)) in lc3_attdet_run()
85 p_att = i + 1; in lc3_attdet_run()
Dltpf_neon.h60 for (int i = 0; i < 5*n; i += 5) { in neon_resample_16k_12k8() local
61 const int16_t *hn = h[i & 3]; in neon_resample_16k_12k8()
62 const int16_t *xn = x + (i >> 2); in neon_resample_16k_12k8()
106 for (int i = 0; i < 5*n; i += 5) { in neon_resample_32k_12k8() local
107 const int16_t *hn = h[i & 1]; in neon_resample_32k_12k8()
108 const int16_t *xn = x + (i >> 1); in neon_resample_32k_12k8()
113 for (int i = 1; i < 10; i++) in neon_resample_32k_12k8() local
169 for (int i = 0; i < 15*n; i += 15) { in neon_resample_48k_12k8() local
170 const int16_t *hn = h[i & 3]; in neon_resample_48k_12k8()
171 const int16_t *xn = x + (i >> 2); in neon_resample_48k_12k8()
[all …]
Dbwdet.c67 int i = bwr[bw].is, ie = bwr[bw].ie; in lc3_bwdet_run() local
68 int n = ie - i; in lc3_bwdet_run()
70 float se = e[i]; in lc3_bwdet_run()
71 for (i++; i < ie; i++) in lc3_bwdet_run()
72 se += e[i]; in lc3_bwdet_run()
90 for (int i = i0 - l + 1; !hold && i <= i0 + 1; i++) { in lc3_bwdet_run() local
91 hold = e[i-l] > tc * e[i]; in lc3_bwdet_run()
Denergy.c52 for (int i = lim[iband]; iband < nb; iband++) { in lc3_energy_compute() local
54 int n = ie - i; in lc3_energy_compute()
56 float sx2 = x[i] * x[i]; in lc3_energy_compute()
57 for (i++; i < ie; i++) in lc3_energy_compute()
58 sx2 += x[i] * x[i]; in lc3_energy_compute()
Dplc.c53 for (int i = 0; i < ne; i++) { in lc3_plc_synthesize() local
55 y[i] = alpha * (seed & 0x8000 ? -x[i] : x[i]); in lc3_plc_synthesize()
Dltpf.c190 for (int i = 0; i < 5*n; i += 5) { in resample_x64k_12k8() local
191 const int16_t *hn = h + (i % p) * w; in resample_x64k_12k8()
192 const int16_t *xn = x + (i / p); in resample_x64k_12k8()
234 for (int i = 0; i < 15*n; i += 15) { in resample_x192k_12k8() local
235 const int16_t *hn = h + (i % p) * w; in resample_x192k_12k8()
236 const int16_t *xn = x + (i / p); in resample_x192k_12k8()
393 for (int i = 0; i < (n >> 4); i++) in dot() local
430 for (int i = 1; i < n; i++) in argmax() local
431 if (*x_max < x[i]) in argmax()
432 *x_max = x[arg = i]; in argmax()
[all …]
Dltpf_arm.h55 for (int i = 0; i < 5*n; i += 5) { in arm_resample_x64k_12k8() local
56 const int16x2_t *hn = h + (i % (2*p)) * (48 / p); in arm_resample_x64k_12k8()
57 const int16x2_t *xn = x + (i / (2*p)); in arm_resample_x64k_12k8()
86 for (int i = 0; i < 15*n; i += 15) { in arm_resample_x192k_12k8() local
87 const int16x2_t *hn = h + (i % (2*p)) * (128 / p); in arm_resample_x192k_12k8()
88 const int16x2_t *xn = x + (i / (2*p)); in arm_resample_x192k_12k8()
478 for (int i = 0; i < (n >> 4); i++ ) in arm_correlate() local
Dlc3.c164 for (int i = 0; i < ns; i++, pcm += stride) in load_s16() local
165 xt[i] = *pcm, xs[i] = *pcm; in load_s16()
185 for (int i = 0; i < ns; i++, pcm += stride) { in load_s24() local
186 xt[i] = *pcm >> 8; in load_s24()
187 xs[i] = ldexpf(*pcm, -8); in load_s24()
208 for (int i = 0; i < ns; i++, pcm += 3*stride) { in load_s24_3le() local
213 xt[i] = in >> 16; in load_s24_3le()
214 xs[i] = ldexpf(in, -16); in load_s24_3le()
235 for (int i = 0; i < ns; i++, pcm += stride) { in load_float() local
236 xs[i] = ldexpf(*pcm, 15); in load_float()
[all …]
/liblc3-3.5.0-3.4.0/test/neon/
Dmdct_neon.c37 for (int i = 0; i < 240; i++) { in check_fft() local
38 x[i].re = (double)rand() / RAND_MAX; in check_fft()
39 x[i].im = (double)rand() / RAND_MAX; in check_fft()
44 for (int i = 0; i < 240; i++) in check_fft() local
45 if (fabsf(y[i].re - y_neon[i].re) > 1e-6f || in check_fft()
46 fabsf(y[i].im - y_neon[i].im) > 1e-6f ) in check_fft()
51 for (int i = 0; i < 240; i++) in check_fft() local
52 if (fabsf(y[i].re - y_neon[i].re) > 1e-6f || in check_fft()
53 fabsf(y[i].im - y_neon[i].im) > 1e-6f ) in check_fft()
58 for (int i = 0; i < 240; i++) in check_fft() local
[all …]
Dltpf_neon.c41 for (int i = -60; i < 480; i++) in check_resampler() local
42 x[i] = rand() & 0xffff; in check_resampler()
68 for (int i = 0; i < 200; i++) in check_dot() local
69 x[i] = rand() & 0xffff; in check_dot()
84 for (int i = 0; i < 500; i++) { in check_correlate() local
85 a[i] = rand() & 0xffff; in check_correlate()
86 b[i] = rand() & 0xffff; in check_correlate()
/liblc3-3.5.0-3.4.0/tables/
Dmktables.py92 for (i, v) in enumerate(t):
93 print('{:14.8e},'.format(v), end = '\n' if i%m == m-1 else ' ')
106 for (i, k) in enumerate(kv):
108 end = '\n' if i%2 == 1 else ' ')
128 for (i, k) in enumerate(kv):
130 end = '\n' if i%2 == 1 else ' ')
191 for i in range(0, len(h), 192 // k):
192 for j in range(0, len(h[i]), 10):
195 h[i][j+0], h[i][j+1], h[i][j+2], h[i][j+3], h[i][j+4],
196 h[i][j+5], h[i][j+6], h[i][j+7], h[i][j+8], h[i][j+9]))
[all …]
Dfastmath.py36 y = [ fast_exp2(x[i], p) for i in range(len(x)) ]
74 y = [ fast_log2(x[i], p) for i in range(len(x)) ]
99 for i in range(32):
100 a = k * np.log2(np.ldexp(32 + i , -5)) - (i // 16) * (k/2);
101 b = k * np.log2(np.ldexp(32 + i+1, -5)) - (i // 16) * (k/2);
108 end = ' ' if i % 4 < 3 else '\n')
/liblc3-3.5.0-3.4.0/test/
Dspec_py.c93 for (int i = 0; i < nq; i++) in quantize_py() local
94 xq[i] = __xq[i] & 1 ? -(__xq[i] >> 1) : (__xq[i] >> 1); in quantize_py()
119 for (int i = 0; i < ne; i++) in compute_nbits_py() local
120 __xq[i] = xq[i] < 0 ? (-xq[i] << 1) + 1 : (xq[i] << 1); in compute_nbits_py()
157 for (int i = 0; i < ne; i++) in analyze_py() local
158 xq[i] = __xq[i] & 1 ? -(__xq[i] >> 1) : (__xq[i] >> 1); in analyze_py()
184 for (int i = 0; i < nq; i++) in estimate_noise_py() local
185 __xq[i] = xq[i] < 0 ? (-xq[i] << 1) + 1 : (xq[i] << 1); in estimate_noise_py()
Dsns.py69 for i in range(n2):
70 scf_i[i] = 0.5 * (scf_i[2*i] + scf_i[2*i+1])
101 for i in range(n2):
102 e[2*i+0] = e[2*i+1] = e[n2+i]
131 e_4[1:15] = [ np.sum(w * e_l[4*i-1:4*i+5]) for i in range(1, 15) ]
141 scf_a[2:14] = [ np.average(scf[i:i+5]) for i in range(12) ]
172 dmse_lf = [ np.sum((scf[:8] - T.SNS_LFCB[i]) ** 2) for i in range(32) ]
173 dmse_hf = [ np.sum((scf[8:] - T.SNS_HFCB[i]) ** 2) for i in range(32) ]
268 dMSE = [ [ sum((t2_rot - G[j][i] * xq[j]) ** 2)
269 for i in range(len(G[j])) ] for j in range(4) ]
[all …]
Dspec.py86 for i in range(8):
87 factor = 1 << (7 - i)
386 for i in range(len(self.xg)):
388 if self.xq[i] == 0:
391 bits.write_bit(self.xg[i] >= self.xq[i])
502 for i in range(len(x)):
505 xr.resize(i)
508 if x[i] == 0:
511 xr[i] = bits.read_bit()
516 for i in range(len(levs)):
[all …]
Dattdet.py62 x_att = np.array([ np.sum(x[i*r:(i+1)*r]) for i in range(mf) ])
75 e_att = np.array([ np.sum(np.square(x_hp[40*i:40*(i+1)]))
76 for i in range(nb) ])
80 for i in range(1,nb):
81 a_att[i] = np.maximum(0.25 * a_att[i-1], e_att[i-1])
88 flags = [ (e_att[i] > 8.5 * a_att[i]) for i in range(nb) ]
90 for (i, f) in enumerate(flags):
91 if f: p_att = i
Dtns.py167 for i in range(len(x)):
169 xi = x[i]
179 y[i] = xi
246 for i in range(len(x)):
248 xi = x[i] - rc[rc_order-1] * st[rc_order-1]
254 y[i] = xi
309 for i in range(10):
311 x = pow(x, .5 + i/5)
338 for i in range(100):
362 for i in range(len(C.X_S[dt])):
[all …]
Dencoder.py115 for i in range(len(C.X_PCM[dt])):
117 data = lc3.encode(enc_c, C.X_PCM[dt][i], C.NBYTES[dt])
118 ok = ok and data == C.BYTES_AC[dt][i]
134 for i in range(0, len(data), 20):
136 for x in data[i:min(i+20, len(data))] ))
189 for i in range(0, len(pcm), frame_samples):
191 print('Encoding frame %d' % (i // frame_samples), end='\r')
193 frame_pcm = pcm[i:i+frame_samples]
Dltpf.py68 for i in range(n):
69 e = (15 * i) // p
70 f = (15 * i) % p
72 u[2+i] = p * np.dot( x[e:e+w+1], np.take(h, k) )
83 for i in range(n):
84 self.y[d+i] -= a[1] * self.y[d+i-1] + a[2] * self.y[d+i-2]
118 self.y[:n] = [ np.dot(x[2*i:2*i+5], h) for i in range(self.n) ]
194 nc = [ self.norm_corr(x, n, t[i]) for i in range(2) ]
242 u = [ np.dot( np.take(x, i-k), np.take(h, 4*k) ) \
243 for i in range(n) ]
[all …]
Dbwdet.py108 for i in range(sr):
109 if i+1 != bw0:
110 i0 = BW_START[dt][sr][i]
111 i1 = BW_STOP[dt][sr][i]
112 e[i0:i1+1] /= (np.mean(e[i0:i1+1]) / TQ[i] + 1e-3)
/liblc3-3.5.0-3.4.0/test/arm/
Dltpf_arm.c41 for (int i = -60; i < 480; i++) in check_resampler() local
42 x[i] = rand() & 0xffff; in check_resampler()
80 for (int i = 0; i < 500; i++) { in check_correlate() local
81 a[i] = rand() & 0xffff; in check_correlate()
82 b[i] = rand() & 0xffff; in check_correlate()
/liblc3-3.5.0-3.4.0/tools/
Ddlc3.c211 for (int i = 0; i * frame_samples < encode_samples; i++) { in main() local
215 if (floorf(i * frame_us * 1e-6) > nsec) { in main()
217 float progress = fminf((float)i * frame_samples / pcm_samples, 1); in main()
223 nsec = rint(i * frame_us * 1e-6); in main()
234 int pcm_offset = i > 0 ? 0 : encode_samples - pcm_samples; in main()
236 encode_samples - i*frame_samples); in main()

12