feature: Add 2.5 ms and 5 ms LC3 plus frame durations

fix: Check TNS bitstream data

fix: LTPF Activation with 2.5 ms frame sizes
This commit is contained in:
anonymix007
2023-12-13 10:56:20 -08:00
committed by Antoine Soulier
parent a75f187e00
commit 149cb6537e
43 changed files with 3095 additions and 1628 deletions

View File

@@ -27,14 +27,14 @@ bool lc3_attdet_run(enum lc3_dt dt, enum lc3_srate sr,
{
/* --- Check enabling --- */
const int nbytes_ranges[LC3_NUM_DT][LC3_NUM_SRATE - LC3_SRATE_32K][2] = {
[LC3_DT_7M5] = { { 61, 149 }, { 75, 149 } },
[LC3_DT_10M] = { { 81, INT_MAX }, { 100, INT_MAX } },
const int nbytes_ranges[][LC3_NUM_SRATE - LC3_SRATE_32K][2] = {
[LC3_DT_7M5 - LC3_DT_7M5] = { { 61, 149 }, { 75, 149 } },
[LC3_DT_10M - LC3_DT_7M5] = { { 81, INT_MAX }, { 100, INT_MAX } },
};
if (sr < LC3_SRATE_32K ||
nbytes < nbytes_ranges[dt][sr - LC3_SRATE_32K][0] ||
nbytes > nbytes_ranges[dt][sr - LC3_SRATE_32K][1] )
if (dt < LC3_DT_7M5 || sr < LC3_SRATE_32K ||
nbytes < nbytes_ranges[dt - LC3_DT_7M5][sr - LC3_SRATE_32K][0] ||
nbytes > nbytes_ranges[dt - LC3_DT_7M5][sr - LC3_SRATE_32K][1] )
return 0;
/* --- Filtering & Energy calculation --- */