/liblc3-3.5.0-3.4.0/src/ |
D | bits.h | 132 void lc3_setup_bits(lc3_bits_t *bits, 140 int lc3_get_bits_left(const lc3_bits_t *bits); 147 int lc3_check_bits(const lc3_bits_t *bits); 154 static inline void lc3_put_bit(lc3_bits_t *bits, int v); 161 static inline void lc3_put_bits(lc3_bits_t *bits, unsigned v, int n); 168 static inline void lc3_put_symbol(lc3_bits_t *bits, 175 void lc3_flush_bits(lc3_bits_t *bits); 181 static inline int lc3_get_bit(lc3_bits_t *bits); 189 static inline unsigned lc3_get_bits(lc3_bits_t *bits, int n); 197 static inline unsigned lc3_get_symbol(lc3_bits_t *bits, [all …]
|
D | bits.c | 60 static int get_bits_left(const struct lc3_bits *bits) in get_bits_left() argument 62 const struct lc3_bits_buffer *buffer = &bits->buffer; in get_bits_left() 63 const struct lc3_bits_accu *accu = &bits->accu; in get_bits_left() 64 const struct lc3_bits_ac *ac = &bits->ac; in get_bits_left() 67 (bits->mode == LC3_BITS_MODE_READ ? LC3_ACCU_BITS/8 : 0); in get_bits_left() 70 (bits->mode == LC3_BITS_MODE_READ ? LC3_AC_BITS/8 : 0); in get_bits_left() 80 void lc3_setup_bits(struct lc3_bits *bits, in lc3_setup_bits() argument 83 *bits = (struct lc3_bits){ in lc3_setup_bits() 99 struct lc3_bits_ac *ac = &bits->ac; in lc3_setup_bits() 100 struct lc3_bits_accu *accu = &bits->accu; in lc3_setup_bits() [all …]
|
D | spec.c | 383 LC3_HOT static void put_quantized(lc3_bits_t *bits, in put_quantized() argument 413 lc3_put_symbol(bits, in put_quantized() 417 lc3_put_bit(bits, (a >> k) & 1); in put_quantized() 418 lc3_put_bit(bits, (b >> k) & 1); in put_quantized() 419 lc3_put_symbol(bits, in put_quantized() 432 if (a) lc3_put_bit(bits, x[i+0] & 1); in put_quantized() 433 if (b) lc3_put_bit(bits, x[i+1] & 1); in put_quantized() 440 lc3_put_symbol(bits, lc3_spectrum_models + lut[k], a + 4*b); in put_quantized() 458 LC3_HOT static int get_quantized(lc3_bits_t *bits, in get_quantized() argument 486 unsigned s = lc3_get_symbol(bits, lc3_spectrum_models + lut[k]); in get_quantized() [all …]
|
D | spec.h | 72 void lc3_spec_put_side(lc3_bits_t *bits, 87 void lc3_spec_encode(lc3_bits_t *bits, 103 int lc3_spec_get_side(lc3_bits_t *bits, 115 int lc3_spec_decode(lc3_bits_t *bits, enum lc3_dt dt, enum lc3_srate sr,
|
D | lc3.c | 306 lc3_bits_t bits; in encode() local 308 lc3_setup_bits(&bits, LC3_BITS_MODE_WRITE, buffer, nbytes); in encode() 310 lc3_bwdet_put_bw(&bits, sr, bw); in encode() 312 lc3_spec_put_side(&bits, dt, sr, &side->spec); in encode() 314 lc3_tns_put_data(&bits, &side->tns); in encode() 316 lc3_put_bit(&bits, side->pitch_present); in encode() 318 lc3_sns_put_data(&bits, &side->sns); in encode() 321 lc3_ltpf_put_data(&bits, &side->ltpf); in encode() 323 lc3_spec_encode(&bits, in encode() 326 lc3_flush_bits(&bits); in encode() [all …]
|
D | bwdet.c | 110 void lc3_bwdet_put_bw(lc3_bits_t *bits, in lc3_bwdet_put_bw() argument 115 lc3_put_bits(bits, bw, nbits_bw); in lc3_bwdet_put_bw() 121 int lc3_bwdet_get_bw(lc3_bits_t *bits, 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()
|
D | sns.c | 786 void lc3_sns_put_data(lc3_bits_t *bits, const struct lc3_sns_data *data) in lc3_sns_put_data() argument 790 lc3_put_bits(bits, data->lfcb, 5); in lc3_sns_put_data() 791 lc3_put_bits(bits, data->hfcb, 5); in lc3_sns_put_data() 798 lc3_put_bit(bits, shape_msb); in lc3_sns_put_data() 808 lc3_put_bits(bits, data->gain >> submode, 1); in lc3_sns_put_data() 809 lc3_put_bits(bits, data->ls_a, 1); in lc3_sns_put_data() 810 lc3_put_bits(bits, mux_code, 25); in lc3_sns_put_data() 819 lc3_put_bits(bits, data->gain >> submode, 2); in lc3_sns_put_data() 820 lc3_put_bits(bits, data->ls_a, 1); in lc3_sns_put_data() 821 lc3_put_bits(bits, mux_code, 24); in lc3_sns_put_data() [all …]
|
D | bwdet.h | 55 void lc3_bwdet_put_bw(lc3_bits_t *bits, 65 int lc3_bwdet_get_bw(lc3_bits_t *bits,
|
D | sns.h | 75 void lc3_sns_put_data(lc3_bits_t *bits, const lc3_sns_data_t *data); 88 int lc3_sns_get_data(lc3_bits_t *bits, lc3_sns_data_t *data);
|
D | ltpf.h | 81 void lc3_ltpf_put_data(lc3_bits_t *bits, const lc3_ltpf_data_t *data); 92 void lc3_ltpf_get_data(lc3_bits_t *bits, lc3_ltpf_data_t *data);
|
D | tns.h | 72 void lc3_tns_put_data(lc3_bits_t *bits, const lc3_tns_data_t *data); 86 void lc3_tns_get_data(lc3_bits_t *bits,
|
D | tns.c | 417 void lc3_tns_put_data(lc3_bits_t *bits, const struct lc3_tns_data *data) in lc3_tns_put_data() argument 422 lc3_put_bits(bits, rc_order > 0, 1); in lc3_tns_put_data() 426 lc3_put_symbol(bits, in lc3_tns_put_data() 430 lc3_put_symbol(bits, in lc3_tns_put_data() 438 void lc3_tns_get_data(lc3_bits_t *bits, in lc3_tns_get_data() argument 446 data->rc_order[f] = lc3_get_bit(bits); in lc3_tns_get_data() 450 data->rc_order[f] += lc3_get_symbol(bits, in lc3_tns_get_data() 454 data->rc[f][i] = (int)lc3_get_symbol(bits, in lc3_tns_get_data()
|
D | makefile.mk | 19 $(SRC_DIR)/bits.c \
|
D | ltpf.c | 879 void lc3_ltpf_put_data(lc3_bits_t *bits, in lc3_ltpf_put_data() argument 882 lc3_put_bit(bits, data->active); in lc3_ltpf_put_data() 883 lc3_put_bits(bits, data->pitch_index, 9); in lc3_ltpf_put_data() 889 void lc3_ltpf_get_data(lc3_bits_t *bits, struct lc3_ltpf_data *data) in lc3_ltpf_get_data() argument 891 data->active = lc3_get_bit(bits); in lc3_ltpf_get_data() 892 data->pitch_index = lc3_get_bits(bits, 9); in lc3_ltpf_get_data()
|
D | meson.build | 19 'bits.c',
|
/liblc3-3.5.0-3.4.0/test/ |
D | bitstream.py | 187 bits = 1 188 while self.range >> (24 - bits) == 0: 189 bits += 1 191 mask = 0xffffff >> bits; 204 bits += 1 212 while bits > 0: 214 bits -= 8 215 bits += 8; 228 val = 0xff >> (8 - bits) 231 for k in range(bits):
|
D | spec.py | 316 def encode(self, bits): argument 320 bits.write_uint(self.noise_factor, 3) 339 bits.ac_encode( 347 bits.write_bit(a & 1) 348 bits.write_bit(b & 1) 354 bits.ac_encode( 373 bits.write_bit(int(x[n+0] < 0)) 376 bits.write_bit(int(x[n+1] < 0)) 384 nbits_residual = min(bits.get_bits_left(), self.nbits_residual_max) 391 bits.write_bit(self.xg[i] >= self.xq[i]) [all …]
|