Commit graph

6 commits

Author SHA1 Message Date
Niklas Haas
e3daeff965 swscale/ops_dispatch: compute input x offset map for SwsOpExec
This is cheap to precompute and can be used as-is for gather-style horizontal
filter implementations.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-03-28 18:50:14 +01:00
Niklas Haas
015abfab38 swscale/ops_dispatch: precompute relative y bump map
This is more useful for tight loops inside CPU backends, which can implement
this by having a shared path for incrementing to the next line (as normal),
and then a separate path for adding an extra position-dependent, stride
multiplied line offset after each completed line.

As a free upside, this encoding does not require any separate/special handling
for the exec tail.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-03-28 18:50:14 +01:00
Niklas Haas
adf2d4e90f swscale/ops_dispatch: add helper function to clean up SwsCompiledOp
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-03-12 21:02:48 +00:00
Niklas Haas
bd9590db70 swscale/ops_dispatch: remove unnecessary SwsOpExec fields
These were abstraction-violating in the first place. Good riddance.

This partially reverts commit c911295f09.

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-03-09 12:01:51 +01:00
Niklas Haas
911176c880 swscale/ops_dispatch: add SwsCompiledFunc.opaque
Allows compiled functions to opt out of the ops_dispatch execution harness
altogether and just get dispatched directly as the pass run() function.

Useful in particular for Vulkan.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-03-09 12:01:51 +01:00
Niklas Haas
68f3886460 swscale/ops_dispatch: split off compile/dispatch code from ops.c
This code is self-contained and logically distinct from the ops-related
helpers in ops.c, so it belongs in its own file.

Purely cosmetic; no functional change.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-03-05 23:34:56 +00:00