Go to the documentation of this file.
21 #ifndef SWSCALE_UOPS_H
22 #define SWSCALE_UOPS_H
61 static_assert(
sizeof(
SwsPixel) ==
sizeof(
char[4]),
"SwsPixel size mismatch");
70 #define SWS_COMP(X) (1 << (X))
71 #define SWS_COMP_TEST(mask, X) (!!((mask) & SWS_COMP(X)))
72 #define SWS_COMP_INV(mask) ((mask) ^ SWS_COMP_ALL)
73 #define SWS_COMP_ELEMS(N) ((1 << (N)) - 1)
74 #define SWS_COMP_MASK(X, Y, Z, W) \
75 (((X) ? SWS_COMP(0) : 0) | \
76 ((Y) ? SWS_COMP(1) : 0) | \
77 ((Z) ? SWS_COMP(2) : 0) | \
78 ((W) ? SWS_COMP(3) : 0))
154 #define SWS_UOP_MOVE_MAX 6
232 #define SWS_UOP_NAME_MAX 64
int ff_sws_uops_macros_gen(char **out_str)
Generate a set of boilerplate C preprocessor macros for describing and programmatically iterating ove...
static int ff_sws_uop_cmp_v(const void *a, const void *b)
int ff_sws_uop_cmp(const SwsUOp *a, const SwsUOp *b)
Compare two SwsUOps for equality (excluding constant data).
Represents a computed filter kernel.
void ff_sws_uop_list_free(SwsUOpList **ops)
const char * ff_sws_pixel_type_name(SwsPixelType type)
#define SWS_UOP_NAME_MAX
Generate a unique name for a SwsUOp.
SwsUOpList * ff_sws_uop_list_alloc(void)
int ff_sws_pixel_type_size(SwsPixelType type) av_const
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
bool ff_sws_pixel_type_is_int(SwsPixelType type) av_const
SwsFilterWeights * kernel
static const uint16_t dither[8][8]
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 AVFormatContext * ctx
uint8_t SwsCompMask
Bit-mask of components.
int8_t dst[SWS_UOP_MOVE_MAX]
@ SWS_UOP_READ_PLANAR_FV_FMA
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
void ff_sws_uop_name(const SwsUOp *op, char buf[SWS_UOP_NAME_MAX])
int ff_sws_uop_list_append(SwsUOpList *uops, SwsUOp *uop)
int ff_sws_ops_translate(SwsContext *ctx, const SwsOpList *ops, SwsUOpFlags flags, SwsUOpList *uops)
Translate a list of operations down to micro-ops, which can be further optimized and then directly ex...
int8_t src[SWS_UOP_MOVE_MAX]
Helper struct for representing a list of operations.
Main external API structure.
int ff_sws_dither_height(const SwsDitherUOp *dither)
Computes (1 << size_log2) + MAX(y_offset).