/liblc3-3.5.0-3.4.0/src/ |
D | tns.c | 98 for (int k = 0; k < 9; k++) in compute_lpc_coeffs() local 99 c[k][s] = dot(xs, xs + k, (xe - xs) - k); in compute_lpc_coeffs() 105 for (int k = 1; k < 9; k++) in compute_lpc_coeffs() local 106 r[f][k] = e0 == 0 || e1 == 0 || e2 == 0 ? 0 : in compute_lpc_coeffs() 107 (c[k][0]/e0 + c[k][1]/e1 + c[k][2]/e2) * lag_window[k]; in compute_lpc_coeffs() 119 for (int k = 1; k < 9; ) { in compute_lpc_coeffs() local 121 rc = -r[f][k]; in compute_lpc_coeffs() 122 for (int i = 1; i < k; i++) in compute_lpc_coeffs() 123 rc -= a0[i] * r[f][k-i]; in compute_lpc_coeffs() 128 for (int i = 1; i < k; i++) in compute_lpc_coeffs() [all …]
|
D | spec.c | 323 int k = 0; in compute_nbits() local 329 nbits += lc3_spectrum_bits[lut[k++]][16] - 2*2048; in compute_nbits() 333 for (m >>= lsb_mode; m; m >>= 1, k++) in compute_nbits() 334 nbits += lc3_spectrum_bits[lut[LC3_MIN(k, 3)]][16]; in compute_nbits() 336 nbits += k * 2*2048; in compute_nbits() 337 a >>= k; in compute_nbits() 338 b >>= k; in compute_nbits() 340 k = LC3_MIN(k, 3); in compute_nbits() 345 nbits += lc3_spectrum_bits[lut[k]][a + 4*b]; in compute_nbits() 354 state = (state << 4) + (k > 1 ? 12 + k : 1 + (a + b) * (k + 1)); in compute_nbits() [all …]
|
D | ltpf.c | 195 for (int k = 0; k < w; k += 10) { in resample_x64k_12k8() local 239 for (int k = 0; k < w; k += 15) { in resample_x192k_12k8() local 720 for (int k = 0; k <= j; k++) in synthesize_template() local 721 u[j-k] -= yi * c[k]; in synthesize_template() 723 for (int k = 0; k <= j; k++) in synthesize_template() local 724 u[j-k] += xi * c[w+k]; in synthesize_template() 737 for (int k = 0; k < w; k++) in synthesize_template() local 738 u[(j+(w-1)-k)%w] -= yi * c[k]; in synthesize_template() 740 for (int k = 0; k < w; k++) in synthesize_template() local 741 u[(j+(w-1)-k)%w] += xi * c[w+k]; in synthesize_template()
|
D | ltpf_arm.h | 61 for (int k = 0; k < w; k += 5) { in arm_resample_x64k_12k8() local 92 for (int k = 0; k < w; k += 15) { in arm_resample_x192k_12k8() local
|
D | sns.c | 397 for (int k = start; k < end; k++) { in add_pulse() local
|
/liblc3-3.5.0-3.4.0/tables/ |
D | mktables.py | 106 for (i, k) in enumerate(kv): 107 print('{{ {:14.7e}, {:14.7e} }},'.format(np.cos(k), np.sin(k)), 115 for k in kv: 118 np.cos(k), np.sin(k), np.cos(2*k), np.sin(2*k))) 128 for (i, k) in enumerate(kv): 129 print('{{ {:14.7e}, {:14.7e} }},'.format(np.cos(k), np.sin(k)), 179 k = 64 if r & (r-1) else 192 181 p = (192 // k) * (k // sr) 191 for i in range(0, len(h), 192 // k):
|
D | fastmath.py | 97 k = 10 * np.log10(2); 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);
|
/liblc3-3.5.0-3.4.0/test/ |
D | tns.py | 89 nbits_coef = sum([ T.TNS_COEF_BITS[k][rc[k]] 90 for k in range(rc_order) ]) 112 for k in range(len(r) if sum(e) > 0 else 0): 113 c = [ np.dot(x[S[s]:S[s+1]-k], x[S[s]+k:S[s+1]]) 116 r[k] = np.sum( np.array(c) / np.array(e) ) 125 for k in range(1, len(a)): 127 rc = -sum(a[:k] * r[k:0:-1]) / err 129 a[1:k] += rc * a[k-1:0:-1] 130 a[k] = rc 146 for k in range(8, 0, -1): [all …]
|
D | ltpf.py | 71 k = np.arange(-120, 120 + p, p) - f 72 u[2+i] = p * np.dot( x[e:e+w+1], np.take(h, k) ) 165 return [ np.dot(x[:n], np.take(x, np.arange(n) - k)) \ 166 for k in range(k0, 1+k1) ] 168 def norm_corr(self, x, n, k): argument 171 v = np.take(x, np.arange(n) - k) 241 k = np.arange(-2, 3) 242 u = [ np.dot( np.take(x, i-k), np.take(h, 4*k) ) \ 244 v = [ np.dot( np.take(x, i-k), np.take(h, 4*k-f) ) \ 376 for k in range(n0): [all …]
|
D | bitstream.py | 65 for k in range(nbits): 66 val |= self.read_bit() << k 131 for k in range(nbits): 231 for k in range(bits):
|
D | spec.py | 52 i_nf = [ np.all(xq[k-nf_width:min(bw_stop, k+nf_width+1)] == 0) 53 for k in range(nf_start, bw_stop) ] 79 e = [ np.sum(x[4*k:4*(k+1)] ** 2) for k in range(len(x) // 4) ] 418 for k in k_nf: 420 x[k] = [ -l_nf, l_nf ][nf_seed < 0x8000]
|
D | sns.py | 199 for k in range(k0, K): 213 for k in range(sum(y2), K): 235 for k in range(sum(y1), K): 476 for k in data.keys(): 477 ok = ok and data_c[k] == data[k]
|