Go to the documentation of this file.
24 # error Should only be included from ops_tmpl_*.c!
27 #define WRAP_CONVERT_UINT(N) \
28 DECL_PATTERN(convert_uint##N) \
30 u##N##block_t xu, yu, zu, wu; \
33 for (int i = 0; i < SWS_BLOCK_SIZE; i++) { \
44 CONTINUE(u##N##block_t, xu, yu, zu, wu); \
47 WRAP_COMMON_PATTERNS(convert_uint##N, \
48 .op = SWS_OP_CONVERT, \
49 .convert.to = SWS_PIXEL_U##N, \
60 #if BIT_DEPTH != 32 || defined(IS_FLOAT)
69 x[
i] = impl->priv.px[0];
71 y[
i] = impl->priv.px[1];
73 z[
i] = impl->priv.px[2];
75 w[
i] = impl->priv.px[3];
81 #define WRAP_CLEAR(X, Y, Z, W) \
82 DECL_IMPL(clear##_##X##Y##Z##W) \
84 CALL(clear, X, Y, Z, W); \
87 DECL_ENTRY(clear##_##X##Y##Z##W, \
88 .setup = ff_sws_setup_q4, \
91 .unused = { !X, !Y, !Z, !W }, \
112 x[
i] =
FFMIN(x[
i], impl->priv.px[0]);
114 y[
i] =
FFMIN(y[
i], impl->priv.px[1]);
116 z[
i] =
FFMIN(z[
i], impl->priv.px[2]);
129 x[
i] =
FFMAX(x[
i], impl->priv.px[0]);
131 y[
i] =
FFMAX(y[
i], impl->priv.px[1]);
133 z[
i] =
FFMAX(z[
i], impl->priv.px[2]);
#define WRAP_CLEAR(X, Y, Z, W)
#define WRAP_CONVERT_UINT(N)
Copyright (C) 2025 Niklas Haas.
WRAP_COMMON_PATTERNS(min,.op=SWS_OP_MIN,.setup=ff_sws_setup_q4,.flexible=true,)
int ff_sws_setup_q(const SwsOp *op, SwsOpPriv *out)
#define CONTINUE(TYPE,...)
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 SWS_BLOCK_SIZE
Copyright (C) 2025 Niklas Haas.
#define i(width, name, range_min, range_max)
int ff_sws_setup_q4(const SwsOp *op, SwsOpPriv *out)
static void scale(int *out, const int *in, const int w, const int h, const int shift)