Go to the documentation of this file.
21 #ifndef SWSCALE_OPS_CHAIN_H
22 #define SWSCALE_OPS_CHAIN_H
53 static_assert(
sizeof(
SwsOpPriv) == 16,
"SwsOpPriv size mismatch");
72 static_assert(
sizeof(
SwsOpImpl) == 32,
"SwsOpImpl layout mismatch");
73 static_assert(offsetof(
SwsOpImpl, priv) == 16,
"SwsOpImpl layout mismatch");
81 #define SWS_MAX_OPS 16
93 void (*free)(
void *),
const SwsOpPriv *priv);
int(* func)(AVBPrint *dst, const char *in, const char *arg)
SwsOpChain * ff_sws_op_chain_alloc(void)
void ff_sws_op_chain_free(SwsOpChain *chain)
int(* setup)(const SwsOp *op, SwsOpPriv *out)
SwsPixelType
Copyright (C) 2025 Niklas Haas.
void(* SwsFuncPtr)(void)
Per-kernel execution context.
int ff_sws_setup_u8(const SwsOp *op, SwsOpPriv *out)
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
int ff_sws_setup_q(const SwsOp *op, SwsOpPriv *out)
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
SwsOpImpl impl[SWS_MAX_OPS+1]
const SwsOpEntry * entries[]
Compiled "chain" of operations, which can be dispatched efficiently.
int ff_sws_op_compile_tables(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.
void(* free[SWS_MAX_OPS+1])(void *)
int ff_sws_setup_u(const SwsOp *op, SwsOpPriv *out)
int ff_sws_op_chain_append(SwsOpChain *chain, SwsFuncPtr func, void(*free)(void *), const SwsOpPriv *priv)
int ff_sws_setup_q4(const SwsOp *op, SwsOpPriv *out)
Helper struct for representing a list of operations.
Copyright (C) 2025 Niklas Haas.