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

Git pushed a commit to branch master
in repository ffmpeg.

commit 53a9a34e23b730edd82e1d703c75f30d2a532bb6
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Mon Feb 9 17:57:30 2026 +0100
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sun Feb 22 22:05:16 2026 +0100

    avcodec/snow: Reduce sizeof(SnowContext)
    
    Each SubBand currently contains an array of 519 uint8_t[32],
    yet most of these are unused: For both the decoder and the
    encoder, at most 34 contexts are actually used: The only
    variable index is context+2, where context is the result
    of av_log2() and therefore in the 0..31 range.
    
    There are also several accesses using compile-time indices,
    the highest of which is 30. FATE passes with 31 contexts
    and maybe these are enough, but I don't know.
    
    Reducing the number to 34 reduces sizeof(SnowContext)
    from 2141664B to 155104B here (on x64).
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/snow.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/snow.h b/libavcodec/snow.h
index 82417c3324..f8f45b8763 100644
--- a/libavcodec/snow.h
+++ b/libavcodec/snow.h
@@ -92,7 +92,7 @@ typedef struct SubBand{
     int stride_line; ///< Stride measured in lines, not pixels.
     x_and_coeff * x_coeff;
     struct SubBand *parent;
-    uint8_t state[/*7*2*/ 7 + 512][32];
+    uint8_t state[34][32];
 }SubBand;
 
 typedef struct Plane{

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to