swscale/ops_optimizer: always clear unused dither components

Makes the op list a bit more stable.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas Haas
2026-03-09 17:22:36 +01:00
committed by Niklas Haas
parent 563cc8216b
commit 8227a21c27
2 changed files with 3 additions and 3 deletions

View File

@@ -518,9 +518,9 @@ retry:
case SWS_OP_DITHER:
for (int i = 0; i < 4; i++) {
if (next->comps.unused[i] || op->dither.y_offset[i] < 0)
if (op->dither.y_offset[i] < 0)
continue;
if (prev->comps.flags[i] & SWS_COMP_EXACT) {
if (next->comps.unused[i] || (prev->comps.flags[i] & SWS_COMP_EXACT)) {
op->dither.y_offset[i] = -1; /* unnecessary dither */
goto retry;
} else {

View File

@@ -1 +1 @@
a312bd79cadff3e2e02fd14ae7e54e26
121d60ee0261ca5d9650a8d1e9e8a060