88static_assert(
sizeof(
SwsPixel) ==
sizeof(
char[4]),
"SwsPixel size mismatch");
97#define SWS_COMP(X) (1 << (X))
98#define SWS_COMP_TEST(mask, X) (!!((mask) & SWS_COMP(X)))
99#define SWS_COMP_INV(mask) ((mask) ^ SWS_COMP_ALL)
100#define SWS_COMP_ELEMS(N) ((1 << (N)) - 1)
101#define SWS_COMP_COUNT(mask) (av_popcount((mask) & SWS_COMP_ALL))
102#define SWS_COMP_MASK(X, Y, Z, W) \
103 (((X) ? SWS_COMP(0) : 0) | \
104 ((Y) ? SWS_COMP(1) : 0) | \
105 ((Z) ? SWS_COMP(2) : 0) | \
106 ((W) ? SWS_COMP(3) : 0))
110#define ff_sws_comp_mask_str(mask) ff_sws_comp_mask_print(mask, (char[5]){0})
114 for (
int c = 0;
c < 4;
c++) {
206 #define SWS_UOP_MOVE_MAX 6
231#define SWS_MASK(I, J) (1 << (5 * (I) + (J)))
232#define SWS_MASK_OFF(I) SWS_MASK(I, 4)
233#define SWS_MASK_ROW(I) (0x1F << (5 * (I)))
234#define SWS_MASK_COL(J) (0x8421 << J)
235#define SWS_MASK_DIAG4 (0x41041)
297#define SWS_UOP_NAME_MAX 64
static AVFormatContext * ctx
#define flags(name, subs,...)
static uint64_t shuffle(uint64_t in, const uint8_t *shuffle, int shuffle_len)
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.
Macro definitions for various function/variable attributes.
static const uint16_t mask[17]
Main external API structure.
Represents a computed filter kernel.
Append a set of operations for applying a gamut/tone mapping 3D LUT to the pixels.
int8_t src[SWS_UOP_MOVE_MAX]
int8_t dst[SWS_UOP_MOVE_MAX]
Helper struct for representing a list of operations.
SwsFilterWeights * kernel
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...
int ff_sws_dither_height(const SwsDitherUOp *dither)
Computes (1 << size_log2) + MAX(y_offset).
int ff_sws_uop_list_append(SwsUOpList *uops, SwsUOp *uop)
int ff_sws_uop_list_optimize(SwsContext *ctx, SwsUOpFlags flags, SwsUOpList *uops)
Called internally by ff_sws_ops_translate().
void ff_sws_uop_name(const SwsUOp *op, char buf[SWS_UOP_NAME_MAX])
int ff_sws_uop_cmp(const SwsUOp *a, const SwsUOp *b)
Compare two SwsUOps for equality (excluding constant data).
#define SWS_COMP_TEST(mask, X)
@ SWS_UOP_READ_PLANAR_FV_FMA
SwsUOpList * ff_sws_uop_list_alloc(void)
const char * ff_sws_pixel_type_name(SwsPixelType type)
static int ff_sws_uop_cmp_v(const void *a, const void *b)
void ff_sws_uop_list_remove_at(SwsUOpList *uops, int index, int count)
static char * ff_sws_comp_mask_print(SwsCompMask mask, char buf[5])
int ff_sws_shuffle_mask(const SwsUOp *uop, int8_t shuffle[], int size)
Compute a shuffle mask for pshufb-style ASM functions, by repeating the shuffle pattern for as many g...
#define SWS_UOP_NAME_MAX
Generate a unique name for a SwsUOp.
static av_const bool ff_sws_pixel_type_is_int(SwsPixelType type)
uint8_t SwsCompMask
Bit-mask of components.
static av_const int ff_sws_pixel_type_size(SwsPixelType type)
void ff_sws_uop_list_free(SwsUOpList **ops)
static const uint16_t dither[8][8]