Go to the documentation of this file.
21 #include "../ops_chain.h"
47 float *coeffs =
av_malloc(num_vregs * 4 *
sizeof(
float));
59 coeffs[i_coeff++] = (
float)
op->lin.m[
i][jj].num /
op->lin.m[
i][jj].den;
91 const int size = 1 <<
op->dither.size_log2;
92 const int8_t *off =
op->dither.y_offset;
94 for (
int i = 0;
i < 4;
i++) {
96 max_offset =
FFMAX(max_offset, off[
i] & (
size - 1));
101 const int num_rows =
size + max_offset;
107 matrix[
i] = (
float)
op->dither.matrix[
i].num /
op->dither.matrix[
i].den;
125 if (
op->rw.frac == 3) {
128 -7, -6, -5, -4, -3, -2, -1, 0,
129 -7, -6, -5, -4, -3, -2, -1, 0,
136 if (
op->rw.frac == 3) {
139 7, 6, 5, 4, 3, 2, 1, 0,
140 7, 6, 5, 4, 3, 2, 1, 0,
224 const int read_planes =
read ? (
read->rw.packed ? 1 :
read->rw.elems) : 0;
227 for (
int i = 0;
i <
FFMAX(read_planes, write_planes);
i++)
234 if (!process_func || !return_func) {
static void error(const char *err)
int(* func)(AVBPrint *dst, const char *in, const char *arg)
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_q(const SwsImplParams *params, SwsImplResult *out)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
static atomic_int cpu_flags
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
SwsFuncPtr ff_sws_aarch64_lookup(const SwsAArch64OpImplParams *p)
uint16_t SwsAArch64OpMask
SwsOpChain * ff_sws_op_chain_alloc(void)
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 av_assert0(cond)
assert() equivalent, that is always enabled.
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.
Compiled "chain" of operations, which can be dispatched efficiently.
static int aarch64_optimize(SwsAArch64BackendContext *bctx, SwsOpList *ops)
static int aarch64_compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out)
#define i(width, name, range_min, range_max)
int ff_sws_setup_q4(const SwsImplParams *params, SwsImplResult *out)
static int aarch64_setup(SwsOpList *ops, int block_size, int n, const SwsAArch64OpImplParams *p, SwsImplResult *out)
void ff_sws_op_chain_free_cb(void *ptr)
static int aarch64_setup_dither(const SwsAArch64OpImplParams *p, const SwsOp *op, SwsImplResult *res)
static void ff_sws_op_chain_free(SwsOpChain *chain)
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 MASK_SET(mask, idx, val)
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)
uint8_t elems
Examples: rgba = 4x u8 packed yuv444p = 3x u8 rgb565 = 1x u16 <- use SWS_OP_UNPACK to unpack monow = ...
SwsAArch64OpImplParams describes the parameters for an SwsAArch64OpType operation.
@ AARCH64_SWS_OP_PROCESS_RETURN
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.
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.