Go to the documentation of this file.
21 #include "../ops_chain.h"
45 #define ENTRY(fname, ...) extern void fname(void);
53 #define ENTRY(fname, ...) { .func = fname, .params = __VA_ARGS__ },
77 float *coeffs =
av_malloc(num_vregs * 4 *
sizeof(
float));
86 for (
int i = 0;
i < 4;
i++) {
87 for (
int j = 0; j < 5; j++) {
88 const int jj = (j == 0) ? 4 : (j - 1);
90 coeffs[i_coeff++] = (
float)
op->lin.m[
i][jj].num /
op->lin.m[
i][jj].den;
123 const int size = 1 <<
op->dither.size_log2;
124 const int8_t *off =
op->dither.y_offset;
126 for (
int i = 0;
i < 4;
i++) {
128 max_offset =
FFMAX(max_offset, off[
i] & (
size - 1));
133 const int num_rows =
size + max_offset;
139 matrix[
i] = (
float)
op->dither.matrix[
i].num /
op->dither.matrix[
i].den;
157 if (
op->rw.frac == 3) {
160 -7, -6, -5, -4, -3, -2, -1, 0,
161 -7, -6, -5, -4, -3, -2, -1, 0,
168 if (
op->rw.frac == 3) {
171 7, 6, 5, 4, 3, 2, 1, 0,
172 7, 6, 5, 4, 3, 2, 1, 0,
217 .block_size = block_size,
241 void ff_sws_process_0001_neon(
void);
242 void ff_sws_process_0011_neon(
void);
243 void ff_sws_process_0111_neon(
void);
244 void ff_sws_process_1111_neon(
void);
251 switch (
FFMAX(read_planes, write_planes)) {
252 case 1: process_func = (
SwsOpFunc) ff_sws_process_0001_neon;
break;
253 case 2: process_func = (
SwsOpFunc) ff_sws_process_0011_neon;
break;
254 case 3: process_func = (
SwsOpFunc) ff_sws_process_0111_neon;
break;
255 case 4: process_func = (
SwsOpFunc) ff_sws_process_1111_neon;
break;
258 out->func = process_func;
static void error(const char *err)
int ff_sws_rw_op_planes(const SwsOp *op)
Return the number of planes involved in a read/write operation.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
const SwsOp * ff_sws_op_list_input(const SwsOpList *ops)
Returns the input operation for a given op list, or NULL if there is none (e.g.
int ff_sws_op_list_max_size(const SwsOpList *ops)
Returns the size of the largest pixel type used in ops.
int ff_sws_setup_clear(const SwsImplParams *params, SwsImplResult *out)
static SwsFuncPtr aarch64_lookup(const SwsAArch64OpImplParams *p)
void(* SwsFuncPtr)(void)
Per-kernel execution context.
void(* SwsOpFunc)(const SwsOpExec *exec, const void *priv, int bx_start, int y_start, int bx_end, int y_end)
Process a given range of pixel blocks.
void(* free[SWS_MAX_OPS+1])(SwsOpPriv *)
#define FF_ARRAY_ELEMS(a)
const SwsOpBackend backend_aarch64
int ff_sws_setup_scale(const SwsImplParams *params, SwsImplResult *out)
SwsOpChain * ff_sws_op_chain_alloc(void)
Copyright (C) 2025 Niklas Haas.
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.
#define offsetof_impl_cont
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
static AVFormatContext * ctx
const SwsOp * ff_sws_op_list_output(const SwsOpList *ops)
Returns the output operation for a given op list, or NULL if there is none.
SwsAArch64OpImplParams params
Copyright (C) 2026 Niklas Haas.
#define offsetof_exec_out_bump
Compiled "chain" of operations, which can be dispatched efficiently.
#define offsetof_exec_out
static int aarch64_compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out)
#define i(width, name, range_min, range_max)
static const struct @569 ops_entries[]
void ff_sws_op_chain_free_cb(void *ptr)
static int aarch64_setup_dither(const SwsAArch64OpImplParams *p, const SwsOp *op, SwsImplResult *res)
static int aarch64_setup(const SwsOpList *ops, int block_size, int n, const SwsAArch64OpImplParams *p, SwsImplResult *out)
static void ff_sws_op_chain_free(SwsOpChain *chain)
#define offsetof_impl_priv
static int aarch64_setup_linear(const SwsAArch64OpImplParams *p, const SwsOp *op, SwsImplResult *res)
void(* free)(SwsOpPriv *priv)
static void ff_op_priv_free(SwsOpPriv *priv)
#define offsetof_exec_in
These values will be used by ops_asmgen to access fields inside of SwsOpExec and SwsOpImpl.
static int convert_to_aarch64_impl(SwsContext *ctx, const SwsOpList *ops, int n, int block_size, SwsAArch64OpImplParams *out)
Convert SwsOp to a SwsAArch64OpImplParams.
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
SwsAArch64OpImplParams describes the parameters for an SwsUOpType operation.
#define offsetof_exec_in_bump
int ff_sws_op_chain_append(SwsOpChain *chain, SwsFuncPtr func, void(*free)(SwsOpPriv *), const SwsOpPriv *priv)
static int linear_num_vregs(const SwsAArch64OpImplParams *params)
Helper struct for representing a list of operations.
int ff_sws_setup_clamp(const SwsImplParams *params, SwsImplResult *out)
Main external API structure.
Private data for each kernel.
static uint32_t BS_FUNC() read(BSCTX *bc, unsigned int n)
Return n bits from the buffer, n has to be in the 0-32 range.
@ SWS_BACKEND_AARCH64
Chained AArch64 NEON kernels.