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

Git pushed a commit to branch release/4.4
in repository ffmpeg.

commit 197c7ce8294047e121a5549d7704a2ff3b97cb05
Author:     Bogdan Lisman <[email protected]>
AuthorDate: Mon Jun 15 03:24:14 2026 +0300
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Wed Jun 17 03:41:53 2026 +0200

    avcodec/snowenc: fix SIGFPE in get_dc() when a block lies outside the plane
    
    get_dc() divides the accumulated, OBMC-weighted DC by aa, the sum of the
    squared OBMC weights taken over the in-plane pixels.  When an OBMC block
    falls entirely outside the plane - e.g. a tiny chroma plane after mcdeint
    splits a frame into fields - no pixel contributes, aa stays 0 and the
    ROUNDED_DIV() divides by zero (SIGFPE).  ab is 0 in exactly the same case,
    so the result degenerates to 0; return it directly.
    
    Reproducible with the GPL mcdeint filter in slow/extra_slow mode, e.g.
    
        ffmpeg -f lavfi -i testsrc=s=128x2 -vf mcdeint=mode=slow -f null -
    
    Add a self-contained lavfi-based FATE regression test for the slow mode,
    which previously crashed and is therefore not covered by the existing
    sample-based fast/medium tests.
    
    Fixes trac ticket #7779.
    
    Signed-off-by: Bogdan Lisman <[email protected]>
    (cherry picked from commit a62d99692780431aeb8cc96665434d5ec3210985)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/snowenc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 1e8afe75a7..d089f9b3d7 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -573,6 +573,9 @@ static int get_dc(SnowContext *s, int mb_x, int mb_y, int 
plane_index){
     }
     *b= backup;
 
+    if (!aa)
+        return 0;
+
     return av_clip_uint8( ROUNDED_DIV(ab<<LOG2_OBMC_MAX, aa) ); //FIXME we 
should not need clipping
 }
 

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

Reply via email to