feature: Add High-Resolution LC3 plus mode

Duplicate interfaces for HR mode

spec: Remove intermediate quantized table

fix: legacy lc3_frame_bytes() and lc3_resolve_bitrate()

Cosmetic: rename fast_xxx math function to lc3_xxx
This commit is contained in:
Antoine Soulier
2023-12-21 15:42:08 -08:00
parent 149cb6537e
commit daa580235e
46 changed files with 4518 additions and 1149 deletions

View File

@@ -36,7 +36,7 @@ static PyObject *resample_py(PyObject *m, PyObject *args)
CTYPES_CHECK("sr", (unsigned)sr < LC3_NUM_SRATE);
CTYPES_CHECK(NULL, hp50_obj = to_ltpf_hp50_state(hp50_obj, &hp50));
int ns = LC3_NS(dt, sr), nt = LC3_NT(dt);
int ns = lc3_ns(dt, sr), nt = lc3_nt(sr);
int ny = sizeof((struct lc3_ltpf_analysis){ }.x_12k8) / sizeof(int16_t);
int n = (1 + dt) * 32;
@@ -64,7 +64,7 @@ static PyObject *analyse_py(PyObject *m, PyObject *args)
CTYPES_CHECK("sr", sr < LC3_NUM_SRATE);
CTYPES_CHECK(NULL, ltpf_obj = to_ltpf_analysis(ltpf_obj, &ltpf));
int ns = LC3_NS(dt, sr), nt = LC3_NT(sr);
int ns = lc3_ns(dt, sr), nt = lc3_nt(sr);
CTYPES_CHECK("x", x_obj = to_1d_ptr(x_obj, NPY_INT16, ns+nt, &x));
@@ -97,7 +97,7 @@ static PyObject *synthesize_py(PyObject *m, PyObject *args)
if ((pitch_present = (data_obj != Py_None)))
CTYPES_CHECK(NULL, data_obj = to_ltpf_data(data_obj, &data));
int ns = LC3_NS(dt,sr), nd = 18 * LC3_SRATE_KHZ(sr);
int ns = lc3_ns(dt,sr), nd = 18 * (lc3_ns_4m[sr] / 4);
CTYPES_CHECK("x", x_obj = to_1d_ptr(x_obj, NPY_FLOAT, nd+ns, &x));