Home
last modified time | relevance | path

Searched refs:e (Results 1 – 24 of 24) sorted by relevance

/liblc3-latest/test/neon/
Dneon.h32 typedef struct { int16_t e[4]; } int16x4_t; member
34 typedef struct { int16_t e[8]; } int16x8_t; member
35 typedef struct { int32_t e[4]; } int32x4_t; member
36 typedef struct { int64_t e[2]; } int64x2_t; member
57 return (int32x4_t){ { a.e[0] * b.e[0], a.e[1] * b.e[1], in vmull_s16()
58 a.e[2] * b.e[2], a.e[3] * b.e[3] } }; in vmull_s16()
65 r.e[0] + a.e[0] * b.e[0], r.e[1] + a.e[1] * b.e[1], in vmlal_s16()
66 r.e[2] + a.e[2] * b.e[2], r.e[3] + a.e[3] * b.e[3] } }; in vmlal_s16()
74 r.e[0] = a.e[0] + ((int64_t)b.e[0] + b.e[1]); in vpadalq_s32()
75 r.e[1] = a.e[1] + ((int64_t)b.e[2] + b.e[3]); in vpadalq_s32()
[all …]
/liblc3-latest/test/
Denergy.py33 e = [ np.mean(np.square(x[self.I[i]:self.I[i+1]]))
36 e_lo = np.sum(e[:len(e) - [2, 3, 4, 2][self.dt]])
37 e_hi = np.sum(e[len(e) - [2, 3, 4, 2][self.dt]:])
39 return e, (e_hi > 30*e_lo)
52 (e , nn ) = nrg.compute(x)
54 ok = ok and np.amax(np.abs(e_c - e)) < 1e-5 and nn_c == nn
58 (e , nn ) = nrg.compute(x)
60 ok = ok and np.amax(np.abs(e_c - e)) < 1e-3 and nn_c == nn
71 e = lc3.energy_compute(dt, sr, C.X[i0][0])[0]
72 ok = ok and np.amax(np.abs(1 - e/C.E_B[i0][0])) < 1e-6
[all …]
Dbwdet.py52 def run(self, e): argument
64 if np.mean(e[i0:i1+1]) >= TQ[bw]:
76 c = 10 * np.log10(1e-31 + e[i0-l+1:i1-l+2] / e[i0+1:i1+2])
110 e = 20 + 100 * rng.random(64)
116 e[i0:i1+1] /= (np.mean(e[i0:i1+1]) / TQ[i] + 1e-3)
126 e[i0-l+1:i1+2] /= np.power(10, np.arange(2*l+1) / (1 + drop))
130 bw_c = lc3.bwdet_run(dt, sr, e)
132 ok = ok and bw_c == bwdet.run(e)
Dsns.py108 def compute_scale_factors(self, e, att, nbytes): argument
116 if len(e) < 32:
117 n4 = round(abs(1-32/len(e))*len(e))
118 n2 = len(e) - n4
120 e = np.append(np.zeros(3*n4+n2), e)
122 e[4*i+0] = e[4*i+1] = \
123 e[4*i+2] = e[4*i+3] = e[3*n4+n2+i]
126 e[2*i+0] = e[2*i+1] = e[2*n4+n2+i]
128 elif len(e) < 64:
129 n2 = 64 - len(e)
[all …]
Dbwdet_py.c29 float *e; in bwdet_run_py() local
36 CTYPES_CHECK("e", to_1d_ptr(e_obj, NPY_FLOAT, LC3_MAX_BANDS, &e)); in bwdet_run_py()
38 int bw = lc3_bwdet_run(dt, sr, e); in bwdet_run_py()
Denergy_py.c32 float *x, *e; in energy_compute_py() local
43 e_obj = new_1d_ptr(NPY_FLOAT, lc3_num_bands[dt][sr], &e); in energy_compute_py()
45 int nn_flag = lc3_energy_compute(dt, sr, x, e); in energy_compute_py()
Dltpf.py69 e = (15 * i) // p
72 u[2+i] = p * np.dot( x[e:e+w+1], np.take(h, k) )
214 e = k0 + np.argmax(r[4:-4])
221 s = [ np.dot( np.take(r, e-k0+4 + m), np.take(h, 4*m-d) ) \
224 f = np.argmax(s[3:]) if e <= 32 else \
225 -3 + np.argmax(s) if e < 127 else \
226 -2 + 2*np.argmax(s[1:-1:2]) if e < 157 else 0
228 e -= (f < 0)
231 self.pitch_index = 4*e + f - 128 if e < 127 else \
232 2*e + f//2 + 126 if e < 157 else e + 283
[all …]
Dencoder.py59 (e, nn_flag) = self.energy.compute(x)
63 bw = self.bwdet.run(e)
65 x = self.sns.run(e, att, x)
Dtns.py158 e = [ sum(x[S[s]:S[s+1]] ** 2) for s in range(len(S)-1) ]
160 for k in range(len(r) if sum(e) > 0 else 0):
164 r[k] = np.sum( np.array(c) / np.array(e) )
196 e = 1 - rc[k-1] ** 2
197 b[1:k] = (b[1:k] - rc[k-1] * b[k-1:0:-1]) / e
Dspec.py104 e = [ np.sum(x[4*k:4*(k+1)] ** 2) for k in range(len(x) // 4) ]
105 e = 10 * np.log10(2**-31 + np.array(e) + nf)
117 for ei in e[-1::-1]:
740 e = rng.random(min(len(x), 64)) * 1e10
743 bwdet.run(e)
746 sns.run(e, False, 0, x)
/liblc3-latest/src/
Dsns.c284 float e[LC3_MAX_BANDS]; in compute_scale_factors() local
293 e[4*i4 + 0] = e[4*i4 + 1] = in compute_scale_factors()
294 e[4*i4 + 2] = e[4*i4 + 3] = eb[i4]; in compute_scale_factors()
297 e[2*(n4+i2) + 0] = e[2*(n4+i2) + 1] = eb[i2]; in compute_scale_factors()
299 memcpy(e + 4*n4 + 2*n2, eb + n4 + n2, (nb - n4 - n2) * sizeof(float)); in compute_scale_factors()
305 float e0 = e[0], e1 = e[0], e2; in compute_scale_factors()
309 e[i] = (e0 * 0.25f + e1 * 0.5f + (e2 = e[i+1]) * 0.25f) * ge[i]; in compute_scale_factors()
310 e_sum += e[i++]; in compute_scale_factors()
312 e[i] = (e1 * 0.25f + e2 * 0.5f + (e0 = e[i+1]) * 0.25f) * ge[i]; in compute_scale_factors()
313 e_sum += e[i++]; in compute_scale_factors()
[all …]
Dfastmath.h63 int e = (x.u & LC3_IEEE754_EXP_MASK) >> LC3_IEEE754_EXP_SHL; in lc3_frexpf() local
64 *exp = e - (LC3_IEEE754_EXP_BIAS - 1); in lc3_frexpf()
81 static const float e[] = { in lc3_exp2f() local
113 y.f = (y.f + 1.f) * e[k & 7]; in lc3_exp2f()
130 int e; in lc3_log2f() local
137 x = lc3_frexpf(x, &e); in lc3_log2f()
147 return e + y; in lc3_log2f()
Dattdet.c43 int32_t e[4]; 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()
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()
Dbwdet.c26 enum lc3_dt dt, enum lc3_srate sr, const float *e) in lc3_bwdet_run() argument
93 float se = e[i]; in lc3_bwdet_run()
95 se += e[i]; in lc3_bwdet_run()
114 hold = e[i-l] > tc * e[i]; in lc3_bwdet_run()
Denergy.c27 enum lc3_dt dt, enum lc3_srate sr, const float *x, float *e) in lc3_energy_compute() argument
47 *e = sx2 / n; in lc3_energy_compute()
48 e_sum[iband >= iband_h] += *(e++); in lc3_energy_compute()
Dltpf.c625 int e, f; in refine_pitch() local
632 e = r0 + argmax(r + 4, nr, &rm); in refine_pitch()
633 const float *re = r + (e - (r0 - 4)); in refine_pitch()
639 if (e >= 127 && ((i & 1) | (e >= 157))) in refine_pitch()
645 if (e > 32 && (d = interpolate_corr(re, -i)) > dm) in refine_pitch()
649 e -= (f < 0); in refine_pitch()
652 *pitch = 4*e + f; in refine_pitch()
653 return e < 127 ? 4*e + f - 128 : in refine_pitch()
654 e < 157 ? 2*e + (f >> 1) + 126 : e + 283; in refine_pitch()
Denergy.h33 enum lc3_dt dt, enum lc3_srate sr, const float *x, float *e);
Dbwdet.h33 enum lc3_dt dt, enum lc3_srate sr, const float *e);
Dtns.c214 float e, b[2][7], *b0, *b1; in lpc_reflection() local
217 e = 1 - rc[maxorder-1] * rc[maxorder-1]; in lpc_reflection()
221 b1[i] = (a[1+i] - rc[maxorder-1] * a[(maxorder-1)-i]) / e; in lpc_reflection()
227 e = 1 - rc[k] * rc[k]; in lpc_reflection()
230 b1[i] = (b0[i] - rc[k] * b0[k-1-i]) / e; in lpc_reflection()
Dspec.c88 union { float f; int32_t q16; } e[LC3_MAX_NE / 4]; in estimate_gain() local
133 e[i].f = x0 + x1 + x2 + x3; in estimate_gain()
141 e[i].q16 = lc3_db_q16(fmaxf(e[i].f + nf, 1e-10f)); in estimate_gain()
156 for (j = j0; j >= 0 && e[j].q16 < gn; j--); in estimate_gain()
159 int e_diff = e[j].q16 - gn; in estimate_gain()
Dlc3.c311 float e[LC3_MAX_BANDS]; in analyze() local
315 bool nn_flag = lc3_energy_compute(dt, sr, xf, e); in analyze()
319 side->bw = lc3_bwdet_run(dt, sr, e); in analyze()
321 lc3_sns_analyze(dt, sr, nbytes, e, att, &side->sns, xf, xf); in analyze()
/liblc3-latest/tables/
Dfastmath.py28 e = int((x - m) * 8)
31 y = y * 2**(e // 8) * t[e % 8]
44 e = np.abs(y - 2**x) / (2 ** x)
49 print('Max relative error: ', np.max(e))
50 print('Max RMS error: ', np.sqrt(np.mean(e ** 2)))
59 ax2.plot(x, e, label='Relative Error')
70 (x, e) = np.frexp(x)
74 return (e ) + y.astype(np.float32)
83 e = np.abs(y - np.log2(x))
87 print('Max absolute error: ', np.max(e))
[all …]
/liblc3-latest/fuzz/
Defuzz.cc35 int encode(Encoder &e, int nchannels, int frame_size, FuzzedDataProvider &fdp, in encode() argument
38 int pcm_samples = nchannels * e.GetFrameSamples(); in encode()
46 e.Encode(pcm.data(), in encode()
52 int encode(Encoder &e, int frame_size, int nchannels, in encode() argument
61 int pcm_bytes = nchannels * e.GetFrameSamples() * sample_bytes; in encode()
65 e.Encode(fmt, fdp.ConsumeBytes<uint8_t>(pcm_bytes).data(), in encode()
/liblc3-latest/python/tests/
Dbasic_test.py19 assert all(isinstance(e, float) for e in decoded_frame)