This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 5cd37f1ded84cd8b00e1aebc7ed7f3b057dc79e3
Author:     Ayoub Nabil Boubagrat 
<[email protected]>
AuthorDate: Sat Sep 5 12:56:25 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Wed Sep 9 18:06:23 2026 +0000

    avcodec/ac3: skip psd integration for single-bin bands
    
    the first 28 bands have one coefficient each. copy its psd
    instead of running the integration loop.
    
    Signed-off-by: Ayoub Nabil Boubagrat 
<[email protected]>
---
 libavcodec/ac3.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c
index 60491d1a7a..dbb4a62b74 100644
--- a/libavcodec/ac3.c
+++ b/libavcodec/ac3.c
@@ -183,8 +183,13 @@ void ff_ac3_bit_alloc_calc_psd(int8_t *exp, int start, int 
end, int16_t *psd,
     }
 
     /* PSD integration */
-    bin  = start;
-    band = ff_ac3_bin_to_band_tab[start];
+    /* the first 28 bands have one coefficient each */
+    for (bin = start; bin < FFMIN(end, 28); bin++)
+        band_psd[bin] = psd[bin];
+    if (bin >= end)
+        return;
+
+    band = ff_ac3_bin_to_band_tab[bin];
     do {
         int v = psd[bin++];
         int band_end = FFMIN(ff_ac3_band_start_tab[band+1], end);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to