Go to the documentation of this file.
21 #ifndef SWSCALE_OPS_INTERNAL_H
22 #define SWSCALE_OPS_INTERNAL_H
28 #define Q(N) ((AVRational) { N, 1 })
43 for (
int i = 0;
i < 4;
i++) {
44 const int bits =
op->pack.pattern[
i];
76 static_assert(
sizeof(
SwsOpExec) == 24 *
sizeof(
void *) + 6 *
sizeof(
int32_t),
77 "SwsOpExec layout mismatch");
85 int bx_start,
int y_start,
int bx_end,
int y_end);
87 #define SWS_DECL_FUNC(NAME) \
88 void NAME(const SwsOpExec *, const void *, int, int, int, int)
static void read_bytes(const uint8_t *src, float *dst, int src_stride, int dst_stride, int width, int height, float scale)
#define Q(N)
Copyright (C) 2025 Niklas Haas.
int ff_sws_pixel_type_size(SwsPixelType type)
SwsPixelType
Copyright (C) 2025 Niklas Haas.
const SwsOpBackend *const ff_sws_op_backends[]
int(* compile)(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out)
Compile an operation list to an implementation chain.
int ff_sws_ops_compile_backend(SwsContext *ctx, const SwsOpBackend *backend, const SwsOpList *ops, SwsCompiledOp *out)
Attempt to compile a list of operations using a specific backend.
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.
static AVRational ff_sws_pixel_expand(SwsPixelType from, SwsPixelType to)
Global execution context for all compiled functions.
Rational number (pair of numerator and denominator).
static int shift(int a, int b)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define i(width, name, range_min, range_max)
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.
int ff_sws_ops_compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out)
Compile a list of operations using the best available backend.
static void write_bytes(const float *src, uint8_t *dst, int src_stride, int dst_stride, int width, int height, int depth, float scale)
int ff_sws_solve_shuffle(const SwsOpList *ops, uint8_t shuffle[], int size, uint8_t clear_val, int *read_bytes, int *write_bytes)
"Solve" an op list into a fixed shuffle mask, with an optional ability to also directly clear the out...
static void scale(int *out, const int *in, const int w, const int h, const int shift)
static void ff_sws_pack_op_decode(const SwsOp *op, uint64_t mask[4], int shift[4])
Helper struct for representing a list of operations.
Main external API structure.
static uint64_t shuffle(uint64_t in, const uint8_t *shuffle, int shuffle_len)