mirror of
https://github.com/google/liblc3.git
synced 2026-04-22 23:54:49 +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
@@ -57,7 +57,9 @@ struct side_data {
|
||||
*/
|
||||
static enum lc3_dt resolve_dt(int us)
|
||||
{
|
||||
return us == 7500 ? LC3_DT_7M5 :
|
||||
return us == 2500 ? LC3_DT_2M5 :
|
||||
us == 5000 ? LC3_DT_5M :
|
||||
us == 7500 ? LC3_DT_7M5 :
|
||||
us == 10000 ? LC3_DT_10M : LC3_NUM_DT;
|
||||
}
|
||||
|
||||
@@ -269,7 +271,7 @@ static void analyze(struct lc3_encoder *encoder,
|
||||
|
||||
/* --- Spectral --- */
|
||||
|
||||
float e[LC3_NUM_BANDS];
|
||||
float e[LC3_MAX_BANDS];
|
||||
|
||||
lc3_mdct_forward(dt, sr_pcm, sr, xs, xd, xf);
|
||||
|
||||
@@ -534,7 +536,8 @@ static int decode(struct lc3_decoder *decoder,
|
||||
if ((ret = lc3_spec_get_side(&bits, dt, sr, &side->spec)) < 0)
|
||||
return ret;
|
||||
|
||||
lc3_tns_get_data(&bits, dt, side->bw, nbytes, &side->tns);
|
||||
if ((ret = lc3_tns_get_data(&bits, dt, side->bw, nbytes, &side->tns)) < 0)
|
||||
return ret;
|
||||
|
||||
side->pitch_present = lc3_get_bit(&bits);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user