Go to the documentation of this file.
44 for (
int i = 0;
i < 4;
i++) {
60 uint8_t
dst = move->
dst[
i] < 0 ? 0xf : move->
dst[
i];
61 uint8_t
src = move->
src[
i] < 0 ? 0xf : move->
src[
i];
62 uint64_t pair =
src | (
dst << 4);
63 mask |= pair << (
i * 8);
71 for (
int i = 0;
i < 4;
i++)
79 for (
int i = 0;
i < 4;
i++) {
80 for (
int j = 0; j < 5; j++) {
81 int jj = (j == 0) ? 4 : (j - 1);
83 mask |= 1ULL << (2 * ((5 *
i + j)));
85 mask |= 3ULL << (2 * ((5 *
i + j)));
94 for (
int i = 0;
i < 4;
i++) {
112 return (
int) pa->
uop - pb->
uop;
128 return (
int) ia -
ib;
140 return (
int) ia -
ib;
155 return (
int) ia -
ib;
180 if (!node || !
copy) {
233 .
name =
"collect_ops",
247 if (
op->rw.filter.op)
344 #define FUNC_NAME_WIDTH 45
345 #define UOP_NAME_WIDTH 21
346 #define TYPE_NAME_WIDTH 14
376 av_strlcatf(func_name,
sizeof(func_name),
"_%u_%s_%04x_neon,",
385 av_bprintf(bp,
"ENTRY(%-*s { .uop = %-*s .block_size = %2u, .type = %-*s .mask = 0x%x",
391 av_bprintf(bp,
", .par.move = { .num_moves = %d, .dst = {%d, %d, %d, %d, %d, %d}, .src = {%d, %d, %d, %d, %d, %d} }",
400 av_bprintf(bp,
", .par.pack = { .pattern = {%d, %d, %d, %d} }",
416 av_bprintf(bp,
", .par.dither = { .y_offset = {%u, %u, %u, %u}, .size_log2 = %u }",
429 FILE *fp = (FILE *) opaque;
434 fprintf(fp,
"%s\n", bp.str);
443 int main(
int argc,
char *argv[])
449 _setmode(_fileno(stdout), _O_BINARY);
471 printf(
" * This file is automatically generated. Do not edit manually.\n");
472 printf(
" * To regenerate, run: make fate-sws-ops-entries-aarch64 GEN=1\n");
static void error(const char *err)
#define AV_BPRINT_SIZE_UNLIMITED
static int collect_ops_compile(SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
__device__ int printf(const char *,...)
SwsOpList * ff_sws_op_list_duplicate(const SwsOpList *ops)
Returns a duplicate of ops, or NULL on OOM.
static void serialize_op(AVBPrint *bp, const SwsAArch64OpImplParams *params)
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
static uint16_t dither_to_mask(const SwsAArch64OpImplParams *p, const SwsDitherUOp *dither)
void * av_tree_insert(AVTreeNode **tp, void *key, int(*cmp)(const void *key, const void *b), AVTreeNode **next)
Insert or remove an element.
int ff_sws_op_list_max_size(const SwsOpList *ops)
Returns the size of the largest pixel type used in ops.
static uint64_t linear_to_mask(const SwsLinearUOp *linear)
static const char pixel_types[SWS_PIXEL_TYPE_NB][32]
static const char pixel_type_names[SWS_PIXEL_TYPE_NB][4]
static int linear(InterplayACMContext *s, unsigned ind, unsigned col)
struct AVTreeNode * av_tree_node_alloc(void)
Allocate an AVTreeNode.
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
void av_tree_enumerate(AVTreeNode *t, void *opaque, int(*cmp)(void *opaque, void *elem), int(*enu)(void *opaque, void *elem))
Apply enu(opaque, &elem) to all the elements in the tree in a given range.
SwsGraph * ff_sws_graph_alloc(void)
Allocate an empty SwsGraph.
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
static uint16_t clear_to_mask(const SwsClearUOp *clear)
#define flags(name, subs,...)
static int ff_sws_enum_op_lists(SwsContext *ctx, void *opaque, enum AVPixelFormat src_fmt, enum AVPixelFormat dst_fmt, int(*cb)(SwsContext *ctx, void *opaque, SwsOpList *ops))
Helper function to enumerate over all possible (optimized) operation lists, under the current set of ...
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
SwsAArch64OpImplParams params
static int aarch64_op_impl_cmp(const void *a, const void *b)
int8_t dst[SWS_UOP_MOVE_MAX]
static int print_op(void *opaque, void *elem)
void av_tree_destroy(AVTreeNode *t)
static uint64_t move_to_mask(const SwsMoveUOp *move)
#define NIBBLE_SET(mask, idx, val)
void ff_sws_graph_free(SwsGraph **pgraph)
Uninitialize any state associate with this filter graph and free it.
static void copy(const float *p1, float *p2, const int length)
@ SWS_OP_FLAG_SPLIT_MEMCPY
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
SwsContext * sws_alloc_context(void)
Allocate an empty SwsContext and set its fields to default values.
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)
static uint16_t pack_to_mask(const SwsPackUOp *pack)
static const char op_type_names[SWS_UOP_TYPE_NB][16]
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
#define xf(width, name, var, range_min, range_max, subs,...)
void av_bprintf(AVBPrint *buf, const char *fmt,...)
static int convert_to_aarch64_impl(SwsContext *ctx, const SwsOpList *ops, int n, int block_size, SwsAArch64OpImplParams *out)
Convert SwsOp to a SwsAArch64OpImplParams.
int main(int argc, char *argv[])
static int aarch64_collect_op(const SwsAArch64OpImplParams *params, struct AVTreeNode **root)
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
static int register_op(SwsContext *ctx, void *opaque, SwsOpList *ops)
int ff_sws_compile_pass(SwsGraph *graph, const SwsOpBackend *backend, SwsOpList **pops, int flags, SwsPass *input, SwsPass **output)
Resolves an operation list to a graph pass.
SwsAArch64OpImplParams describes the parameters for an SwsUOpType operation.
Filter graph, which represents a 'baked' pixel format conversion.
void sws_free_context(SwsContext **ctx)
Free the context and everything associated with it, and write NULL to the provided pointer.
int8_t src[SWS_UOP_MOVE_MAX]
static const char uop_types[SWS_UOP_TYPE_NB][32]
static uint16_t nibble_mask(SwsCompMask mask)
Helper struct for representing a list of operations.
Main external API structure.
static const SwsOpBackend backend_collect