This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 43f1189af7ffbaaa7e750e861b877077e7002cdf Author: Niklas Haas <[email protected]> AuthorDate: Wed Feb 25 17:29:43 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Thu Feb 26 13:09:14 2026 +0000 swscale/ops_optimizer: eliminate unnecessary dither indices Generates a lot of incremental diffs due to things like ignored alpha planes or chroma planes that are not actually modified. e.g. bgr24 -> gbrap10be: [ u8 XXXX -> +++X] SWS_OP_READ : 3 elem(s) packed >> 0 [ u8 ...X -> +++X] SWS_OP_CONVERT : u8 -> f32 [f32 ...X -> ...X] SWS_OP_SCALE : * 341/85 - [f32 ...X -> ...X] SWS_OP_DITHER : 16x16 matrix + {2 3 0 5} + [f32 ...X -> ...X] SWS_OP_DITHER : 16x16 matrix + {2 3 0 -1} [f32 ...X -> ...X] SWS_OP_MIN : x <= {1023 1023 1023 1023} [f32 ...X -> +++X] SWS_OP_CONVERT : f32 -> u16 [u16 ...X -> zzzX] SWS_OP_SWAP_BYTES [u16 ...X -> zzzX] SWS_OP_SWIZZLE : 1023 [u16 ...X -> zzz+] SWS_OP_CLEAR : {_ _ _ 65283} [u16 .... -> zzz+] SWS_OP_WRITE : 4 elem(s) planar >> 0 (X = unused, z = byteswapped, + = exact, 0 = zero) Signed-off-by: Niklas Haas <[email protected]> --- libswscale/ops_optimizer.c | 7 ++++++- tests/ref/fate/sws-ops-list | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c index 203dff1ac2..9cddb3d7f5 100644 --- a/libswscale/ops_optimizer.c +++ b/libswscale/ops_optimizer.c @@ -520,7 +520,12 @@ retry: for (int i = 0; i < 4; i++) { if (next->comps.unused[i] || op->dither.y_offset[i] < 0) continue; - noop &= !!(prev->comps.flags[i] & SWS_COMP_EXACT); + if (prev->comps.flags[i] & SWS_COMP_EXACT) { + op->dither.y_offset[i] = -1; /* unnecessary dither */ + goto retry; + } else { + noop = false; + } } if (noop) { diff --git a/tests/ref/fate/sws-ops-list b/tests/ref/fate/sws-ops-list index 9f85a106ed..13049a0c14 100644 --- a/tests/ref/fate/sws-ops-list +++ b/tests/ref/fate/sws-ops-list @@ -1 +1 @@ -86c2335d1adad97dda299cbc6234ac57 +a312bd79cadff3e2e02fd14ae7e54e26 _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
