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

Git pushed a commit to branch master
in repository ffmpeg.

commit 636b9eda7526c644c296003f52d317dc6688ad73
Author:     Niklas Haas <[email protected]>
AuthorDate: Sun Apr 19 13:56:28 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Jun 9 18:27:20 2026 +0200

    swscale/ops_tmpl_float: allow arbitrary values for 1x1 dither
    
    Removes the 1x1 dither fast path, mirroring the previous commit.
    
    This is not really needed nor useful but it will make the transition to
    the uops architecture slightly easier, as 1x1 dither gets reinterpreted
    as SWS_UOP_ADD there.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops_tmpl_float.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/libswscale/ops_tmpl_float.c b/libswscale/ops_tmpl_float.c
index 2acbdd38ea..57f6d8c399 100644
--- a/libswscale/ops_tmpl_float.c
+++ b/libswscale/ops_tmpl_float.c
@@ -45,13 +45,6 @@ DECL_SETUP(setup_dither, params, out)
 {
     const SwsOp *op = params->op;
     const int size = 1 << op->dither.size_log2;
-    if (size == 1) {
-        /* We special case this value */
-        av_assert1(!av_cmp_q(op->dither.matrix[0], av_make_q(1, 2)));
-        out->priv.ptr = NULL;
-        return 0;
-    }
-
     const int width = FFMAX(size, SWS_BLOCK_SIZE);
     pixel_t *matrix = out->priv.ptr = av_malloc(sizeof(pixel_t) * size * 
width);
     if (!matrix)
@@ -90,7 +83,7 @@ DECL_FUNC(dither, const int size_log2)
         const int row = (y_line + offset[IDX]) & mask;                         
          \
         SWS_LOOP                                                               
          \
         for (int i = 0; i < SWS_BLOCK_SIZE; i++)                               
          \
-            VAR[i] += size_log2 ? matrix[row * width + base + i] : (pixel_t) 
0.5;        \
+            VAR[i] += matrix[row * width + base + i];                          
          \
     }
 
     DITHER_COMP(x, 0)

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

Reply via email to