34 int idx =
out->par.move.num_moves++;
35 out->par.move.dst[idx] =
dst;
36 out->par.move.src[idx] =
src;
51 uint8_t src_used[4] = { 0 };
52 bool done[4] = {
true,
true,
true,
true };
60 for (
bool progress =
true; progress; ) {
63 if (done[
dst] || src_used[
dst])
80 uint8_t cur_dst =
dst;
81 uint8_t
src = swizzle.
in[cur_dst];
86 src = swizzle.
in[cur_dst];
103 out->block_size = block_size;
110 for (
int i = 0;
i < 4;
i++) {
115 out->type =
op->type;
120 if (
op->rw.filter.op)
126 if (
op->rw.frac == 1)
128 else if (
op->rw.frac == 3)
138 if (
op->rw.filter.op)
144 if (
op->rw.frac == 1)
146 else if (
op->rw.frac == 3)
164 uint8_t
src =
op->swizzle.in[
i];
179 if (
op->convert.expand) {
180 switch (
op->convert.to) {
185 switch (
op->convert.to) {
218 switch (
op->rw.elems) {
229 for (
int i = 0;
i < 4;
i++) {
239 for (
int i = 0;
i < 4;
i++)
240 out->par.pack.pattern[
i] =
op->pack.pattern[
i];
244 for (
int i = 0;
i < 4 &&
op->pack.pattern[
i];
i++)
246 for (
int i = 0;
i < 4;
i++)
247 out->par.pack.pattern[
i] =
op->pack.pattern[
i];
251 out->par.shift.amount =
op->shift.amount;
255 for (
int i = 0;
i < 4;
i++) {
258 if (
op->clear.value[
i].num == 0) {
261 uint32_t
val =
op->clear.value[
i].num /
op->clear.value[
i].den;
274 for (
int i = 0;
i < 4;
i++) {
276 for (
int j = 0; j < 5; j++)
281 for (
int j = 0; j < 5; j++) {
283 if (j < 4 && k.
num == k.
den)
292 op->dither.y_offset[1] >= 0,
293 op->dither.y_offset[2] >= 0,
294 op->dither.y_offset[3] >= 0);
296 out->par.dither.y_offset[
i] =
op->dither.y_offset[
i];
298 out->par.dither.size_log2 =
op->dither.size_log2;
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static double val(void *priv, double ch)
static AVFormatContext * ctx
#define i(width, name, range_min, range_max)
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.
uint32_t ff_sws_linear_mask(const SwsLinearOp *c)
SwsCompMask ff_sws_comp_mask_q4(const AVRational64 q[4])
@ SWS_RW_PLANAR
Note: 1-component reads are either SWS_RW_PLANAR or SWS_RW_PACKED, depending on the underlying interp...
#define SWS_OP_NEEDED(op, idx)
static void swizzle_emit(SwsAArch64OpImplParams *out, uint8_t dst, uint8_t src)
NOTE: This file is #include'd directly by both the NEON backend and the sws_ops_aarch64 tool.
static void convert_swizzle_to_moves(const SwsOp *op, SwsAArch64OpImplParams *out)
static int convert_to_aarch64_impl(SwsContext *ctx, const SwsOpList *ops, int n, int block_size, SwsAArch64OpImplParams *out)
Convert SwsOp to a SwsAArch64OpImplParams.
Utilities for rational number calculation.
64-bit Rational number (pair of numerator and denominator).
SwsAArch64OpImplParams describes the parameters for an SwsUOpType operation.
Main external API structure.
Helper struct for representing a list of operations.
#define SWS_COMP_ELEMS(N)
#define SWS_COMP_MASK(X, Y, Z, W)
uint8_t SwsCompMask
Bit-mask of components.
static av_const int ff_sws_pixel_type_size(SwsPixelType type)