/liblc3-3.7.0-3.6.0/src/ |
D | bits.c | 72 int n = end > start ? (int)(end - start) : -(int)(start - end); in get_bits_left() local 74 return 8 * n - (accu->n + accu->nover + ac_get_pending_bits(ac)); in get_bits_left() 86 .n = mode == LC3_BITS_MODE_READ ? LC3_ACCU_BITS : 0, in lc3_setup_bits() 142 int nbytes = LC3_MIN(accu->n >> 3, in accu_flush() 145 accu->n -= 8 * nbytes; in accu_flush() 150 if (accu->n >= 8) in accu_flush() 151 accu->n = 0; in accu_flush() 253 for (int n = 8 * nleft - accu->n; n > 0; n -= 32) in lc3_flush_bits() local 254 lc3_put_bits(bits, 0, LC3_MIN(n, 32)); in lc3_flush_bits() 265 LC3_HOT void lc3_put_bits_generic(struct lc3_bits *bits, unsigned v, int n) in lc3_put_bits_generic() argument [all …]
|
D | bits.h | 102 int n, nover; member 161 static inline void lc3_put_bits(lc3_bits_t *bits, unsigned v, int n); 189 static inline unsigned lc3_get_bits(lc3_bits_t *bits, int n); 206 void lc3_put_bits_generic(lc3_bits_t *bits, unsigned v, int n); 207 unsigned lc3_get_bits_generic(struct lc3_bits *bits, int n); 225 struct lc3_bits *bits, unsigned v, int n) in lc3_put_bits() argument 229 if (accu->n + n <= LC3_ACCU_BITS) { in lc3_put_bits() 230 accu->v |= v << accu->n; in lc3_put_bits() 231 accu->n += n; in lc3_put_bits() 233 lc3_put_bits_generic(bits, v, n); in lc3_put_bits() [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 55 for (int i = 0; i < 5*n; i += 5) { 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 86 for (int i = 0; i < 15*n; i += 15) { 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 | ltpf.c | 184 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_x64k_12k8() argument 190 for (int i = 0; i < 5*n; i += 5) { in resample_x64k_12k8() 228 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_x192k_12k8() argument 234 for (int i = 0; i < 15*n; i += 15) { in resample_x192k_12k8() 273 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_8k_12k8() argument 275 resample_x64k_12k8(8, h_8k_12k8_q15, hp50, x, y, n); in resample_8k_12k8() 289 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_16k_12k8() argument 291 resample_x64k_12k8(4, h_16k_12k8_q15, hp50, x, y, n); in resample_16k_12k8() 305 struct lc3_ltpf_hp50_state *hp50, const int16_t *x, int16_t *y, int n) in resample_32k_12k8() argument 307 resample_x64k_12k8(2, h_32k_12k8_q15, hp50, x, y, n); in 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() 47 { x[1*n].re + x[4*n].re, x[1*n].im + x[4*n].im }; in fft_5() 49 { x[1*n].re - x[4*n].re, x[1*n].im - x[4*n].im }; in fft_5() 52 { x[2*n].re + x[3*n].re, x[2*n].im + x[3*n].im }; in fft_5() 54 { x[2*n].re - x[3*n].re, x[2*n].im - x[3*n].im }; in fft_5() 96 const struct lc3_complex *x, struct lc3_complex *y, int n) in fft_bf3() argument 102 const struct lc3_complex *x0 = x, *x1 = x0 + n*n3, *x2 = x1 + n*n3; in fft_bf3() 105 for (int i = 0; i < n; i++, y0 += 3*n3, y1 += 3*n3, y2 += 3*n3) in fft_bf3() 138 const struct lc3_complex *x, struct lc3_complex *y, int n) in fft_bf2() argument [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 60 for (int i = 0; i < 5*n; i += 5) { 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 106 for (int i = 0; i < 5*n; i += 5) { 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 169 for (int i = 0; i < 15*n; i += 15) { in neon_resample_48k_12k8() 195 LC3_HOT static inline float neon_dot(const int16_t *a, const int16_t *b, int n) in neon_dot() argument 199 for (int i = 0; i < (n >> 4); i++) { in neon_dot() 227 const int16_t *a, const int16_t *b, int n, float *y, int nc) in neon_correlate() argument 238 for (int i=0; i < (n >> 4); i++ ) 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() 56 float32x4_t x0 = vld1q_f32( (float *)(x + 0*n) ); in neon_fft_5() 57 float32x4_t x1 = vld1q_f32( (float *)(x + 1*n) ); in neon_fft_5() 58 float32x4_t x2 = vld1q_f32( (float *)(x + 2*n) ); in neon_fft_5() 59 float32x4_t x3 = vld1q_f32( (float *)(x + 3*n) ); in neon_fft_5() 60 float32x4_t x4 = vld1q_f32( (float *)(x + 4*n) ); in neon_fft_5() 115 const struct lc3_complex *x, struct lc3_complex *y, int n) in neon_fft_bf3() argument 123 const struct lc3_complex *x1_ptr = x0_ptr + n*n3; in neon_fft_bf3() 124 const struct lc3_complex *x2_ptr = x1_ptr + n*n3; in neon_fft_bf3() [all …]
|
D | energy.c | 54 int n = ie - i; in lc3_energy_compute() local 60 *e = sx2 / n; in lc3_energy_compute()
|
D | spec.c | 286 const uint16_t *x, int *n, int nbits_budget, bool *p_lsb_mode) in compute_nbits() argument 308 for ( ; i < LC3_MIN(*n, (ne + 2) >> (1 - h)) in compute_nbits() 362 *n = n_end; in compute_nbits() 540 lc3_bits_t *bits, int nbits, const uint16_t *x, int n, const float *xf) in put_residual() argument 542 for (int i = 0; i < n && nbits > 0; i++) { in put_residual() 588 lc3_bits_t *bits, int nbits, const uint16_t *x, int n) in put_lsb() argument 590 for (int i = 0; i < n && nbits > 0; i += 2) { in put_lsb() 673 int i, n = 0, z = 0; in estimate_noise() local 678 sum += fabsf(x[i - w]), n++; in estimate_noise() 683 sum += fabsf(x[i - w]), n++; in estimate_noise() [all …]
|
D | bwdet.c | 68 int n = ie - i; in lc3_bwdet_run() local 74 if (se >= (10 << (bw == LC3_BANDWIDTH_NB)) * n) in lc3_bwdet_run()
|
D | sns.c | 394 LC3_HOT static void add_pulse(const float *x, int *y, int n, in add_pulse() argument 402 for (int i = 1; i < n; i++) { in add_pulse() 565 static void enum_mvpq(const int *c, int n, int *idx, bool *ls) in enum_mvpq() argument 571 for (i = 0, c += n; (ci = *(--c)) == 0 ; i++); in enum_mvpq() 578 for (i++, j = LC3_ABS(ci); i < n; i++, j += LC3_ABS(ci)) { in enum_mvpq() 595 static void deenum_mvpq(int idx, bool ls, int npulses, int *c, int n) in deenum_mvpq() argument 601 for (i = n-1; i >= 0 && idx; i--) { in deenum_mvpq()
|
D | tns.c | 42 LC3_HOT static inline float dot(const float *a, const float *b, int n) in dot() argument 46 while (n--) in dot()
|
/liblc3-3.7.0-3.6.0/tables/ |
D | mktables.py | 101 for n in (10, 20, 30, 40, 60, 80, 90, 120, 160, 180, 240): 103 print('\n--- fft bf2 twiddles {:3d} ---'.format(n)) 105 kv = -2 * np.pi * np.arange(n // 2) / n 110 for n in (15, 45): 112 print('\n--- fft bf3 twiddles {:3d} ---'.format(n)) 114 kv = -2 * np.pi * np.arange(n) / n 123 for n in (120, 160, 240, 320, 360, 480, 640, 720, 960): 125 print('\n--- mdct rot twiddles {:3d} ---'.format(n)) 127 kv = 2 * np.pi * (np.arange(n // 4) + 1/8) / n 128 scale = np.sqrt( np.sqrt( 4 / n ) )
|
/liblc3-3.7.0-3.6.0/test/ |
D | ltpf.py | 33 self.n = ((T.DT_MS[dt] * 128) / 10).astype(int) 37 self.u = np.zeros(self.n + 2) 38 self.y = np.zeros(self.n + self.d + history) 45 n = self.n 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] 68 for i in range(n): [all …]
|
D | mdct.py | 54 n = len(t) 55 n2 = n // 2 57 z = t * np.exp(-2j * np.pi * np.arange(n) / (2*n)) 75 n = len(x) 78 z = x * np.exp(2j * np.pi * (n/2 + 0.5) * np.arange(2*n) / (2*n)) 79 z = scipy.fft.ifft(z) * n 80 z = z * np.exp(2j * np.pi * (np.arange(2*n) + (n/2 + 0.5)) / (4*n)) 81 t = np.real(z) * np.sqrt(2/n)
|
D | spec.py | 149 for n in range(0, lastnz, 2): 151 if n > len(x) // 2: 154 a = abs(x[n ]) 155 b = abs(x[n+1]) 172 a_lsb = abs(x[n ]) 173 b_lsb = abs(x[n+1]) 178 nbits_lsb += int(a_lsb == 0 and x[n ] != 0) 179 nbits_lsb += int(b_lsb == 0 and x[n+1] != 0) 181 if (x[n] != 0 or x[n+1] != 0) and \ 183 lastnz_trunc = n + 2; [all …]
|
D | ctypes.h | 41 #define to_1d_ptr(obj, t, n, ptr) \ argument 42 __to_1d_ptr(obj, t, n, (void **)(ptr)) 47 #define to_1d_copy(obj, t, ptr, n) \ argument 48 __to_1d_copy(obj, t, ptr, n) 61 #define new_1d_ptr(t, n, ptr) \ argument 62 __new_1d_ptr(t, n, (void **)(ptr)) 67 #define new_1d_copy(t, n, src) \ argument 68 __new_1d_copy(t, n, src) 90 static PyObject *__to_1d_ptr(PyObject *obj, int t, int n, void **ptr) in __to_1d_ptr() argument 94 if (!obj || (n && PyArray_SIZE((PyArrayObject *)obj) != n)) in __to_1d_ptr() [all …]
|
D | ltpf_py.c | 41 int n = dt == LC3_DT_7M5 ? 96 : 128; in resample_py() local 46 resample_12k8[sr](&hp50, x + nt, y + (ny - n), n); in resample_py()
|
D | sns.py | 156 for (n, vn) in enumerate(v[::-1]): 163 index += T.SNS_MPVQ_OFFSETS[n][x] 346 def deenum_mpvq(self, index, ls, npulses, n): argument 348 y = np.zeros(n, dtype=np.intc)
|
/liblc3-3.7.0-3.6.0/test/neon/ |
D | neon.h | 103 static int16x4_t vext_s16(int16x4_t a, int16x4_t b, const int n) in vext_s16() argument 108 return (int16x4_t){ { x[n], x[n+1], x[n+2], x[n+3] } }; in vext_s16()
|