Home
last modified time | relevance | path

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

/liblc3-3.5.0-3.4.0/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-3.5.0-3.4.0/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-3.5.0-3.4.0/src/
Dcommon.h64 #define LC3_MIN(a, b) ( (a) < (b) ? (a) : (b) ) argument
65 #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.c310 uint16_t a = x[i] >> 1, b = x[i+1] >> 1; in compute_nbits() local
314 int s = (a > 0) + (b > 0); in compute_nbits()
324 int m = (a | b) >> 2; in compute_nbits()
330 nbits_lsb += 2 + (a == 1) + (b == 1); in compute_nbits()
338 b >>= k; 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()
400 uint16_t a = x[i] >> 1, b = x[i+1] >> 1; in put_quantized() local
407 int m = (a | b) >> 2; in put_quantized()
418 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()
168 float e, b[2][7], *b0, *b1; in lpc_reflection() local
173 b1 = b[1]; in lpc_reflection()
178 b0 = b1, b1 = b[k & 1]; in lpc_reflection()
Dltpf.c389 LC3_HOT static inline float dot(const int16_t *a, const int16_t *b, int n) in dot() argument
395 v += *(a++) * *(b++); in dot()
412 const int16_t *a, const int16_t *b, int n, float *y, int nc) in correlate() argument
415 *(y++) = dot(a, b--, n); in correlate()
/liblc3-3.5.0-3.4.0/test/
Ddecoder.py55 b = bitstream.BitstreamReader(data)
57 bw = self.bwdet.get(b)
61 self.spec.load(b)
63 self.tns.load(b, bw, len(data))
65 pitch = b.read_bit()
67 self.sns.load(b)
70 self.ltpf.load(b)
74 x = self.spec.decode(b, bw, len(data))
Dencoder.py80 b = bitstream.BitstreamWriter(nbytes)
82 self.bwdet.store(b)
84 self.spec.store(b)
86 self.tns.store(b)
88 b.write_bit(pitch_present)
90 self.sns.store(b)
93 self.ltpf.store(b)
95 self.spec.encode(b)
97 return b.terminate()
Dsns.py80 for b in range(len(g_sns)):
81 y[I[b]:I[b+1]] = x[I[b]:I[b+1]] * g_sns[b]
305 def store(self, b): argument
311 b.write_uint(self.ind_lf, 5)
312 b.write_uint(self.ind_hf, 5)
314 b.write_bit(shape >> 1)
316 b.write_uint(self.gain >> gain_lsb_bits, gain_msb_bits)
318 b.write_bit(self.ls_a)
336 b.write_uint(index_joint, 14 - gain_msb_bits)
337 b.write_uint(index_joint >> (14 - gain_msb_bits), 12)
[all …]
Dspec.py155 b = abs(x[n+1])
157 while max(a, b) >= 4:
166 b >>= 1
170 T.AC_SPEC_BITS[T.AC_SPEC_LOOKUP[t + lev*1024]][a + 4*b]
186 t = 1 + (a + b) * (lev + 1) if lev <= 1 else 12 + lev;
210 b = T2[sr] / 48
211 delta = a + (nbits - T1[sr]) * (b - a) / (T2[sr] - T1[sr])
307 def store(self, b): argument
312 b.write_uint((self.lastnz >> 1) - 1, nbits_lastnz)
313 b.write_uint(self.lsb_mode, 1)
[all …]
Dtns.py144 b = a.copy()
147 rc[k-1] = b[k]
149 b[1:k] = (b[1:k] - rc[k-1] * b[k-1:0:-1]) / e
221 def store(self, b): argument
228 b.write_bit(min(rc_order, 1))
231 b.ac_encode(
236 b.ac_encode(T.TNS_COEF_CUMFREQ[k][rc[k]],
258 def load(self, b, bw, nbytes): argument
267 if not b.read_bit():
270 rc_order = 1 + b.ac_decode(
[all …]
Dbwdet.py84 def store(self, b): argument
86 b.write_uint(self.bw, self.get_nbits())
88 def get(self, b): argument
90 return b.read_uint(self.get_nbits())
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]
277 def store(self, b): argument
279 b.write_uint(self.active, 1)
280 b.write_uint(self.pitch_index, 9)
315 def load(self, b): argument
317 self.active[0] = bool(b.read_uint(1))
318 self.pitch_index = b.read_uint(9)
/liblc3-3.5.0-3.4.0/tools/
Ddlc3.c35 #define MIN(a, b) ( (a) < (b) ? (a) : (b) ) argument
39 #define MAX(a, b) ( (a) > (b) ? (a) : (b) ) argument
/liblc3-3.5.0-3.4.0/tables/
Dfastmath.py101 b = k * np.log2(np.ldexp(32 + i+1, -5)) - (i // 16) * (k/2);
104 bn = np.ldexp(b - a, 15) + 0.5
107 int(np.ldexp(b - a, 15) + 0.5)),
/liblc3-3.5.0-3.4.0/
DREADME.md66 $ ./elc3 <in.wav> -b <bitrate> | ./dlc3 > <out.wav>
72 $ ./elc3 <in.wav> -b <bitrate> | ./dlc3 | aplay
DLICENSE98 (b) You must cause any modified files to carry prominent notices