Lines Matching refs:nbytes

36     def get_gain_offset(self, nbytes):  argument
41 g_off = (nbytes * 8) // (10 * (1 + sr_ind))
76 def estimate_gain(self, x, nbytes, nbits_spec, nbits_off, g_off): argument
90 bitrate = (8 * nbytes / (dt_ms * 1e-3)).astype(int)
169 def compute_nbits(self, nbytes, x, lastnz, nbits_spec): argument
172 nbytes >= 20 * (3 + min(self.sr, T.SRATE_48K)))]
174 nbytes > 20 * (1 + min(self.sr, T.SRATE_48K)))]
285 def run(self, bw, nbytes, nbits_bw, nbits_ltpf, nbits_sns, nbits_tns, x): argument
297 nbits_ari += 3 + int(hr) + min((8*nbytes - 1) // 1280, 2)
299 nbits_spec = 8*nbytes - \
311 g_off = self.get_gain_offset(nbytes)
314 self.estimate_gain(x, nbytes, nbits_spec, nbits_off, g_off)
323 self.compute_nbits(nbytes, xq, lastnz, nbits_spec)
335 self.compute_nbits(nbytes, xq, lastnz, nbits_spec)
479 def decode(self, bits, bw, nbytes): argument
490 nbytes > 20 * (1 + min(self.sr, T.SRATE_48K)))]
607 g_int = self.get_gain_offset(nbytes) + self.g_idx
630 nbytes = 20 + int(rng.random() * 100)
631 nbits_budget = 8 * nbytes - int(rng.random() * 100)
636 analysis.estimate_gain(x, nbytes, nbits_budget, nbits_off, g_off)
639 dt, sr, x, nbytes, nbits_budget, nbits_off, -g_off)
659 nbytes = 20 + int(rng.random() * 30)
675 for nbytes in range(20, 150):
677 nbits_budget = nbytes * 8 - int(rng.random() * 100)
687 analysis.compute_nbits(nbytes, xq, nq, nbits_budget)
690 lc3.spec_compute_nbits(dt, sr, nbytes, xq, nq, 0)
693 lc3.spec_compute_nbits(dt, sr, nbytes, xq, nq, nbits_budget)
733 nbytes = 100
745 tns.run(x[:ne], sr, False, nbytes)
748 (xq, nq, xg) = analysis.run(sr, nbytes,
753 nbytes, pitch_present, tns.get_data(), state_c, x[:ne])