FFmpeg
Data Structures | Functions | Variables
ops.c File Reference
#include "../ops_chain.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/tree.h"
#include "ops_lookup.h"
#include "ops_impl_conv.c"

Go to the source code of this file.

Data Structures

struct  SwsAArch64BackendContext
 

Functions

static int aarch64_setup_linear (const SwsAArch64OpImplParams *p, const SwsOp *op, SwsImplResult *res)
 
static int aarch64_setup_dither (const SwsAArch64OpImplParams *p, const SwsOp *op, SwsImplResult *res)
 
static int aarch64_setup (SwsOpList *ops, int block_size, int n, const SwsAArch64OpImplParams *p, SwsImplResult *out)
 
static int aarch64_optimize (SwsAArch64BackendContext *bctx, SwsOpList *ops)
 
static int aarch64_compile (SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out)
 

Variables

const SwsOpBackend backend_aarch64
 

Function Documentation

◆ aarch64_setup_linear()

static int aarch64_setup_linear ( const SwsAArch64OpImplParams p,
const SwsOp op,
SwsImplResult res 
)
static

Compute number of full vector registers needed to pack all non-zero coefficients.

Copy non-zero coefficients, reordered to match SwsAArch64LinearOpMask. The coefficients are packed in sequential order. The same order must be followed in asmgen_op_linear().

Definition at line 38 of file ops.c.

Referenced by aarch64_setup().

◆ aarch64_setup_dither()

static int aarch64_setup_dither ( const SwsAArch64OpImplParams p,
const SwsOp op,
SwsImplResult res 
)
static

The input dither matrix is (1 << size_log2)² pixels large. It is periodic, so the x and y offsets should be masked to fit inside (1 << size_log2). The width of the matrix is assumed to be at least 8, which matches the maximum block_size for aarch64 asmgen when f32 operations (i.e., dithering) are used. This guarantees that the x offset is aligned and that reading block_size elements does not extend past the end of the row. The x offset doesn't change between components, so it is only required to be masked once. The y offset, on the other hand, may change per component, and would therefore need to be masked for every y_offset value. To simplify the execution, we over-allocate the number of rows of the output dither matrix by the largest y_offset value. This way, we only need to mask y offset once, and can safely increment the dither matrix pointer by fixed offsets for every y_offset change.

Definition at line 69 of file ops.c.

Referenced by aarch64_setup().

◆ aarch64_setup()

static int aarch64_setup ( SwsOpList ops,
int  block_size,
int  n,
const SwsAArch64OpImplParams p,
SwsImplResult out 
)
static

Definition at line 118 of file ops.c.

Referenced by aarch64_compile().

◆ aarch64_optimize()

static int aarch64_optimize ( SwsAArch64BackendContext bctx,
SwsOpList ops 
)
static

Definition at line 162 of file ops.c.

Referenced by aarch64_compile().

◆ aarch64_compile()

static int aarch64_compile ( SwsContext ctx,
SwsOpList ops,
SwsCompiledOp out 
)
static

Definition at line 173 of file ops.c.

Variable Documentation

◆ backend_aarch64

const SwsOpBackend backend_aarch64
Initial value:
= {
.name = "aarch64",
.compile = aarch64_compile,
.hw_format = AV_PIX_FMT_NONE,
}

Definition at line 253 of file ops.c.

aarch64_compile
static int aarch64_compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out)
Definition: ops.c:173
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72