This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 8349565d52 aacsbr_template: fix SBR USAC coupling
8349565d52 is described below
commit 8349565d52e028f3e8bf43fd2ae0891d7ee31fae
Author: Lynne <[email protected]>
AuthorDate: Thu Jan 22 19:58:31 2026 +0100
Commit: Lynne <[email protected]>
CommitDate: Fri Jan 23 14:40:52 2026 +0100
aacsbr_template: fix SBR USAC coupling
This issue hid under the radar since the codebooks between coupling
modes very often result in identical bit counts regardless of the encoded
data, leading to no frame-level bitstream desyncs except in rare cases.
AAC Mps212 data is parsed immediately after the SBR data, where a loss
of sync in SBR will result in Mps212 being wildly different.
---
libavcodec/aacsbr_template.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/aacsbr_template.c b/libavcodec/aacsbr_template.c
index 3c39da509d..31d2d844c4 100644
--- a/libavcodec/aacsbr_template.c
+++ b/libavcodec/aacsbr_template.c
@@ -1287,6 +1287,8 @@ int ff_aac_sbr_decode_usac_data(AACDecContext *ac,
ChannelElement *che,
if ((sbr->data[0].bs_add_harmonic_flag = get_bits1(gb)))
get_bits1_vector(gb, sbr->data[0].bs_add_harmonic, sbr->n[1]);
} else if (get_bits1(gb)) { /* bs_coupling == 1 */
+ sbr->bs_coupling = 1;
+
/* if (harmonicSBR) ... */
if (read_sbr_grid(ac, sbr, gb, &sbr->data[0]))
@@ -1317,7 +1319,10 @@ int ff_aac_sbr_decode_usac_data(AACDecContext *ac,
ChannelElement *che,
if ((sbr->data[1].bs_add_harmonic_flag = get_bits1(gb)))
get_bits1_vector(gb, sbr->data[1].bs_add_harmonic, sbr->n[1]);
} else { /* bs_coupling == 0 */
+ sbr->bs_coupling = 0;
+
/* if (harmonicSBR) ... */
+
if (read_sbr_grid(ac, sbr, gb, &sbr->data[0]))
return -1;
if (read_sbr_grid(ac, sbr, gb, &sbr->data[1]))
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]