Home
last modified time | relevance | path

Searched refs:b (Results 1 – 23 of 23) sorted by relevance

/liblc3-latest/test/neon/
Dneon.h55 static int32x4_t vmull_s16(int16x4_t a, int16x4_t b) in vmull_s16() argument
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()
62 static int32x4_t vmlal_s16(int32x4_t r, int16x4_t a, int16x4_t b) in vmlal_s16() argument
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()
70 static int64x2_t vpadalq_s32(int64x2_t a, int32x4_t b) in vpadalq_s32() argument
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()
103 static int16x4_t vext_s16(int16x4_t a, int16x4_t b, const int n) in vext_s16() argument
[all …]
Dltpf_neon.c30 void lc3_put_bits_generic(lc3_bits_t *a, unsigned b, int c) in lc3_put_bits_generic() argument
31 { (void)a, (void)b, (void)c; } in lc3_put_bits_generic()
33 unsigned lc3_get_bits_generic(struct lc3_bits *a, int b) in lc3_get_bits_generic() argument
34 { return (void)a, (void)b, 0; } in lc3_get_bits_generic()
81 int16_t alignas(4) a[500], b[500]; in check_correlate()
86 b[i] = rand() & 0xffff; in check_correlate()
89 correlate(a, b+200, 128, y, 100); in check_correlate()
90 neon_correlate(a, b+200, 128, y_neon, 100); in check_correlate()
94 correlate(a, b+199, 128, y, 99); in check_correlate()
95 neon_correlate(a, b+199, 128, y_neon, 99); in check_correlate()
/liblc3-latest/test/arm/
Dsimd32.h23 static inline int16x2_t __pkhbt(int16x2_t a, int16x2_t b) in __pkhbt() argument
26 __asm("pkhbt %0, %1, %2" : "=r" (r) : "r" (a), "r" (b)); in __pkhbt()
37 static int16x2_t __pkhbt(int16x2_t a, int16x2_t b) in __pkhbt() argument
40 uint32_t b_top = (uint32_t)b & 0xffff0000u; in __pkhbt()
46 static int32_t __smlad(int16x2_t a, int16x2_t b, int32_t u) in __smlad() argument
49 int16_t b_hi = b >> 16, b_lo = b & 0xffff; in __smlad()
55 static int64_t __smlald(int16x2_t a, int16x2_t b, int64_t u) in __smlald() argument
58 int16_t b_hi = b >> 16, b_lo = b & 0xffff; in __smlald()
63 static int64_t __smlaldx(int16x2_t a, int16x2_t b, int64_t u) in __smlaldx() argument
66 int16_t b_hi = b >> 16, b_lo = b & 0xffff; in __smlaldx()
Dltpf_arm.c30 void lc3_put_bits_generic(lc3_bits_t *a, unsigned b, int c) in lc3_put_bits_generic() argument
31 { (void)a, (void)b, (void)c; } in lc3_put_bits_generic()
33 unsigned lc3_get_bits_generic(struct lc3_bits *a, int b) in lc3_get_bits_generic() argument
34 { return (void)a, (void)b, 0; } in lc3_get_bits_generic()
77 int16_t alignas(4) a[500], b[500]; in check_correlate()
82 b[i] = rand() & 0xffff; in check_correlate()
85 correlate(a, b+200, 128, y, 100); in check_correlate()
86 arm_correlate(a, b+200, 128, y_arm, 100); in check_correlate()
90 correlate(a, b+199, 128, y, 99); in check_correlate()
91 arm_correlate(a, b+199, 128, y_arm, 99); in check_correlate()
[all …]
/liblc3-latest/src/
Dcommon.h47 #define LC3_IF_PLUS(a, b) (a) argument
49 #define LC3_IF_PLUS(a, b) (b) argument
53 #define LC3_IF_PLUS_HR(a, b) (a) argument
55 #define LC3_IF_PLUS_HR(a, b) (b) argument
85 #define LC3_MIN(a, b) ( (a) < (b) ? (a) : (b) ) argument
86 #define LC3_MAX(a, b) ( (a) > (b) ? (a) : (b) ) argument
Dltpf_neon.h195 LC3_HOT static inline float neon_dot(const int16_t *a, const int16_t *b, int n) in neon_dot() argument
202 u = vmull_s16( vld1_s16(a), vld1_s16(b)), a += 4, b += 4; in neon_dot()
203 u = vmlal_s16(u, vld1_s16(a), vld1_s16(b)), a += 4, b += 4; in neon_dot()
206 u = vmull_s16( vld1_s16(a), vld1_s16(b)), a += 4, b += 4; in neon_dot()
207 u = vmlal_s16(u, vld1_s16(a), vld1_s16(b)), a += 4, b += 4; in neon_dot()
227 const int16_t *a, const int16_t *b, int n, float *y, int nc) in neon_correlate() argument
229 for ( ; nc >= 4; nc -= 4, b -= 4) { in neon_correlate()
231 const int16_t *bn = (const int16_t *)b; in neon_correlate()
273 *(y++) = neon_dot(a, b--, n); in neon_correlate()
Dspec.c348 uint32_t b = fabsf(x[i+1]) + xq_off; in compute_nbits() local
354 int s = (a != 0) + (b != 0); in compute_nbits()
363 uint32_t m = (a | b) >> 2; in compute_nbits()
370 nbits_lsb += 2 + (a == 1) + (b == 1); in compute_nbits()
378 b >>= k; in compute_nbits()
385 nbits += lc3_spectrum_bits[lut[k]][a + 4*b]; in compute_nbits()
394 state = (state << 4) + (k > 1 ? 12 + k : 1 + (a + b) * (k + 1)); in compute_nbits()
437 uint32_t b = fabsf(x[i+1]) + xq_off; in put_quantized() local
446 uint32_t m = (a | b) >> 2; in put_quantized()
457 lc3_put_bit(bits, (b >> k) & 1); in put_quantized()
[all …]
Dltpf_arm.h25 static inline int16x2_t __pkhbt(int16x2_t a, int16x2_t b) in __pkhbt() argument
28 __asm("pkhbt %0, %1, %2" : "=r" (r) : "r" (a), "r" (b)); in __pkhbt()
460 const int16_t *a, const int16_t *b, int n, float *y, int nc) in arm_correlate() argument
464 if ((uintptr_t)b & 3) in arm_correlate()
465 *(y++) = dot(a, b--, n), nc--; in arm_correlate()
471 const int16x2_t *bn = (const int16x2_t *)(b--); in arm_correlate()
476 b1 = (int16x2_t)*(b--) << 16; in arm_correlate()
497 *(y++) = dot(a, b, n); in arm_correlate()
Dtns.c42 LC3_HOT static inline float dot(const float *a, const float *b, int n) in dot() argument
47 v += *(a++) * *(b++); in dot()
214 float e, b[2][7], *b0, *b1; in lpc_reflection() local
219 b1 = b[1]; in lpc_reflection()
224 b0 = b1, b1 = b[k & 1]; in lpc_reflection()
Dltpf.c438 LC3_HOT static inline float dot(const int16_t *a, const int16_t *b, int n) in dot() argument
444 v += *(a++) * *(b++); in dot()
461 const int16_t *a, const int16_t *b, int n, float *y, int nc) in correlate() argument
464 *(y++) = dot(a, b--, n); in correlate()
/liblc3-latest/test/
Dencoder.py77 b = bitstream.BitstreamWriter(nbytes)
79 self.bwdet.store(b)
81 self.spec.store(b)
83 self.tns.store(b)
85 b.write_bit(pitch_present)
87 self.sns.store(b)
90 self.ltpf.store(b)
92 self.spec.encode(b)
94 return b.terminate()
Ddecoder.py52 b = bitstream.BitstreamReader(data)
54 bw = self.bwdet.get(b)
58 self.spec.load(b)
60 self.tns.load(b, bw, len(data))
62 pitch = b.read_bit()
64 self.sns.load(b)
67 self.ltpf.load(b)
71 x = self.spec.decode(b, bw, len(data))
Dsns.py96 for b in range(nb):
97 y[I[b]:I[b+1]] = x[I[b]:I[b+1]] * g_sns[b]
340 def store(self, b): argument
346 b.write_uint(self.ind_lf, 5)
347 b.write_uint(self.ind_hf, 5)
349 b.write_bit(shape >> 1)
351 b.write_uint(self.gain >> gain_lsb_bits, gain_msb_bits)
353 b.write_bit(self.ls_a)
371 b.write_uint(index_joint, 14 - gain_msb_bits)
372 b.write_uint(index_joint >> (14 - gain_msb_bits), 12)
[all …]
Dspec.py188 b = abs(x[n+1])
190 while max(a, b) >= 4:
199 b >>= 1
203 T.AC_SPEC_BITS[T.AC_SPEC_LOOKUP[t + lev*1024]][a + 4*b]
219 t = 1 + (a + b) * (lev + 1) if lev <= 1 else 12 + lev
244 b = T2[sr] / 48
245 delta = a + (nbits - T1[sr]) * (b - a) / (T2[sr] - T1[sr])
350 def store(self, b): argument
355 b.write_uint((self.lastnz >> 1) - 1, nbits_lastnz)
356 b.write_uint(self.lsb_mode, 1)
[all …]
Dbwdet.py88 def store(self, b): argument
90 b.write_uint(self.bw, self.get_nbits())
92 def get(self, b): argument
94 return b.read_uint(self.get_nbits())
Dtns.py192 b = a.copy()
195 rc[k-1] = b[k]
197 b[1:k] = (b[1:k] - rc[k-1] * b[k-1:0:-1]) / e
273 def store(self, b): argument
280 b.write_bit(min(rc_order, 1))
283 b.ac_encode(
288 b.ac_encode(T.TNS_COEF_CUMFREQ[k][rc[k]],
310 def load(self, b, bw, nbytes): argument
319 if not b.read_bit():
322 rc_order = 1 + b.ac_decode(
[all …]
Dbitstream.py34 b = self.bytes
36 for i in range(0, len(b), 20):
38 for x in b[i:min(i+20, len(b))] ))
Dltpf.py79 b = [ 0.9827947082978771, -1.9655894165957540, 0.9827947082978771 ]
82 self.y[d:d+n] = b[0] * u[2:] + b[1] * u[1:-1] + b[2] * u[:-2]
284 def store(self, b): argument
286 b.write_uint(self.active, 1)
287 b.write_uint(self.pitch_index, 9)
322 def load(self, b): argument
324 self.active[0] = bool(b.read_uint(1))
325 self.pitch_index = b.read_uint(9)
/liblc3-latest/tools/
Ddlc3.c37 #define MIN(a, b) ( (a) < (b) ? (a) : (b) ) argument
41 #define MAX(a, b) ( (a) > (b) ? (a) : (b) ) argument
/liblc3-latest/tables/
Dfastmath.py109 b = k * np.log2(np.ldexp(32 + i+1, -5)) - (i // 16) * (k/2)
112 bn = np.ldexp(b - a, 15) + 0.5
115 int(np.ldexp(b - a, 15) + 0.5)),
/liblc3-latest/
DREADME.md101 $ elc3 <in.wav> -b <bitrate> | dlc3 > <out.wav>
109 $ elc3 <in.wav> -b <bitrate> | dlc3 | aplay -D pipewire
DLICENSE98 (b) You must cause any modified files to carry prominent notices
/liblc3-latest/python/
DLICENSE98 (b) You must cause any modified files to carry prominent notices