Go to the documentation of this file.
21 #ifndef SWSCALE_OPS_CHAIN_H
22 #define SWSCALE_OPS_CHAIN_H
63 static_assert(
sizeof(
SwsOpPriv) == 16,
"SwsOpPriv size mismatch");
76 static_assert(
sizeof(
SwsOpImpl) == 32,
"SwsOpImpl layout mismatch");
77 static_assert(offsetof(
SwsOpImpl, priv) == 16,
"SwsOpImpl layout mismatch");
85 #define SWS_MAX_OPS 16
167 int num_tables,
const SwsUOp *uop,
const int block_size,
int(* func)(AVBPrint *dst, const char *in, const char *arg)
int ff_sws_setup_clear(const SwsImplParams *params, SwsImplResult *out)
SwsOpChain * ff_sws_op_chain_alloc(void)
int ff_sws_op_chain_append(SwsOpChain *chain, SwsFuncPtr func, void(*free)(SwsOpPriv *), const SwsOpPriv *priv)
Copyright (C) 2025 Niklas Haas.
static void ff_op_priv_unref(SwsOpPriv *priv)
void(* SwsFuncPtr)(void)
Per-kernel execution context.
void ff_sws_op_chain_free_cb(void *chain)
DECLARE_ALIGNED_16(char, data)[16]
Writing a table generator This documentation is preliminary Parts of the API are not good and should be changed Basic concepts A table generator consists of two *_tablegen c and *_tablegen h The h file will provide the variable declarations and initialization code for the tables
const SwsUOpTable * table
void(* free[SWS_MAX_OPS+1])(SwsOpPriv *)
int ff_sws_setup_scale(const SwsImplParams *params, SwsImplResult *out)
static AVFormatContext * ctx
uint8_t SwsCompMask
Bit-mask of components.
SwsOpImpl impl[SWS_MAX_OPS+1]
Compiled "chain" of operations, which can be dispatched efficiently.
const SwsUOpEntry * entries[]
int(* setup)(const SwsImplParams *params, SwsImplResult *out)
int ff_sws_setup_vec4(const SwsImplParams *params, SwsImplResult *out)
void av_refstruct_unref(void *objp)
Decrement the reference count of the underlying object and automatically free the object if there are...
static void ff_sws_op_chain_free(SwsOpChain *chain)
void(* free)(SwsOpPriv *priv)
static void ff_op_priv_free(SwsOpPriv *priv)
bool(* check)(const SwsImplParams *params)
int ff_sws_uop_lookup(SwsContext *ctx, const SwsUOpTable *const tables[], int num_tables, const SwsUOp *uop, const int block_size, SwsOpChain *chain)
"Compile" a single uop by looking it up in a list of fixed size uop tables, in decreasing order of pr...
int ff_sws_setup_scalar(const SwsImplParams *params, SwsImplResult *out)
int ff_sws_setup_clamp(const SwsImplParams *params, SwsImplResult *out)
Main external API structure.
Private data for each kernel.