Home
last modified time | relevance | path

Searched refs:bw (Results 1 – 16 of 16) sorted by relevance

/liblc3-3.5.0-3.4.0/src/
Dbwdet.c66 for (enum lc3_bandwidth bw = bw0; bw < bwn; bw++) { in lc3_bwdet_run() local
67 int i = bwr[bw].is, ie = bwr[bw].ie; in lc3_bwdet_run()
74 if (se >= (10 << (bw == LC3_BANDWIDTH_NB)) * n) in lc3_bwdet_run()
75 bw0 = bw + 1; in lc3_bwdet_run()
111 enum lc3_srate sr, enum lc3_bandwidth bw) in lc3_bwdet_put_bw() argument
115 lc3_put_bits(bits, bw, nbits_bw); in lc3_bwdet_put_bw()
122 enum lc3_srate sr, enum lc3_bandwidth *bw) in lc3_bwdet_get_bw() argument
127 *bw = nbits_bw > 0 ? lc3_get_bits(bits, nbits_bw) : LC3_BANDWIDTH_NB; in lc3_bwdet_get_bw()
128 return *bw > max_bw ? (*bw = max_bw), -1 : 0; in lc3_bwdet_get_bw()
Dtns.c59 enum lc3_dt dt, enum lc3_bandwidth bw, in compute_lpc_coeffs() argument
85 }[dt][bw]; in compute_lpc_coeffs()
87 int nfilters = 1 + (bw >= LC3_BANDWIDTH_SWB); in compute_lpc_coeffs()
256 enum lc3_dt dt, enum lc3_bandwidth bw, in forward_filtering() argument
259 int nfilters = 1 + (bw >= LC3_BANDWIDTH_SWB); in forward_filtering()
260 int nf = LC3_NE(dt, bw) >> (nfilters - 1); in forward_filtering()
297 enum lc3_dt dt, enum lc3_bandwidth bw, in inverse_filtering() argument
300 int nfilters = 1 + (bw >= LC3_BANDWIDTH_SWB); in inverse_filtering()
301 int nf = LC3_NE(dt, bw) >> (nfilters - 1); in inverse_filtering()
339 void lc3_tns_analyze(enum lc3_dt dt, enum lc3_bandwidth bw, in lc3_tns_analyze() argument
[all …]
Dtns.h57 void lc3_tns_analyze(enum lc3_dt dt, enum lc3_bandwidth bw,
87 enum lc3_dt dt, enum lc3_bandwidth bw, int nbytes, lc3_tns_data_t *data);
95 void lc3_tns_synthesize(enum lc3_dt dt, enum lc3_bandwidth bw,
Dbwdet.h56 enum lc3_srate sr, enum lc3_bandwidth bw);
66 enum lc3_srate sr, enum lc3_bandwidth *bw);
Dlc3.c40 enum lc3_bandwidth bw; member
280 side->bw = lc3_bwdet_run(dt, sr, e); in analyze()
284 lc3_tns_analyze(dt, side->bw, nn_flag, nbytes, &side->tns, xf); in analyze()
303 enum lc3_bandwidth bw = side->bw; in encode() local
310 lc3_bwdet_put_bw(&bits, sr, bw); in encode()
324 dt, sr, bw, nbytes, xq, &side->spec, xf); in encode()
531 if ((ret = lc3_bwdet_get_bw(&bits, sr, &side->bw)) < 0) in decode()
537 lc3_tns_get_data(&bits, dt, side->bw, nbytes, &side->tns); in decode()
548 side->bw, nbytes, &side->spec, xf)) < 0) in decode()
578 enum lc3_bandwidth bw = side->bw; in synthesize() local
[all …]
Dspec.h88 enum lc3_dt dt, enum lc3_srate sr, enum lc3_bandwidth bw, int nbytes,
116 enum lc3_bandwidth bw, int nbytes, const lc3_spec_side_t *side, float *x);
Dspec.c664 LC3_HOT static int estimate_noise(enum lc3_dt dt, enum lc3_bandwidth bw, in estimate_noise() argument
667 int bw_stop = (dt == LC3_DT_7M5 ? 60 : 80) * (1 + bw); in estimate_noise()
695 LC3_HOT static void fill_noise(enum lc3_dt dt, enum lc3_bandwidth bw, in fill_noise() argument
698 int bw_stop = (dt == LC3_DT_7M5 ? 60 : 80) * (1 + bw); in fill_noise()
833 enum lc3_dt dt, enum lc3_srate sr, enum lc3_bandwidth bw, int nbytes, in lc3_spec_encode() argument
839 put_noise_factor(bits, estimate_noise(dt, bw, xq, nq, x)); in lc3_spec_encode()
876 enum lc3_dt dt, enum lc3_srate sr, enum lc3_bandwidth bw, in lc3_spec_decode() argument
901 fill_noise(dt, bw, nf, nf_seed, g, x, nq); in lc3_spec_decode()
/liblc3-3.5.0-3.4.0/test/
Dbwdet.py57 for bw in range(sr):
58 i0 = BW_START[dt][sr][bw]
59 i1 = BW_STOP[dt][sr][bw]
60 if np.mean(e[i0:i1+1]) >= TQ[bw]:
61 bw0 = bw + 1
65 bw = bw0
74 bw = sr
76 self.bw = bw
77 return self.bw
86 b.write_uint(self.bw, self.get_nbits())
[all …]
Dtns_py.c29 unsigned dt, bw; in compute_lpc_coeffs_py() local
32 if (!PyArg_ParseTuple(args, "IIO", &dt, &bw, &x_obj)) in compute_lpc_coeffs_py()
36 CTYPES_CHECK("sr", (unsigned)bw < LC3_NUM_BANDWIDTH); in compute_lpc_coeffs_py()
38 int ne = LC3_NE(dt, bw); in compute_lpc_coeffs_py()
45 compute_lpc_coeffs(dt, bw, x, g, a); in compute_lpc_coeffs_py()
107 unsigned dt, bw; in analyze_py() local
112 if (!PyArg_ParseTuple(args, "IIpIO", &dt, &bw, &nn_flag, &nbytes, &x_obj)) in analyze_py()
116 CTYPES_CHECK("bw", (unsigned)bw < LC3_NUM_BANDWIDTH); in analyze_py()
118 int ne = LC3_NE(dt, bw); in analyze_py()
122 lc3_tns_analyze(dt, bw, nn_flag, nbytes, &data, x); in analyze_py()
[all …]
Ddecoder.py57 bw = self.bwdet.get(b)
58 if bw > self.sr:
63 self.tns.load(b, bw, len(data))
74 x = self.spec.decode(b, bw, len(data))
76 return (x, bw, pitch)
78 def synthesize(self, x, bw, pitch, nbytes): argument
80 x = self.tns.run(x, bw)
93 (x, bw, pitch) = self.decode(data)
95 x = self.synthesize(x, bw, pitch, len(data))
Dtns.py103 def compute_lpc_coeffs(self, bw, f, x): argument
107 S = Tns.SUB_LIM[self.dt][bw][f]
183 def run(self, x, bw, nn_flag, nbytes): argument
188 self.nfilters = len(Tns.SUB_LIM[self.dt][bw])
195 (pred_gain, a) = self.compute_lpc_coeffs(bw, f, x)
213 i0 = Tns.FREQ_LIM[self.dt][bw][f]
214 i1 = Tns.FREQ_LIM[self.dt][bw][f+1]
258 def load(self, b, bw, nbytes): argument
260 self.nfilters = len(Tns.SUB_LIM[self.dt][bw])
280 def run(self, x, bw): argument
[all …]
Dbwdet_py.c38 int bw = lc3_bwdet_run(dt, sr, e); in bwdet_run_py() local
40 return Py_BuildValue("i", bw); in bwdet_run_py()
Dspec_py.c167 unsigned dt, bw; in estimate_noise_py() local
172 if (!PyArg_ParseTuple(args, "IIOIO", &dt, &bw, &xq_obj, &nq, &x_obj)) in estimate_noise_py()
176 CTYPES_CHECK("bw", (unsigned)bw < LC3_NUM_BANDWIDTH); in estimate_noise_py()
178 int ne = LC3_NE(dt, bw); in estimate_noise_py()
187 int noise_factor = estimate_noise(dt, bw, __xq, nq, x); in estimate_noise_py()
Dspec.py43 def get_noise_indices(self, bw, xq, lastnz): argument
48 bw_stop = int([ 80, 160, 240, 320, 400 ][bw] * (T.DT_MS[self.dt] / 10))
235 def estimate_noise(self, bw, xq, lastnz, x): argument
237 (i_nf, nf_start, nf_stop) = self.get_noise_indices(bw, xq, lastnz)
245 bw, nbytes, nbits_bw, nbits_ltpf, nbits_sns, nbits_tns, x): argument
303 self.noise_factor = self.estimate_noise(bw, xq, lastnz, x)
411 def fill_noise(self, bw, x, lastnz, f_nf, nf_seed): argument
413 (i_nf, nf_start, nf_stop) = self.get_noise_indices(bw, x, lastnz)
436 def decode(self, bits, bw, nbytes): argument
558 x = self.fill_noise(bw, x, self.lastnz, f_nf, nf_seed)
[all …]
Dencoder.py66 bw = self.bwdet.run(e)
70 x = self.tns.run(x, bw, nn_flag, nbytes)
72 (xq, lastnz, x) = self.spec.run(bw, nbytes,
Dctypes.h625 new_scalar(NPY_INT, &(int){ side->bw })); in new_side_data()
647 int bw; in to_side_data() local
648 CTYPES_CHECK("frame.bw", to_scalar(item, NPY_INT, &bw)); in to_side_data()
649 side->bw = bw; in to_side_data()