Go to the documentation of this file.
21 #include "../ops_chain.h"
55 float *coeffs =
av_malloc(num_vregs * 4 *
sizeof(
float));
67 coeffs[i_coeff++] = (
float)
op->lin.m[
i][jj].num /
op->lin.m[
i][jj].den;
99 const int size = 1 <<
op->dither.size_log2;
100 const int8_t *off =
op->dither.y_offset;
102 for (
int i = 0;
i < 4;
i++) {
104 max_offset =
FFMAX(max_offset, off[
i] & (
size - 1));
109 const int num_rows =
size + max_offset;
115 matrix[
i] = (
float)
op->dither.matrix[
i].num /
op->dither.matrix[
i].den;
133 if (
op->rw.frac == 3) {
136 -7, -6, -5, -4, -3, -2, -1, 0,
137 -7, -6, -5, -4, -3, -2, -1, 0,
144 if (
op->rw.frac == 3) {
147 7, 6, 5, 4, 3, 2, 1, 0,
148 7, 6, 5, 4, 3, 2, 1, 0,
193 .block_size = block_size,
217 void ff_sws_process_0001_neon(
void);
218 void ff_sws_process_0011_neon(
void);
219 void ff_sws_process_0111_neon(
void);
220 void ff_sws_process_1111_neon(
void);
227 switch (
FFMAX(read_planes, write_planes)) {
228 case 1: process_func = (
SwsOpFunc) ff_sws_process_0001_neon;
break;
229 case 2: process_func = (
SwsOpFunc) ff_sws_process_0011_neon;
break;
230 case 3: process_func = (
SwsOpFunc) ff_sws_process_0111_neon;
break;
231 case 4: process_func = (
SwsOpFunc) ff_sws_process_1111_neon;
break;
234 out->func = process_func;
static void error(const char *err)
int(* func)(AVBPrint *dst, const char *in, const char *arg)
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
static int linear_index_to_sws_op(int idx)
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)
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 *)
const SwsOpBackend backend_aarch64
int ff_sws_setup_scale(const SwsImplParams *params, SwsImplResult *out)
SwsFuncPtr ff_sws_aarch64_lookup(const SwsAArch64OpImplParams *p)
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.
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)
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)
Check that there is no mismatch for the SwsOpExec/SwsOpImpl offset values used by ops_asmgen.
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
#define LOOP_LINEAR_MASK(p, idx, jdx)
SwsAArch64OpImplParams describes the parameters for an SwsAArch64OpType 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.