Home
last modified time | relevance | path

Searched refs:pcm (Results 1 – 14 of 14) sorted by relevance

/liblc3-latest/include/
Dlc3_cpp.h95 int EncodeImpl(PcmFormat fmt, const T *pcm, int block_size, uint8_t *out) { in EncodeImpl() argument
106 ret |= lc3_encode(states[ich].get(), cfmt, pcm + ich, nchannels_, in EncodeImpl()
159 int Encode(const int16_t *pcm, int block_size, uint8_t *out) { in Encode() argument
160 return EncodeImpl(PcmFormat::kS16, pcm, block_size, out); in Encode()
163 int Encode(const int32_t *pcm, int block_size, uint8_t *out) { in Encode() argument
164 return EncodeImpl(PcmFormat::kS24, pcm, block_size, out); in Encode()
167 int Encode(const float *pcm, int block_size, uint8_t *out) { in Encode() argument
168 return EncodeImpl(PcmFormat::kF32, pcm, block_size, out); in Encode()
171 int Encode(PcmFormat fmt, const void *pcm, int block_size, uint8_t *out) { in Encode() argument
172 uintptr_t pcm_ptr = reinterpret_cast<uintptr_t>(pcm); in Encode()
[all …]
Dlc3.h369 const void *pcm, int stride, int nbytes, void *out);
416 enum lc3_pcm_format fmt, void *pcm, int stride);
/liblc3-latest/src/
Dlc3.c193 const int16_t *pcm = _pcm; in load_s16() local
202 for (int i = 0; i < ns; i++, pcm += stride) in load_s16()
203 xt[i] = *pcm, xs[i] = *pcm; in load_s16()
214 const int32_t *pcm = _pcm; in load_s24() local
223 for (int i = 0; i < ns; i++, pcm += stride) { in load_s24()
224 xt[i] = *pcm >> 8; in load_s24()
225 xs[i] = lc3_ldexpf(*pcm, -8); in load_s24()
237 const uint8_t *pcm = _pcm; in load_s24_3le() local
246 for (int i = 0; i < ns; i++, pcm += 3*stride) { in load_s24_3le()
247 int32_t in = ((uint32_t)pcm[0] << 8) | in load_s24_3le()
[all …]
/liblc3-latest/test/
Dlc3_py.c54 int16_t *pcm; in encode_py() local
66 CTYPES_CHECK("x", pcm_obj = to_1d_ptr(pcm_obj, NPY_INT16, ns, &pcm)); in encode_py()
71 lc3_encode(encoder, LC3_PCM_FORMAT_S16, pcm, 1, nbytes, out); in encode_py()
102 int16_t *pcm; in decode_py() local
118 pcm_obj = new_1d_ptr(NPY_INT16, ns, &pcm); in decode_py()
120 lc3_decode(decoder, in, nbytes, LC3_PCM_FORMAT_S16, pcm, 1); in decode_py()
Ddecoder.py105 pcm = lc3.decode(dec_c, bytes(C.BYTES_AC[i0][i]))
106 ok = ok and np.max(np.abs(pcm - C.X_HAT_CLIP[i0][i])) < 1
/liblc3-latest/python/tools/
Ddecoder.py83 pcm = dec.decode(f_lc3.read(lc3_frame_size), bit_depth=bit_depth) variable
85 pcm = pcm[max(encoded_length - stream_length - i, 0) * pcm_size: variable
88 wavfile.writeframesraw(pcm)
Dencoder.py79 pcm = wavfile.readframes(frame_length) variable
80 f_lc3.write(enc.encode(pcm, frame_size, bit_depth=bit_depth))
/liblc3-latest/python/
Dlc3.py310 pcm: bytes | bytearray | memoryview | Iterable[float],
317 self, pcm: bytes | bytearray | memoryview, num_bytes: int, bit_depth: int
320 def encode(self, pcm, num_bytes: int, bit_depth: int | None = None) -> bytes: argument
342 pcm_buffer = array.array("f", pcm)
345 if not abs(sum(pcm)) / frame_samples < 2:
352 padding = max(pcm_len * ctypes.sizeof(pcm_t) - len(pcm), 0)
353 pcm_buffer = bytearray(pcm) + bytearray(padding) # type: ignore
361 pcm = (pcm_t * (pcm_len - ich)).from_buffer(pcm_buffer, pcm_offset)
367 ret = self.lib.lc3_encode(encoder, pcm_fmt, pcm, nchannels, len(data), data)
508 pcm = (pcm_t * (pcm_len - ich)).from_buffer(pcm_buffer, pcm_offset)
[all …]
/liblc3-latest/fuzz/
Defuzz.cc42 std::vector<T> pcm(pcm_samples); in encode() local
43 for (auto &s: pcm) in encode()
46 e.Encode(pcm.data(), in encode()
/liblc3-latest/python/tests/
Dbasic_test.py37 def test_encode_without_bit_depth(pcm) -> None: argument
39 encoded_frame = encoder.encode(pcm, num_bytes=120, bit_depth=None)
/liblc3-latest/tools/
Ddlc3.c196 int8_t alignas(int32_t) pcm[2 * LC3_HR_MAX_FRAME_SAMPLES*4]; in main()
238 memset(pcm, 0, nchannels * frame_samples * pcm_sbytes); in main()
246 pcm_fmt, pcm + ich * pcm_sbytes, nchannels); in main()
258 pcm_sbytes, pcm, nchannels, pcm_offset, pcm_nwrite); in main()
Delc3.c212 int8_t alignas(int32_t) pcm[2 * LC3_HR_MAX_FRAME_SAMPLES*4]; in main()
242 int nread = wave_read_pcm(fp_in, pcm_sbytes, nchannels, frame_samples, pcm); in main()
244 memset(pcm + nread * nchannels * pcm_sbytes, 0, in main()
264 pcm_fmt, pcm + ich * pcm_sbytes, nchannels, in main()
Dwave.h70 const void *pcm, int nch, int off, int count);
Dwave.c184 const int8_t *pcm = _pcm; in wave_write_pcm() local
185 fwrite(pcm + nch * off * samplesize, nch * samplesize, count, fp); in wave_write_pcm()