FFmpeg
ops.h
Go to the documentation of this file.
1 /**
2  * Copyright (C) 2025 Niklas Haas
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef SWSCALE_OPS_H
22 #define SWSCALE_OPS_H
23 
24 #include <assert.h>
25 #include <stdbool.h>
26 #include <stdalign.h>
27 
28 #include "libavutil/bprint.h"
29 
30 #include "graph.h"
31 #include "filters.h"
32 #include "rational64.h"
33 #include "uops.h"
34 
35 typedef enum SwsOpType {
37 
38  /* Defined for all types; but implemented for integers only */
39  SWS_OP_READ, /* gather raw pixels from planes */
40  SWS_OP_WRITE, /* write raw pixels to planes */
41  SWS_OP_SWAP_BYTES, /* swap byte order (for differing endianness) */
42  SWS_OP_SWIZZLE, /* rearrange channel order, or duplicate channels */
43 
44  /* Bit manipulation operations. Defined for integers only. */
45  SWS_OP_UNPACK, /* split tightly packed data into components */
46  SWS_OP_PACK, /* compress components into tightly packed data */
47  SWS_OP_LSHIFT, /* logical left shift of raw pixel values */
48  SWS_OP_RSHIFT, /* right shift of raw pixel values */
49 
50  /* Generic arithmetic. Defined and implemented for all types */
51  SWS_OP_CLEAR, /* clear pixel values */
52  SWS_OP_CONVERT, /* convert (cast) between formats */
53  SWS_OP_MIN, /* numeric minimum */
54  SWS_OP_MAX, /* numeric maximum */
55  SWS_OP_SCALE, /* multiplication by scalar */
56 
57  /* Floating-point only arithmetic operations. */
58  SWS_OP_LINEAR, /* generalized linear affine transform */
59  SWS_OP_DITHER, /* add dithering noise */
60 
61  /* Filtering operations. */
62  SWS_OP_FILTER_H, /* horizontal filtering */
63  SWS_OP_FILTER_V, /* vertical filtering */
64 
66 } SwsOpType;
67 
68 const char *ff_sws_op_type_name(SwsOpType op);
69 
70 /* Compute SwsCompMask from values with denominator != 0 */
72 
73 typedef enum SwsCompFlags {
74  SWS_COMP_GARBAGE = 1 << 0, /* contents are undefined / garbage data */
75  SWS_COMP_EXACT = 1 << 1, /* value is an exact integer */
76  SWS_COMP_ZERO = 1 << 2, /* known to be a constant zero */
77  SWS_COMP_SWAPPED = 1 << 3, /* byte order is swapped */
78  SWS_COMP_COPY = 1 << 4, /* value is unmodified from the source plane */
79  SWS_COMP_CONST = 1 << 5, /* value is a fixed constant */
80 } SwsCompFlags;
81 
82 typedef struct SwsComps {
83  SwsCompFlags flags[4]; /* knowledge about (output) component contents */
84 
85  /* Keeps track of the known possible value range, or {0, 0} for undefined
86  * or (unknown range) floating point inputs */
88 } SwsComps;
89 
90 typedef enum SwsReadWriteMode {
91  /**
92  * Note: 1-component reads are either SWS_RW_PLANAR or SWS_RW_PACKED,
93  * depending on the underlying interpretation. If multiple components are
94  * packed into one element (e.g. rgb10a2 -> u16), they are marked as
95  * SWS_RW_PACKED. Otherwise (e.g. gray16le), they are SWS_RW_PLANAR.
96  *
97  * This is a purely semantic/informative difference; the underlying code
98  * treats 1-components reads/writes the same regardless of mode.
99  */
100  SWS_RW_PLANAR, /* one plane per component */
101  SWS_RW_PACKED, /* all components on a single plane */
102  SWS_RW_PALETTE, /* plane 0 is 8-bit index, plane 1 is packed palette */
104 
105 typedef struct SwsReadWriteOp {
106  /**
107  * Examples:
108  * rgba = 4x u8 packed
109  * yuv444p = 3x u8
110  * rgb565 = 1x u16 <- use SWS_OP_UNPACK to unpack
111  * monow = 1x u8 (frac 3)
112  * rgb4 = 1x u8 (frac 1)
113  * pal8 = 4x u8 (palette)
114  */
115  SwsReadWriteMode mode; /* how data is laid out in memory */
116  uint8_t elems; /* number of elements (of type `op.type`) to read/write */
117  uint8_t frac; /* fractional pixel step factor (log2) */
118 
119  /**
120  * Filter kernel to apply to each plane while sampling. Currently, only
121  * one shared filter kernel is supported for all planes. (Optional)
122  *
123  * Note: As with SWS_OP_FILTER_*, if a filter kernel is in use, the read
124  * operation will always output floating point values.
125  */
126  struct {
127  SwsOpType op; /* some value of SWS_OP_FILTER_* */
128  SwsFilterWeights *kernel; /* (refstruct) */
129  SwsPixelType type; /* pixel type to store result as */
130  } filter;
132 
133 typedef struct SwsPackOp {
134  /**
135  * Packed bits are assumed to be LSB-aligned within the underlying
136  * integer type; i.e. (msb) 0 ... X Y Z W (lsb).
137  */
138  uint8_t pattern[4]; /* bit depth pattern, from MSB to LSB */
139 } SwsPackOp;
140 
141 typedef struct SwsSwizzleOp {
142  /**
143  * Input component for each output component:
144  * Out[x] := In[swizzle.in[x]]
145  */
146  union {
147  uint32_t mask;
148  uint8_t in[4];
149  struct { uint8_t x, y, z, w; };
150  };
151 } SwsSwizzleOp;
152 
153 #define SWS_SWIZZLE(X,Y,Z,W) ((SwsSwizzleOp) { .in = {X, Y, Z, W} })
155 
156 typedef struct SwsShiftOp {
157  uint8_t amount; /* number of bits to shift */
158 } SwsShiftOp;
159 
160 typedef struct SwsClearOp {
161  SwsCompMask mask; /* mask of components to clear */
162  AVRational64 value[4]; /* value to set */
163 } SwsClearOp;
164 
165 typedef struct SwsConvertOp {
166  SwsPixelType to; /* type of pixel to convert to */
167  bool expand; /* if true, integers are expanded to the full range */
168 } SwsConvertOp;
169 
170 typedef struct SwsClampOp {
171  AVRational64 limit[4]; /* per-component min/max value */
172 } SwsClampOp;
173 
174 typedef struct SwsScaleOp {
175  AVRational64 factor; /* scalar multiplication factor */
176 } SwsScaleOp;
177 
178 typedef struct SwsDitherOp {
179  AVRational64 *matrix; /* tightly packed dither matrix (refstruct) */
180  AVRational64 min, max; /* minimum/maximum value in `matrix` */
181  int size_log2; /* size (in bits) of the dither matrix */
182  int8_t y_offset[4]; /* row offset for each component, or -1 for ignored */
183 } SwsDitherOp;
184 
185 typedef struct SwsLinearOp {
186  /**
187  * Generalized 5x5 affine transformation:
188  * [ Out.x ] = [ A B C D E ]
189  * [ Out.y ] = [ F G H I J ] * [ x y z w 1 ]
190  * [ Out.z ] = [ K L M N O ]
191  * [ Out.w ] = [ P Q R S T ]
192  *
193  * The mask keeps track of which components differ from an identity matrix.
194  * There may be more efficient implementations of particular subsets, for
195  * example the common subset of {A, E, G, J, M, O} can be implemented with
196  * just three fused multiply-add operations.
197  */
199  uint32_t mask; /* m[i][j] <-> 1 << (5 * i + j) */
200 } SwsLinearOp;
201 
202 /* Helper function to compute the correct mask */
203 uint32_t ff_sws_linear_mask(const SwsLinearOp *c);
204 
205 typedef struct SwsFilterOp {
206  SwsFilterWeights *kernel; /* filter kernel (refstruct) */
207  SwsPixelType type; /* pixel type to store result as */
208 } SwsFilterOp;
209 
210 typedef struct SwsOp {
211  SwsOpType op; /* operation to perform */
212  SwsPixelType type; /* pixel type to operate on */
213  union {
225  };
226 
227  /**
228  * Metadata about the operation's input/output components. Discarded
229  * and regenerated automatically by `ff_sws_op_list_update_comps()`.
230  *
231  * Note that backends may rely on the presence and accuracy of this
232  * metadata for all operations, during ff_sws_ops_compile().
233  */
235 } SwsOp;
236 
237 #define SWS_OP_NEEDED(op, idx) (!((op)->comps.flags[idx] & SWS_COMP_GARBAGE))
238 
239 /* Compute SwsCompMask from a mask of needed components */
241 
242 /**
243  * Return the number of planes involved in a read/write operation.
244  */
245 int ff_sws_rw_op_planes(const SwsOp *op);
246 
247 /**
248  * Describe an operation in human-readable form.
249  */
250 void ff_sws_op_desc(AVBPrint *bp, const SwsOp *op);
251 
252 /**
253  * Frees any allocations associated with an SwsOp and sets it to {0}.
254  */
255 void ff_sws_op_uninit(SwsOp *op);
256 
257 /**
258  * Apply an operation to an AVRational64. No-op for read/write operations.
259  */
260 void ff_sws_apply_op_q(const SwsOp *op, AVRational64 x[4]);
261 
262 /**
263  * Helper struct for representing a list of operations.
264  */
265 typedef struct SwsOpList {
267  int num_ops;
268 
269  /* Metadata associated with this operation list */
271 
272  /* Input/output plane indices */
273  uint8_t plane_src[4], plane_dst[4];
274 
275  /**
276  * Source component metadata associated with pixel values from each
277  * corresponding component (in plane/memory order, i.e. not affected by
278  * `plane_src`). Lets the optimizer know additional information about
279  * the value range and/or pixel data to expect.
280  *
281  * The default value of {0} is safe to pass in the case that no additional
282  * information is known.
283  */
285 } SwsOpList;
286 
288 void ff_sws_op_list_free(SwsOpList **ops);
289 
290 /**
291  * Returns a duplicate of `ops`, or NULL on OOM.
292  */
294 
295 /**
296  * Returns the input operation for a given op list, or NULL if there is none
297  * (e.g. for a pure CLEAR-only operation list).
298  *
299  * This will always be an op of type SWS_OP_READ.
300  */
301 const SwsOp *ff_sws_op_list_input(const SwsOpList *ops);
302 
303 /**
304  * Returns the output operation for a given op list, or NULL if there is none.
305  *
306  * This will always be an op of type SWS_OP_WRITE.
307  */
308 const SwsOp *ff_sws_op_list_output(const SwsOpList *ops);
309 
310 /**
311  * Returns whether an op list represents a true no-op operation, i.e. may be
312  * eliminated entirely from an execution graph.
313  */
314 bool ff_sws_op_list_is_noop(const SwsOpList *ops);
315 
316 /**
317  * Returns the size of the largest pixel type used in `ops`.
318  */
319 int ff_sws_op_list_max_size(const SwsOpList *ops);
320 
321 /**
322  * These will take over ownership of `op` and set it to {0}, even on failure.
323  */
326 
327 void ff_sws_op_list_remove_at(SwsOpList *ops, int index, int count);
328 
329 /**
330  * Print out the contents of an operation list.
331  */
332 void ff_sws_op_list_print(void *log_ctx, int log_level, int log_level_extra,
333  const SwsOpList *ops);
334 
335 /**
336  * Infer + propagate known information about components. Called automatically
337  * when needed by the optimizer and compiler.
338  */
340 
341 /**
342  * Fuse compatible and eliminate redundant operations, as well as replacing
343  * some operations with more efficient alternatives.
344  */
346 
347 #endif
SWS_OP_READ
@ SWS_OP_READ
Definition: ops.h:39
SwsClearOp::value
AVRational64 value[4]
Definition: ops.h:162
ff_sws_op_list_input
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.
Definition: ops.c:700
SWS_OP_SWIZZLE
@ SWS_OP_SWIZZLE
Definition: ops.h:42
SWS_OP_LSHIFT
@ SWS_OP_LSHIFT
Definition: ops.h:47
SWS_OP_UNPACK
@ SWS_OP_UNPACK
Definition: ops.h:45
SwsClearOp
Definition: ops.h:160
SWS_RW_PLANAR
@ SWS_RW_PLANAR
Note: 1-component reads are either SWS_RW_PLANAR or SWS_RW_PACKED, depending on the underlying interp...
Definition: ops.h:100
SwsSwizzleOp::mask
uint32_t mask
Definition: ops.h:147
SwsOpList::comps_src
SwsComps comps_src
Source component metadata associated with pixel values from each corresponding component (in plane/me...
Definition: ops.h:284
SWS_COMP_ZERO
@ SWS_COMP_ZERO
Definition: ops.h:76
SWS_OP_CLEAR
@ SWS_OP_CLEAR
Definition: ops.h:51
SwsOp::swizzle
SwsSwizzleOp swizzle
Definition: ops.h:217
SwsSwizzleOp::z
uint8_t z
Definition: ops.h:149
SwsOp::convert
SwsConvertOp convert
Definition: ops.h:220
mask
int mask
Definition: mediacodecdec_common.c:154
SwsOp::rw
SwsReadWriteOp rw
Definition: ops.h:215
SWS_OP_DITHER
@ SWS_OP_DITHER
Definition: ops.h:59
SwsFilterWeights
Represents a computed filter kernel.
Definition: filters.h:85
SwsFilterOp
Definition: ops.h:205
ff_sws_op_list_max_size
int ff_sws_op_list_max_size(const SwsOpList *ops)
Returns the size of the largest pixel type used in ops.
Definition: ops.c:778
SWS_OP_TYPE_NB
@ SWS_OP_TYPE_NB
Definition: ops.h:65
ff_sws_linear_mask
uint32_t ff_sws_linear_mask(const SwsLinearOp *c)
Definition: ops.c:789
SwsScaleOp::factor
AVRational64 factor
Definition: ops.h:175
SwsOpList::plane_dst
uint8_t plane_dst[4]
Definition: ops.h:273
SwsSwizzleOp::w
uint8_t w
Definition: ops.h:149
SwsClearOp::mask
SwsCompMask mask
Definition: ops.h:161
SwsOpList::num_ops
int num_ops
Definition: ops.h:267
SwsCompFlags
SwsCompFlags
Definition: ops.h:73
SwsDitherOp
Definition: ops.h:178
ff_sws_op_uninit
void ff_sws_op_uninit(SwsOp *op)
Frees any allocations associated with an SwsOp and sets it to {0}.
ff_sws_op_list_alloc
SwsOpList * ff_sws_op_list_alloc(void)
Definition: ops.c:636
SwsReadWriteOp
Definition: ops.h:105
SwsSwizzleOp
Definition: ops.h:141
SwsLinearOp::mask
uint32_t mask
Definition: ops.h:199
SwsOp::op
SwsOpType op
Definition: ops.h:211
SWS_RW_PACKED
@ SWS_RW_PACKED
Definition: ops.h:101
SWS_OP_SCALE
@ SWS_OP_SCALE
Definition: ops.h:55
SwsOp::clear
SwsClearOp clear
Definition: ops.h:219
ff_sws_op_list_append
int ff_sws_op_list_append(SwsOpList *ops, SwsOp *op)
These will take over ownership of op and set it to {0}, even on failure.
Definition: ops.c:743
SwsFilterOp::kernel
SwsFilterWeights * kernel
Definition: ops.h:206
ff_sws_op_list_insert_at
int ff_sws_op_list_insert_at(SwsOpList *ops, int index, SwsOp *op)
Definition: ops.c:729
op
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.
Definition: anm.c:76
SWS_OP_MIN
@ SWS_OP_MIN
Definition: ops.h:53
SwsCompMask
uint8_t SwsCompMask
Bit-mask of components.
Definition: uops.h:61
SWS_OP_LINEAR
@ SWS_OP_LINEAR
Definition: ops.h:58
SWS_OP_FILTER_H
@ SWS_OP_FILTER_H
Definition: ops.h:62
ff_sws_op_desc
void ff_sws_op_desc(AVBPrint *bp, const SwsOp *op)
Describe an operation in human-readable form.
Definition: ops.c:853
SWS_OP_PACK
@ SWS_OP_PACK
Definition: ops.h:46
ff_sws_rw_op_planes
int ff_sws_rw_op_planes(const SwsOp *op)
Return the number of planes involved in a read/write operation.
Definition: ops.c:170
SwsOp::dither
SwsDitherOp dither
Definition: ops.h:223
SwsReadWriteOp::kernel
SwsFilterWeights * kernel
Definition: ops.h:128
filters.h
ff_sws_op_list_duplicate
SwsOpList * ff_sws_op_list_duplicate(const SwsOpList *ops)
Returns a duplicate of ops, or NULL on OOM.
Definition: ops.c:663
SwsReadWriteOp::frac
uint8_t frac
Definition: ops.h:117
ff_sws_op_list_is_noop
bool ff_sws_op_list_is_noop(const SwsOpList *ops)
Returns whether an op list represents a true no-op operation, i.e.
Definition: ops.c:748
SWS_COMP_GARBAGE
@ SWS_COMP_GARBAGE
Definition: ops.h:74
SwsConvertOp::to
SwsPixelType to
Definition: ops.h:166
SWS_OP_FILTER_V
@ SWS_OP_FILTER_V
Definition: ops.h:63
ff_sws_op_list_print
void ff_sws_op_list_print(void *log_ctx, int log_level, int log_level_extra, const SwsOpList *ops)
Print out the contents of an operation list.
Definition: ops.c:960
SwsOp::clamp
SwsClampOp clamp
Definition: ops.h:221
SwsOpType
SwsOpType
Copyright (C) 2025 Niklas Haas.
Definition: ops.h:35
SwsDitherOp::matrix
AVRational64 * matrix
Definition: ops.h:179
SwsPixelType
SwsPixelType
Definition: uops.h:38
index
int index
Definition: gxfenc.c:90
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
SwsConvertOp::expand
bool expand
Definition: ops.h:167
SwsPackOp::pattern
uint8_t pattern[4]
Packed bits are assumed to be LSB-aligned within the underlying integer type; i.e.
Definition: ops.h:138
ff_sws_apply_op_q
void ff_sws_apply_op_q(const SwsOp *op, AVRational64 x[4])
Apply an operation to an AVRational64.
Definition: ops.c:194
ff_sws_op_list_free
void ff_sws_op_list_free(SwsOpList **ops)
Definition: ops.c:649
SwsDitherOp::size_log2
int size_log2
Definition: ops.h:181
SwsClampOp
Definition: ops.h:170
SwsOp::type
SwsPixelType type
Definition: ops.h:212
SwsShiftOp
Definition: ops.h:156
SWS_OP_RSHIFT
@ SWS_OP_RSHIFT
Definition: ops.h:48
SwsOp::lin
SwsLinearOp lin
Definition: ops.h:214
SwsOpList::src
SwsFormat src
Definition: ops.h:270
SWS_OP_INVALID
@ SWS_OP_INVALID
Definition: ops.h:36
SwsFormat
Definition: format.h:77
SwsShiftOp::amount
uint8_t amount
Definition: ops.h:157
AVRational64
64-bit Rational number (pair of numerator and denominator).
Definition: rational64.h:52
SWS_OP_WRITE
@ SWS_OP_WRITE
Definition: ops.h:40
SwsClampOp::limit
AVRational64 limit[4]
Definition: ops.h:171
ff_sws_op_list_output
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.
Definition: ops.c:709
SwsOp::comps
SwsComps comps
Metadata about the operation's input/output components.
Definition: ops.h:234
SwsScaleOp
Definition: ops.h:174
SWS_COMP_CONST
@ SWS_COMP_CONST
Definition: ops.h:79
SwsLinearOp
Definition: ops.h:185
ff_sws_op_list_update_comps
void ff_sws_op_list_update_comps(SwsOpList *ops)
Infer + propagate known information about components.
Definition: ops.c:346
SwsReadWriteOp::op
SwsOpType op
Definition: ops.h:127
ff_sws_op_list_optimize
int ff_sws_op_list_optimize(SwsOpList *ops)
Fuse compatible and eliminate redundant operations, as well as replacing some operations with more ef...
Definition: ops_optimizer.c:340
bprint.h
SwsOp::filter
SwsFilterOp filter
Definition: ops.h:224
ff_sws_comp_mask_q4
SwsCompMask ff_sws_comp_mask_q4(const AVRational64 q[4])
Definition: ops.c:137
SwsOpList::ops
SwsOp * ops
Definition: ops.h:266
SwsPackOp
Definition: ops.h:133
SwsFilterOp::type
SwsPixelType type
Definition: ops.h:207
SwsReadWriteOp::type
SwsPixelType type
Definition: ops.h:129
graph.h
SwsReadWriteMode
SwsReadWriteMode
Definition: ops.h:90
SwsOp
Definition: ops.h:210
SwsComps::flags
SwsCompFlags flags[4]
Definition: ops.h:83
SwsDitherOp::min
AVRational64 min
Definition: ops.h:180
SwsComps::min
AVRational64 min[4]
Definition: ops.h:87
SwsOpList::dst
SwsFormat dst
Definition: ops.h:270
SWS_OP_MAX
@ SWS_OP_MAX
Definition: ops.h:54
SWS_RW_PALETTE
@ SWS_RW_PALETTE
Definition: ops.h:102
SwsComps
Definition: ops.h:82
ff_sws_op_type_name
const char * ff_sws_op_type_name(SwsOpType op)
Definition: ops.c:109
SWS_COMP_SWAPPED
@ SWS_COMP_SWAPPED
Definition: ops.h:77
SwsSwizzleOp::y
uint8_t y
Definition: ops.h:149
SWS_OP_SWAP_BYTES
@ SWS_OP_SWAP_BYTES
Definition: ops.h:41
SWS_COMP_COPY
@ SWS_COMP_COPY
Definition: ops.h:78
SwsDitherOp::max
AVRational64 max
Definition: ops.h:180
SwsReadWriteOp::filter
struct SwsReadWriteOp::@575 filter
Filter kernel to apply to each plane while sampling.
SwsOp::shift
SwsShiftOp shift
Definition: ops.h:218
SwsSwizzleOp::x
uint8_t x
Definition: ops.h:149
SWS_COMP_EXACT
@ SWS_COMP_EXACT
Definition: ops.h:75
SwsReadWriteOp::elems
uint8_t elems
Definition: ops.h:116
SwsDitherOp::y_offset
int8_t y_offset[4]
Definition: ops.h:182
uops.h
rational64.h
SwsComps::max
AVRational64 max[4]
Definition: ops.h:87
SwsSwizzleOp::in
uint8_t in[4]
Definition: ops.h:148
SWS_OP_CONVERT
@ SWS_OP_CONVERT
Definition: ops.h:52
ff_sws_op_list_remove_at
void ff_sws_op_list_remove_at(SwsOpList *ops, int index, int count)
Definition: ops.c:718
SwsOp::scale
SwsScaleOp scale
Definition: ops.h:222
SwsConvertOp
Definition: ops.h:165
SwsReadWriteOp::mode
SwsReadWriteMode mode
Examples: rgba = 4x u8 packed yuv444p = 3x u8 rgb565 = 1x u16 <- use SWS_OP_UNPACK to unpack monow = ...
Definition: ops.h:115
SwsOpList::plane_src
uint8_t plane_src[4]
Definition: ops.h:273
SwsOpList
Helper struct for representing a list of operations.
Definition: ops.h:265
SwsOp::pack
SwsPackOp pack
Definition: ops.h:216
ff_sws_comp_mask_swizzle
void ff_sws_comp_mask_swizzle(SwsCompMask *mask, const SwsSwizzleOp *swiz)
Definition: ops.c:147
ff_sws_comp_mask_needed
SwsCompMask ff_sws_comp_mask_needed(const SwsOp *op)
Definition: ops.c:160
SwsLinearOp::m
AVRational64 m[4][5]
Generalized 5x5 affine transformation: [ Out.x ] = [ A B C D E ] [ Out.y ] = [ F G H I J ] * [ x y z ...
Definition: ops.h:198