swscale/ops: add missing check on SwsDitherOp.y_offset

Doesn't actually affect anything in the currently generated ops lists.

Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas Haas
2026-03-27 19:14:56 +01:00
parent 7af7b8664b
commit 915523e136

View File

@@ -363,8 +363,11 @@ void ff_sws_op_list_update_comps(SwsOpList *ops)
break;
case SWS_OP_DITHER:
/* Strip zero flag because of the nonzero dithering offset */
for (int i = 0; i < 4; i++)
for (int i = 0; i < 4; i++) {
if (op->dither.y_offset[i] < 0)
continue;
op->comps.flags[i] = prev.flags[i] & ~SWS_COMP_ZERO;
}
break;
case SWS_OP_UNPACK:
for (int i = 0; i < 4; i++) {