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

Git pushed a commit to branch master
in repository ffmpeg.

commit 304efa29aeef68d4c8e2af5ab9763afe25819965
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/ac3dsp: skip the inner loop for single-bin bands
    
    calculate bap directly for the first 28 bands. each contains
    only one coefficient.
    
    Signed-off-by: Ayoub Nabil Boubagrat 
<[email protected]>
---
 libavcodec/ac3dsp.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index 090287e42d..385a642af1 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -83,8 +83,16 @@ static void ac3_bit_alloc_calc_bap_c(int16_t *mask, int16_t 
*psd,
         return;
     }
 
-    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++) {
+        int m = (FFMAX(mask[bin] - snr_offset - floor, 0) & 0x1FE0) + floor;
+        int address = av_clip_uintp2((psd[bin] - m) >> 5, 6);
+        bap[bin] = bap_tab[address];
+    }
+    if (bin >= end)
+        return;
+
+    band = ff_ac3_bin_to_band_tab[bin];
     do {
         int m = (FFMAX(mask[band] - snr_offset - floor, 0) & 0x1FE0) + floor;
         band_end = ff_ac3_band_start_tab[++band];

-- 
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