/liblc3-latest/test/arm/ |
D | ltpf_arm.c | 45 int16_t y[128], y_arm[128]; in check_resampler() local 47 resample_8k_12k8(&hp50, x, y, 128); in check_resampler() 49 if (memcmp(y, y_arm, 128 * sizeof(*y)) != 0) in check_resampler() 52 resample_16k_12k8(&hp50, x, y, 128); in check_resampler() 54 if (memcmp(y, y_arm, 128 * sizeof(*y)) != 0) in check_resampler() 57 resample_24k_12k8(&hp50, x, y, 128); in check_resampler() 59 if (memcmp(y, y_arm, 128 * sizeof(*y)) != 0) in check_resampler() 62 resample_32k_12k8(&hp50, x, y, 128); in check_resampler() 64 if (memcmp(y, y_arm, 128 * sizeof(*y)) != 0) in check_resampler() 67 resample_48k_12k8(&hp50, x, y, 128); in check_resampler() [all …]
|
/liblc3-latest/src/ |
D | fastmath.h | 107 union { float f; int32_t s; } y; in lc3_exp2f() local 109 y.f = ( p[0]) * x; in lc3_exp2f() 110 y.f = (y.f + p[1]) * x; in lc3_exp2f() 111 y.f = (y.f + p[2]) * x; in lc3_exp2f() 112 y.f = (y.f + p[3]) * x; in lc3_exp2f() 113 y.f = (y.f + 1.f) * e[k & 7]; in lc3_exp2f() 117 y.s += (k >> 3) << LC3_IEEE754_EXP_SHL; in lc3_exp2f() 119 return y.f; in lc3_exp2f() 129 float y; in lc3_log2f() local 139 y = ( c[0]) * x; in lc3_log2f() [all …]
|
D | ltpf_arm.h | 49 struct lc3_ltpf_hp50_state *hp50, const int16x2_t *x, int16_t *y, int n) in arm_resample_x64k_12k8() argument 70 *(y++) = (yn + (1 << 15)) >> 16; in arm_resample_x64k_12k8() 80 struct lc3_ltpf_hp50_state *hp50, const int16x2_t *x, int16_t *y, int n) in arm_resample_x192k_12k8() argument 111 *(y++) = (yn + (1 << 15)) >> 16; in arm_resample_x192k_12k8() 122 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in arm_resample_8k_12k8() argument 144 8, (const int16x2_t *)h, hp50, (int16x2_t *)x, y, n); in arm_resample_8k_12k8() 159 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in arm_resample_16k_12k8() argument 202 4, (const int16x2_t *)h, hp50, (int16x2_t *)x, y, n); in arm_resample_16k_12k8() 217 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in arm_resample_32k_12k8() argument 251 2, (const int16x2_t *)h, hp50, (int16x2_t *)x, y, n); in arm_resample_32k_12k8() [all …]
|
D | mdct.c | 36 const struct lc3_complex *x, struct lc3_complex *y, int n) in fft_5() argument 44 for (int i = 0; i < n; i++, x++, y+= 5) { in fft_5() 56 y[0].re = x[0].re + s14.re + s23.re; in fft_5() 58 y[0].im = x[0].im + s14.im + s23.im; in fft_5() 60 y[1].re = x[0].re + s14.re * cos1 - d14.im * sin1 in fft_5() 63 y[1].im = x[0].im + s14.im * cos1 + d14.re * sin1 in fft_5() 66 y[2].re = x[0].re + s14.re * cos2 - d14.im * sin2 in fft_5() 69 y[2].im = x[0].im + s14.im * cos2 + d14.re * sin2 in fft_5() 72 y[3].re = x[0].re + s14.re * cos2 + d14.im * sin2 in fft_5() 75 y[3].im = x[0].im + s14.im * cos2 - d14.re * sin2 in fft_5() [all …]
|
D | ltpf.c | 214 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_x64k_12k8() argument 239 *(y++) = (yn + (1 << 15)) >> 16; in resample_x64k_12k8() 259 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_x192k_12k8() argument 289 *(y++) = (yn + (1 << 15)) >> 16; in resample_x192k_12k8() 304 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_8k_12k8() argument 306 resample_x64k_12k8(8, h_8k_12k8_q15, hp50, x, y, n); in resample_8k_12k8() 320 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_16k_12k8() argument 322 resample_x64k_12k8(4, h_16k_12k8_q15, hp50, x, y, n); in resample_16k_12k8() 336 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_32k_12k8() argument 338 resample_x64k_12k8(2, h_32k_12k8_q15, hp50, x, y, n); in resample_32k_12k8() [all …]
|
D | ltpf_neon.h | 40 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in neon_resample_16k_12k8() argument 72 *(y++) = (yn + (1 << 15)) >> 16; in neon_resample_16k_12k8() 88 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in neon_resample_32k_12k8() argument 117 *(y++) = (yn + (1 << 15)) >> 16; in neon_resample_32k_12k8() 133 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in neon_resample_48k_12k8() argument 180 *(y++) = (yn + (1 << 15)) >> 16; in neon_resample_48k_12k8() 227 const int16_t *a, const int16_t *b, int n, float *y, int nc) in neon_correlate() argument 266 *(y++) = (float)((int32_t)((vaddvq_s64(v0) + (1 << 5)) >> 6)); in neon_correlate() 267 *(y++) = (float)((int32_t)((vaddvq_s64(v1) + (1 << 5)) >> 6)); in neon_correlate() 268 *(y++) = (float)((int32_t)((vaddvq_s64(v2) + (1 << 5)) >> 6)); in neon_correlate() [all …]
|
D | mdct_neon.h | 34 const struct lc3_complex *x, struct lc3_complex *y, int n) in neon_fft_5() argument 52 for (int i = 0; i < n; i += 2, x += 2, y += 10) { in neon_fft_5() 88 vst1_f32( (float *)(y + 0), vget_low_f32(y0) ); in neon_fft_5() 89 vst1_f32( (float *)(y + 1), vget_low_f32(y1) ); in neon_fft_5() 90 vst1_f32( (float *)(y + 2), vget_low_f32(y2) ); in neon_fft_5() 91 vst1_f32( (float *)(y + 3), vget_low_f32(y3) ); in neon_fft_5() 92 vst1_f32( (float *)(y + 4), vget_low_f32(y4) ); in neon_fft_5() 94 vst1_f32( (float *)(y + 5), vget_high_f32(y0) ); in neon_fft_5() 95 vst1_f32( (float *)(y + 6), vget_high_f32(y1) ); in neon_fft_5() 96 vst1_f32( (float *)(y + 7), vget_high_f32(y2) ); in neon_fft_5() [all …]
|
D | mdct.h | 36 const float *x, float *d, float *y); 49 const float *x, float *d, float *y);
|
D | sns.c | 123 LC3_HOT static void dct16_forward(const float *x, float *y) in dct16_forward() argument 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() 134 LC3_HOT static void dct16_inverse(const float *x, float *y) in dct16_inverse() argument 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() 435 LC3_HOT static void add_pulse(const float *x, int *y, int n, in add_pulse() argument 440 float best_e = *energy + 2*y[0] + 1; in add_pulse() 445 float e = *energy + 2*y[i] + 1; in add_pulse() 452 *energy += 2*y[nbest] + 1; in add_pulse() [all …]
|
D | sns.h | 57 const float *x, float *y); 95 const lc3_sns_data_t *data, const float *x, float *y);
|
D | plc.c | 45 struct lc3_plc_state *plc, const float *x, float *y) in lc3_plc_synthesize() argument 56 y[i] = alpha * (seed & 0x8000 ? -x[i] : x[i]); in lc3_plc_synthesize()
|
D | plc.h | 47 lc3_plc_state_t *plc, const float *x, float *y);
|
/liblc3-latest/test/neon/ |
D | ltpf_neon.c | 45 int16_t y[128], y_neon[128]; in check_resampler() local 47 resample_16k_12k8(&hp50, x, y, 128); in check_resampler() 49 if (memcmp(y, y_neon, 128 * sizeof(*y)) != 0) in check_resampler() 52 resample_32k_12k8(&hp50, x, y, 128); in check_resampler() 54 if (memcmp(y, y_neon, 128 * sizeof(*y)) != 0) in check_resampler() 57 resample_48k_12k8(&hp50, x, y, 128); in check_resampler() 59 if (memcmp(y, y_neon, 128 * sizeof(*y)) != 0) in check_resampler() 71 float y = dot(x, x+3, 128); in check_dot() local 73 if (y != y_neon) in check_dot() 82 float y[100], y_neon[100]; in check_correlate() local [all …]
|
D | mdct_neon.c | 35 struct lc3_complex y[240], y_neon[240]; in check_fft() local 42 fft_5(x, y, 240/5); in check_fft() 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() 49 fft_bf3(lc3_fft_twiddles_bf3[0], x, y, 240/15); in check_fft() 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() 56 fft_bf2(lc3_fft_twiddles_bf2[0][1], x, y, 240/30); in check_fft() 59 if (fabsf(y[i].re - y_neon[i].re) > 1e-6f || in check_fft() 60 fabsf(y[i].im - y_neon[i].im) > 1e-6f ) in check_fft()
|
/liblc3-latest/tables/ |
D | fastmath.py | 30 y = ((((p[0]*m) + p[1])*m + p[2])*m + p[3])*m + p[4] 31 y = y * 2**(e // 8) * t[e % 8] 33 return y.astype(np.float32) 42 y = [ fast_exp2(x[i], t, p) for i in range(len(x)) ] 44 e = np.abs(y - 2**x) / (2 ** x) 56 ax1.plot(x, y, label='Approximation') 72 y = ((((p[0]*x) + p[1])*x + p[2])*x + p[3])*x + p[4] 74 return (e ) + y.astype(np.float32) 82 y = [ fast_log2(x[i], p) for i in range(len(x)) ] 83 e = np.abs(y - np.log2(x)) [all …]
|
/liblc3-latest/test/ |
D | ltpf.py | 38 self.y = np.zeros(self.n + self.d + history) 53 if len(self.y) > 2*n + d: 54 self.y[n+d:-n] = self.y[d+2*n:] 55 if len(self.y) > n + d: 56 self.y[-n:] = self.y[:n] 57 self.y[:d] = self.y[n:d+n] 82 self.y[d:d+n] = b[0] * u[2:] + b[1] * u[1:-1] + b[2] * u[:-2] 84 self.y[d+i] -= a[1] * self.y[d+i-1] + a[2] * self.y[d+i-2] 86 return self.y 96 self.y = np.zeros(self.n + history) [all …]
|
D | mdct.py | 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] 99 return y 111 y = [ None ] * 2 115 y[0] = mdct.run(x) 116 y[1] = mdct.run(x) 121 ok = ok and np.amax(np.abs(y[0] - y_c[0])) < 1e-5 122 ok = ok and np.amax(np.abs(y[1] - y_c[1])) < 1e-5 137 (y, d) = lc3.mdct_forward(dt, sr, C.X_PCM[i0][0], np.zeros(nd)) [all …]
|
D | mdct_py.c | 30 float *x, *xd, *y, *d; in mdct_forward_py() local 43 y_obj = new_1d_ptr(NPY_FLOAT, ns, &y); in mdct_forward_py() 47 lc3_mdct_forward(dt, sr, sr, x, d, y); in mdct_forward_py() 56 float *x, *xd, *d, *y; in mdct_inverse_py() local 69 y_obj = new_1d_ptr(NPY_FLOAT, ns, &y); in mdct_inverse_py() 73 lc3_mdct_inverse(dt, sr, sr, x, d, y); in mdct_inverse_py()
|
D | sns.py | 93 y = np.empty(len(x)) 97 y[I[b]:I[b+1]] = x[I[b]:I[b+1]] * g_sns[b] 99 return y 296 xq = [ y / np.sqrt(sum(y ** 2)) for y in (y0, y1, y2, y3) ] 336 y = self.spectral_shaping(scf_q, False, x) 338 return y 383 y = np.zeros(n, dtype=np.intc) 386 for i in range(len(y)-1, -1, -1): 395 y[pos] = [ yi, -yi ][int(ls)] 406 return y [all …]
|
D | tns.py | 214 y = np.empty(len(x)) 228 y[i] = xi 230 return y 235 y = x.copy() 268 y[i0:i1] = self.filtering( 271 return y 296 y = x.copy() 306 y[i] = xi 308 return y 335 y = x.copy() [all …]
|
D | sns_py.c | 73 int (*y)[16]; in quantize_py() local 82 y_obj = new_2d_ptr(NPY_INT, 4, 16, &y); in quantize_py() 86 y, yn, &shape_idx, &gain_idx); in quantize_py() 96 float *y, *scf; in unquantize_py() local 104 CTYPES_CHECK("y", to_1d_ptr(y_obj, NPY_FLOAT, 16, &y)); in unquantize_py() 111 unquantize(lfcb_idx, hfcb_idx, y, shape, gain, scf); in unquantize_py()
|
D | ltpf_py.c | 30 int16_t *x, *y; in resample_py() local 44 CTYPES_CHECK("y", y_obj = to_1d_ptr(y_obj, NPY_INT16, ny, &y)); in resample_py() 46 resample_12k8[sr](&hp50, x + nt, y + (ny - n), n); in resample_py()
|
/liblc3-latest/python/tools/ |
D | specgram.py | 69 y = np.empty(len(s) + frame_len) variable 72 y[i:i+frame_len] = dec.decode(enc.encode(s[i:i+frame_len], frame_size)) 74 y[len(s):] = dec.decode(enc.encode(np.zeros(frame_len), frame_size)) 75 y = y[delay_len:len(s)+delay_len] variable 82 for (ax, s) in [(ax1, s), (ax2, y)]:
|