Home
last modified time | relevance | path

Searched refs:ns (Results 1 – 16 of 16) sorted by relevance

/liblc3-latest/test/
Dmdct.py41 self.ns = T.NS[dt][sr]
44 self.t = np.zeros(2*self.ns)
56 ns = self.ns
59 self.t[nd:nd+ns] = x
61 self.t[0:nd] = x[ns-nd:]
81 ns = self.ns
94 y = np.empty(ns)
95 y[:nd] = t[ns-nd:ns] + self.t[2*ns-nd:]
96 y[nd:] = t[ns:2*ns-nd]
105 ns = T.NS[dt][sr]
[all …]
Dmdct_py.c38 int ns = lc3_ns(dt, sr), nd = lc3_nd(dt, sr); in mdct_forward_py() local
40 CTYPES_CHECK("x", to_1d_ptr(x_obj, NPY_FLOAT, ns, &x)); in mdct_forward_py()
43 y_obj = new_1d_ptr(NPY_FLOAT, ns, &y); in mdct_forward_py()
64 int ns = lc3_ns(dt, sr), nd = lc3_nd(dt, sr); in mdct_inverse_py() local
66 CTYPES_CHECK("x", to_1d_ptr(x_obj, NPY_FLOAT, ns, &x)); in mdct_inverse_py()
69 y_obj = new_1d_ptr(NPY_FLOAT, ns, &y); in mdct_inverse_py()
Dltpf_py.c39 int ns = lc3_ns(dt, sr), nt = lc3_nt(sr); in resample_py() local
43 CTYPES_CHECK("x", x_obj = to_1d_ptr(x_obj, NPY_INT16, ns+nt, &x)); in resample_py()
67 int ns = lc3_ns(dt, sr), nt = lc3_nt(sr); in analyse_py() local
69 CTYPES_CHECK("x", x_obj = to_1d_ptr(x_obj, NPY_INT16, ns+nt, &x)); in analyse_py()
100 int ns = lc3_ns(dt,sr), nd = 18 * (lc3_ns_4m[sr] / 4); in synthesize_py() local
102 CTYPES_CHECK("x", x_obj = to_1d_ptr(x_obj, NPY_FLOAT, nd+ns, &x)); in synthesize_py()
Dltpf.py305 ns = T.NS[dt][sr]
314 self.x = np.zeros(ns)
373 ns = T.NS[dt][sr]
376 y = np.append(np.zeros(ns), self.y)
419 for k in range(n0, ns):
437 self.x = x[:ns]
438 self.y = np.append(self.y[ns:], y[:ns])
440 return y[:ns]
455 ns = T.NS[dt][sr]
467 x = ((2 * rng.random(ns)) - 1) * (2 ** 15 - 1)
[all …]
Dlc3_py.c64 int ns = lc3_ns(encoder->dt, encoder->sr); in encode_py() local
66 CTYPES_CHECK("x", pcm_obj = to_1d_ptr(pcm_obj, NPY_INT16, ns, &pcm)); in encode_py()
117 int ns = lc3_ns(decoder->dt, decoder->sr); in decode_py() local
118 pcm_obj = new_1d_ptr(NPY_INT16, ns, &pcm); in decode_py()
Denergy_py.c40 int ns = lc3_ns(dt, sr); in energy_compute_py() local
42 CTYPES_CHECK("x", to_1d_ptr(x_obj, NPY_FLOAT, ns, &x)); in energy_compute_py()
Dattdet_py.c40 int ns = lc3_ns(dt, sr); in attdet_run_py() local
42 CTYPES_CHECK("x", x_obj = to_1d_ptr(x_obj, NPY_INT16, ns+6, &x)); in attdet_run_py()
Dattdet.py123 ns = T.NS[dt][sr]
129 x_c = np.zeros(ns+6)
135 x = ((2 * rng.random(ns)) - 1) * (2 ** 8 - 1)
136 x[(ns * rng.random()).astype(int)] *= 2 ** 7
Dctypes.h704 int ns = lc3_ns(dt, sr); in from_encoder() local
729 new_1d_copy(NPY_INT16, nt+ns, in from_encoder()
733 new_1d_copy(NPY_FLOAT, ns, enc->x + enc->xs_off)); in from_encoder()
762 int ns = lc3_ns(dt, sr); in to_encoder() local
777 (int16_t *)enc->x + enc->xt_off - nt, ns+nt)); in to_encoder()
782 enc->x + enc->xs_off, ns)); in to_encoder()
800 int ns = lc3_ns(dt, sr); in from_decoder() local
821 new_1d_copy(NPY_FLOAT, nh + ns, dec->x + dec->xh_off)); in from_decoder()
830 new_1d_copy(NPY_FLOAT, ns, dec->x + dec->xg_off)); in from_decoder()
857 int ns = lc3_ns(dt, sr); in to_decoder() local
[all …]
Denergy.py45 ns = T.NS[dt][sr]
56 x[15*ns//16:] *= 1e2
Ddecoder.py40 self.ns = T.NS[dt][sr]
81 x = np.append(x, np.zeros(self.ns - self.ne))
Dspec.py736 ns = T.NS[dt][sr]
739 x = rng.random(ns) * 1e4
/liblc3-latest/src/
Dlc3.c200 int ns = lc3_ns(dt, sr); in load_s16() local
202 for (int i = 0; i < ns; i++, pcm += stride) in load_s16()
221 int ns = lc3_ns(dt, sr); in load_s24() local
223 for (int i = 0; i < ns; i++, pcm += stride) { in load_s24()
244 int ns = lc3_ns(dt, sr); in load_s24_3le() local
246 for (int i = 0; i < ns; i++, pcm += 3*stride) { in load_s24_3le()
271 int ns = lc3_ns(dt, sr); in load_float() local
273 for (int i = 0; i < ns; i++, pcm += stride) { in load_float()
294 int ns = lc3_ns(dt, sr_pcm); in analyze() local
307 memmove(xt - nt, xt + (ns-nt), nt * sizeof(*xt)); in analyze()
[all …]
Dmdct.c212 int ns = lc3_ns(dt, sr), nd = lc3_nd(dt, sr); in mdct_window() local
214 const float *w0 = win, *w1 = w0 + ns; in mdct_window()
217 const float *x0 = x + ns-nd, *x1 = x0; in mdct_window()
218 float *y0 = y + ns/2, *y1 = y0; in mdct_window()
229 for (x1 += ns; x0 < x1; ) { in mdct_window()
436 int ns = lc3_ns(dt, sr); in lc3_mdct_forward() local
445 u.z = fft(u.z, ns/2, u.z, z); in lc3_mdct_forward()
448 if (ns != ns_dst) in lc3_mdct_forward()
449 rescale(y, ns_dst, sqrtf((float)ns_dst / ns)); in lc3_mdct_forward()
461 int ns = lc3_ns(dt, sr); in lc3_mdct_inverse() local
[all …]
Dltpf.c891 int ns = lc3_ns(dt, sr); in lc3_ltpf_synthesize() local
892 int nt = ns / (1 + dt); in lc3_ltpf_synthesize()
896 memcpy(ltpf->x, x + ns - (w-1), (w-1) * sizeof(float)); in lc3_ltpf_synthesize()
915 if (active && ns > nt) in lc3_ltpf_synthesize()
916 synthesize[sr](xh, nh, pitch/4, x0[1], x + nt, ns-nt, c, 0); in lc3_ltpf_synthesize()
Dspec.c722 int i, ns = 0, z = 0; in estimate_noise() local
727 sum += fabsf(x[i - w]), ns++; in estimate_noise()
732 sum += fabsf(x[i - w]), ns++; in estimate_noise()
734 int nf = ns ? 8 - (int)((16 * sum) / ns + 0.5f) : 8; in estimate_noise()