Home
last modified time | relevance | path

Searched refs:data (Results 1 – 21 of 21) sorted by relevance

/liblc3-3.7.0-3.6.0/src/
Dsns.c727 const float *eb, bool att, struct lc3_sns_data *data, in lc3_sns_analyze() argument
742 resolve_codebooks(scf, &data->lfcb, &data->hfcb); in lc3_sns_analyze()
744 quantize(scf, data->lfcb, data->hfcb, in lc3_sns_analyze()
745 c, cn, &data->shape, &data->gain); in lc3_sns_analyze()
747 unquantize(data->lfcb, data->hfcb, in lc3_sns_analyze()
748 cn[data->shape], data->shape, data->gain, scf); in lc3_sns_analyze()
750 enumerate(data->shape, c[data->shape], in lc3_sns_analyze()
751 &data->idx_a, &data->ls_a, &data->idx_b, &data->ls_b); in lc3_sns_analyze()
760 const lc3_sns_data_t *data, const float *x, float *y) in lc3_sns_synthesize() argument
765 deenumerate(data->shape, in lc3_sns_synthesize()
[all …]
Dtns.c340 bool nn_flag, int nbytes, struct lc3_tns_data *data, float *x) in lc3_tns_analyze() argument
352 data->nfilters = 1 + (bw >= LC3_BANDWIDTH_SWB); in lc3_tns_analyze()
353 data->lpc_weighting = resolve_lpc_weighting(dt, nbytes); in lc3_tns_analyze()
357 for (int f = 0; f < data->nfilters; f++) { in lc3_tns_analyze()
359 data->rc_order[f] = 0; in lc3_tns_analyze()
363 if (data->lpc_weighting && pred_gain[f] < 2.f) in lc3_tns_analyze()
368 quantize_rc(rc[f], &data->rc_order[f], data->rc[f]); in lc3_tns_analyze()
369 unquantize_rc(data->rc[f], data->rc_order[f], rc[f]); in lc3_tns_analyze()
372 forward_filtering(dt, bw, data->rc_order, rc, x); in lc3_tns_analyze()
379 const struct lc3_tns_data *data, float *x) in lc3_tns_synthesize() argument
[all …]
Dltpf.h61 lc3_ltpf_analysis_t *ltpf, const int16_t *x, lc3_ltpf_data_t *data);
67 void lc3_ltpf_disable(lc3_ltpf_data_t *data);
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);
107 lc3_ltpf_synthesis_t *ltpf, const lc3_ltpf_data_t *data,
Dtns.h58 bool nn_flag, int nbytes, lc3_tns_data_t *data, float *x);
65 int lc3_tns_get_nbits(const lc3_tns_data_t *data);
72 void lc3_tns_put_data(lc3_bits_t *bits, const lc3_tns_data_t *data);
87 enum lc3_dt dt, enum lc3_bandwidth bw, int nbytes, lc3_tns_data_t *data);
96 const lc3_tns_data_t *data, float *x);
Dsns.h61 const float *eb, bool att, lc3_sns_data_t *data,
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);
100 const lc3_sns_data_t *data, const float *x, float *y);
Dltpf.c613 const int16_t *x, struct lc3_ltpf_data *data) in lc3_ltpf_analyse() argument
651 data->pitch_index = refine_pitch(x_12k8, n_12k8, tc, &pitch); in lc3_ltpf_analyse()
666 data->active = pitch_present && in lc3_ltpf_analyse()
670 data->active = pitch_present && in lc3_ltpf_analyse()
675 ltpf->active = data->active; in lc3_ltpf_analyse()
803 lc3_ltpf_synthesis_t *ltpf, const lc3_ltpf_data_t *data, in lc3_ltpf_synthesize() argument
811 int p_idx = data ? data->pitch_index : 0; in lc3_ltpf_synthesize()
821 bool active = data && data->active && g_idx < 4; in lc3_ltpf_synthesize()
875 void lc3_ltpf_disable(struct lc3_ltpf_data *data) in lc3_ltpf_disable() argument
877 data->active = false; in lc3_ltpf_disable()
[all …]
Dlc3.c517 const void *data, int nbytes, struct side_data *side) in decode() argument
529 lc3_setup_bits(&bits, LC3_BITS_MODE_READ, (void *)data, nbytes); in decode()
/liblc3-3.7.0-3.6.0/test/
Ddecoder.py53 def decode(self, data): argument
55 b = bitstream.BitstreamReader(data)
63 self.tns.load(b, bw, len(data))
74 x = self.spec.decode(b, bw, len(data))
87 x = self.ltpf.run(x, len(data))
91 def run(self, data): argument
93 (x, bw, pitch) = self.decode(data)
95 x = self.synthesize(x, bw, pitch, len(data))
169 data = f_lc3.read(2) variable
170 if len(data) != 2:
[all …]
Dtns_py.c106 struct lc3_tns_data data = { 0 }; in analyze_py() local
122 lc3_tns_analyze(dt, bw, nn_flag, nbytes, &data, x); in analyze_py()
124 return Py_BuildValue("ON", x_obj, new_tns_data(&data)); in analyze_py()
131 struct lc3_tns_data data; in synthesize_py() local
139 CTYPES_CHECK(NULL, data_obj = to_tns_data(data_obj, &data)); in synthesize_py()
145 lc3_tns_synthesize(dt, bw, &data, x); in synthesize_py()
153 struct lc3_tns_data data = { 0 }; in get_nbits_py() local
158 CTYPES_CHECK("data", to_tns_data(data_obj, &data)); in get_nbits_py()
160 int nbits = lc3_tns_get_nbits(&data); in get_nbits_py()
Dencoder.py103 data = self.encode(pitch_present, nbytes)
105 return data
117 data = lc3.encode(enc_c, C.X_PCM[dt][i], C.NBYTES[dt])
118 ok = ok and data == C.BYTES_AC[dt][i]
133 def dump(data): argument
134 for i in range(0, len(data), 20):
136 for x in data[i:min(i+20, len(data))] ))
195 data = enc.run(frame_pcm, frame_nbytes) variable
201 if f_py: f_py.write(data)
Dltpf_py.c57 struct lc3_ltpf_data data = { 0 }; in analyse_py() local
72 lc3_ltpf_analyse(dt, sr, &ltpf, x + nt, &data); in analyse_py()
75 return Py_BuildValue("iN", pitch_present, new_ltpf_data(&data)); in analyse_py()
82 struct lc3_ltpf_data data; in synthesize_py() local
98 CTYPES_CHECK(NULL, data_obj = to_ltpf_data(data_obj, &data)); in synthesize_py()
105 &ltpf, pitch_present ? &data : NULL, x, x + nd); in synthesize_py()
Dctypes.h382 static PyObject *new_ltpf_data(const struct lc3_ltpf_data *data) in new_ltpf_data() argument
387 new_scalar(NPY_BOOL, &data->active)); in new_ltpf_data()
390 new_scalar(NPY_INT, &data->pitch_index)); in new_ltpf_data()
397 PyObject *obj, const struct lc3_ltpf_data *data) in to_ltpf_data() argument
405 to_scalar(item, NPY_BOOL, &data->active)); in to_ltpf_data()
409 to_scalar(item, NPY_INT, &data->pitch_index)); in to_ltpf_data()
419 static PyObject *new_sns_data(const struct lc3_sns_data *data) in new_sns_data() argument
424 new_scalar(NPY_INT, &data->lfcb)); in new_sns_data()
427 new_scalar(NPY_INT, &data->hfcb)); in new_sns_data()
430 new_scalar(NPY_INT, &data->shape)); in new_sns_data()
[all …]
Dsns_py.c141 struct lc3_sns_data data = { 0 }; in analyze_py() local
158 lc3_sns_analyze(dt, sr, eb, att, &data, x, x); in analyze_py()
160 return Py_BuildValue("ON", x_obj, new_sns_data(&data)); in analyze_py()
166 struct lc3_sns_data data; in synthesize_py() local
175 CTYPES_CHECK(NULL, data_obj = to_sns_data(data_obj, &data)); in synthesize_py()
181 lc3_sns_synthesize(dt, sr, &data, x, x); in synthesize_py()
Dsns.py40 data = { 'lfcb' : self.ind_lf, 'hfcb' : self.ind_hf,
45 data.update({ 'idx_b' : self.idx_b, 'ls_b' : self.ls_b })
47 return data
472 data = analysis.get_data()
476 for k in data.keys():
477 ok = ok and data_c[k] == data[k]
540 (x, data) = lc3.sns_analyze(dt, sr, C.E_B[dt][i], False, C.X[dt][i])
541 ok = ok and data['lfcb'] == C.IND_LF[dt][i]
542 ok = ok and data['hfcb'] == C.IND_HF[dt][i]
543 ok = ok and data['shape'] == \
[all …]
Dbitstream.py21 def __init__(self, data): argument
23 self.bytes = data
25 self.bp_bw = len(data) - 1
42 def __init__(self, data): argument
44 super().__init__(data)
Dltpf.py513 data = ltpf.get_data()
521 ok = ok and data_c['active'] == data['active']
522 ok = ok and data_c['pitch_index'] == data['pitch_index']
573 (pitch_present, data) = lc3.ltpf_analyse(dt, sr, state, x)
578 ok = ok and data['pitch_index'] == C.PITCH_INDEX[dt][0]
579 ok = ok and data['active'] == C.LTPF_ACTIVE[dt][0]
582 (pitch_present, data) = lc3.ltpf_analyse(dt, sr, state, x)
587 ok = ok and data['pitch_index'] == C.PITCH_INDEX[dt][1]
588 ok = ok and data['active'] == C.LTPF_ACTIVE[dt][1]
626 data = { 'active' : ACTIVE[i][0], 'pitch_index' : PITCH_INDEX[i][0] }
[all …]
/liblc3-3.7.0-3.6.0/tools/
Dwave.c97 struct wave_data data; in wave_read_header() local
115 if (fread(&data, sizeof(data), 1, fp) != 1 in wave_read_header()
116 || data.id != WAVE_DATA_ID) in wave_read_header()
123 *nframes = data.size / format.framesize; in wave_read_header()
146 struct wave_data data; in wave_write_header() member
167 header.data = (struct wave_data){ in wave_write_header()
Dlc3bin.c104 const void *data, int nchannels, int frame_bytes) in lc3bin_write_data() argument
109 fwrite(data, 1, nbytes, fp); in lc3bin_write_data()
Dlc3bin.h68 const void *data, int nchannels, int frame_bytes);
/liblc3-3.7.0-3.6.0/fuzz/
Ddfuzz.cc24 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) in LLVMFuzzerTestOneInput() argument
29 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput()
60 fdp.ConsumeBytes<uint8_t>(nchannels * frame_size).data(), frame_size, in LLVMFuzzerTestOneInput()
61 fmt, std::vector<uint8_t>(nchannels * frame_samples * sample_bytes).data()); in LLVMFuzzerTestOneInput()
Defuzz.cc46 e.Encode(pcm.data(), in encode()
47 frame_size, std::vector<uint8_t>(nchannels * frame_size).data()); in encode()
65 e.Encode(fmt, fdp.ConsumeBytes<uint8_t>(pcm_bytes).data(), in encode()
66 frame_size, std::vector<uint8_t>(nchannels * frame_size).data()); in encode()
71 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) in LLVMFuzzerTestOneInput() argument
76 FuzzedDataProvider fdp(data, size); in LLVMFuzzerTestOneInput()