mirror of
https://github.com/google/liblc3.git
synced 2026-04-26 00:54:50 +00:00
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:
committed by
Antoine Soulier
parent
a75f187e00
commit
149cb6537e
12
src/attdet.c
12
src/attdet.c
@@ -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 --- */
|
||||
|
||||
Reference in New Issue
Block a user