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
166 int num_tables,
SwsOpList *ops,
const int block_size,
Copyright (C) 2025 Niklas Haas.
int(* func)(AVBPrint *dst, const char *in, const char *arg)
SwsOpChain * ff_sws_op_chain_alloc(void)
int ff_sws_op_chain_append(SwsOpChain *chain, SwsFuncPtr func, void(*free)(SwsOpPriv *), const SwsOpPriv *priv)
int(* setup)(const SwsImplParams *params, SwsImplResult *out)
SwsPixelType
Copyright (C) 2025 Niklas Haas.
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
void(* free[SWS_MAX_OPS+1])(SwsOpPriv *)
int ff_sws_op_compile_tables(SwsContext *ctx, const SwsOpTable *const tables[], int num_tables, SwsOpList *ops, const int block_size, SwsOpChain *chain)
"Compile" a single op by looking it up in a list of fixed size op tables.
static AVFormatContext * ctx
SwsOpImpl impl[SWS_MAX_OPS+1]
const SwsOpEntry * entries[]
Compiled "chain" of operations, which can be dispatched efficiently.
Rational number (pair of numerator and denominator).
int ff_sws_setup_q(const SwsImplParams *params, SwsImplResult *out)
int ff_sws_setup_u8(const SwsImplParams *params, SwsImplResult *out)
static void ff_sws_op_chain_free(SwsOpChain *chain)
void(* free)(SwsOpPriv *priv)
static void ff_op_priv_free(SwsOpPriv *priv)
int ff_sws_setup_q4(const SwsImplParams *params, SwsImplResult *out)
int ff_sws_setup_u(const SwsImplParams *params, SwsImplResult *out)
Helper struct for representing a list of operations.
Main external API structure.
Private data for each kernel.