mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 01:21:06 +00:00
swscale/x86/ops: avoid direct reliance on ops metadata
Instead, use the new metadata introduced in the previous commit. The motivating reason here is a desire to stop taking a direct SwsOpList from the backends altogether. In theory, we could still recover this information from the `uops` list itself, but that would require far more boilerplate than simply having uops.c generate it using existing SwsOpsList helpers. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
@@ -611,7 +611,7 @@ static int compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out)
|
||||
|
||||
*out = (SwsCompiledOp) {
|
||||
/* Use at most two full YMM regs during the widest precision section */
|
||||
.block_size = 2 * FFMIN(mmsize, 32) / ff_sws_op_list_max_size(ops),
|
||||
.block_size = 2 * FFMIN(mmsize, 32) / uops->pixel_size_max,
|
||||
.slice_align = 1,
|
||||
.free = ff_sws_op_chain_free_cb,
|
||||
.priv = chain,
|
||||
@@ -634,11 +634,7 @@ static int compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
const SwsOp *read = ff_sws_op_list_input(ops);
|
||||
const SwsOp *write = ff_sws_op_list_output(ops);
|
||||
const int read_planes = read ? ff_sws_rw_op_planes(read) : 0;
|
||||
const int write_planes = ff_sws_rw_op_planes(write);
|
||||
switch (FFMAX(read_planes, write_planes)) {
|
||||
switch (av_popcount(uops->planes_in | uops->planes_out)) {
|
||||
case 1: out->func = ff_sws_process1_x86; break;
|
||||
case 2: out->func = ff_sws_process2_x86; break;
|
||||
case 3: out->func = ff_sws_process3_x86; break;
|
||||
|
||||
Reference in New Issue
Block a user