|
FFmpeg
|
#include "libavutil/avassert.h"#include "libavutil/avstring.h"#include "libavutil/bswap.h"#include "libavutil/mem.h"#include "libavutil/rational.h"#include "libavutil/refstruct.h"#include "ops.h"#include "ops_internal.h"Go to the source code of this file.
Macros | |
| #define | PRINTQ(q) print_q(q, (char[32]){0}, sizeof(char[32])) |
Functions | |
| const char * | ff_sws_pixel_type_name (SwsPixelType type) |
| int | ff_sws_pixel_type_size (SwsPixelType type) |
| bool | ff_sws_pixel_type_is_int (SwsPixelType type) |
| const char * | ff_sws_op_type_name (SwsOpType op) |
| static AVRational | av_min_q (AVRational a, AVRational b) |
| static AVRational | av_max_q (AVRational a, AVRational b) |
| void | ff_sws_apply_op_q (const SwsOp *op, AVRational x[4]) |
| Apply an operation to an AVRational. More... | |
| static SwsCompFlags | merge_comp_flags (SwsCompFlags a, SwsCompFlags b) |
| static void | propagate_flags (SwsOp *op, const SwsComps *prev) |
| static void | clear_undefined_values (AVRational dst[4], const AVRational src[4]) |
| void | ff_sws_op_list_update_comps (SwsOpList *ops) |
| Infer + propagate known information about components. More... | |
| static void | op_uninit (SwsOp *op) |
| SwsOpList * | ff_sws_op_list_alloc (void) |
| void | ff_sws_op_list_free (SwsOpList **p_ops) |
| SwsOpList * | ff_sws_op_list_duplicate (const SwsOpList *ops) |
Returns a duplicate of ops, or NULL on OOM. More... | |
| 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. More... | |
| 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. More... | |
| void | ff_sws_op_list_remove_at (SwsOpList *ops, int index, int count) |
| int | ff_sws_op_list_insert_at (SwsOpList *ops, int index, SwsOp *op) |
| 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. More... | |
| bool | ff_sws_op_list_is_noop (const SwsOpList *ops) |
| Returns whether an op list represents a true no-op operation, i.e. More... | |
| int | ff_sws_op_list_max_size (const SwsOpList *ops) |
Returns the size of the largest pixel type used in ops. More... | |
| uint32_t | ff_sws_linear_mask (const SwsLinearOp c) |
| static const char * | describe_lin_mask (uint32_t mask) |
| static char | describe_comp_flags (SwsCompFlags flags) |
| static const char * | describe_order (SwsSwizzleOp order, int planes, char buf[32]) |
| static const char * | print_q (const AVRational q, char buf[], int buf_len) |
| void | ff_sws_op_list_print (void *log, int lev, int lev_extra, const SwsOpList *ops) |
| Print out the contents of an operation list. More... | |
Variables | |
| const SwsOpBackend | backend_c |
| Copyright (C) 2025 Niklas Haas. More... | |
| const SwsOpBackend | backend_murder |
| const SwsOpBackend | backend_x86 |
| const SwsOpBackend | backend_vulkan |
| const SwsOpBackend *const | ff_sws_op_backends [] |
| static const SwsCompFlags | flags_identity = SWS_COMP_ZERO | SWS_COMP_EXACT |
| #define PRINTQ | ( | q | ) | print_q(q, (char[32]){0}, sizeof(char[32])) |
| const char* ff_sws_pixel_type_name | ( | SwsPixelType | type | ) |
Definition at line 48 of file ops.c.
Referenced by check_clear(), check_convert(), check_dither(), check_linear(), check_min_max(), check_read_write(), check_scale(), check_shift(), check_swizzle(), and ff_sws_op_list_print().
| int ff_sws_pixel_type_size | ( | SwsPixelType | type | ) |
Definition at line 63 of file ops.c.
Referenced by check_clear(), check_convert(), check_scale(), compile(), ff_sws_apply_op_q(), ff_sws_op_list_max_size(), ff_sws_pixel_expand(), ff_sws_solve_shuffle(), normalize_clear(), op_match(), rndq(), rw_pixel_bits(), and setup_swap_bytes().
| bool ff_sws_pixel_type_is_int | ( | SwsPixelType | type | ) |
Definition at line 78 of file ops.c.
Referenced by check_clear(), check_convert(), check_dither(), check_linear(), check_scale(), check_shift(), ff_sws_apply_op_q(), ff_sws_op_list_optimize(), ff_sws_op_list_update_comps(), and rndq().
| const char* ff_sws_op_type_name | ( | SwsOpType | op | ) |
Definition at line 95 of file ops.c.
Referenced by ff_sws_op_list_print().
|
static |
Definition at line 122 of file ops.c.
Referenced by ff_sws_apply_op_q().
|
static |
Definition at line 127 of file ops.c.
Referenced by ff_sws_apply_op_q().
| void ff_sws_apply_op_q | ( | const SwsOp * | op, |
| AVRational | x[4] | ||
| ) |
Apply an operation to an AVRational.
No-op for read/write operations.
Definition at line 132 of file ops.c.
Referenced by ff_sws_op_list_update_comps(), and op_commute_clear().
|
static |
Definition at line 243 of file ops.c.
Referenced by ff_sws_op_list_update_comps().
Definition at line 251 of file ops.c.
Referenced by ff_sws_op_list_update_comps().
|
static |
Definition at line 258 of file ops.c.
Referenced by ff_sws_op_list_update_comps().
| void ff_sws_op_list_update_comps | ( | SwsOpList * | ops | ) |
Infer + propagate known information about components.
Called automatically when needed by the optimizer and compiler.
Definition at line 267 of file ops.c.
Referenced by ff_sws_op_list_optimize(), and ff_sws_ops_compile_backend().
|
static |
Definition at line 504 of file ops.c.
Referenced by ff_sws_op_list_free(), ff_sws_op_list_insert_at(), and ff_sws_op_list_remove_at().
| SwsOpList* ff_sws_op_list_alloc | ( | void | ) |
Definition at line 515 of file ops.c.
Referenced by run_test().
| void ff_sws_op_list_free | ( | SwsOpList ** | p_ops | ) |
Definition at line 527 of file ops.c.
Referenced by ff_sws_compile_pass(), ff_sws_ops_compile_backend(), and run_test().
Returns a duplicate of ops, or NULL on OOM.
Definition at line 541 of file ops.c.
Referenced by ff_sws_ops_compile_backend().
Returns the input operation for a given op list, or NULL if there is none (e.g.
for a pure CLEAR-only operation list).
This will always be an op of type SWS_OP_READ.
Definition at line 570 of file ops.c.
Referenced by compile(), ff_sws_compile_pass(), ff_sws_op_list_is_noop(), and ff_sws_solve_shuffle().
Returns the output operation for a given op list, or NULL if there is none.
This will always be an op of type SWS_OP_WRITE.
Definition at line 579 of file ops.c.
Referenced by compile(), ff_sws_compile_pass(), and ff_sws_op_list_is_noop().
| void ff_sws_op_list_remove_at | ( | SwsOpList * | ops, |
| int | index, | ||
| int | count | ||
| ) |
Definition at line 588 of file ops.c.
Referenced by ff_sws_op_list_optimize().
Definition at line 598 of file ops.c.
Referenced by ff_sws_op_list_append(), and ff_sws_op_list_optimize().
| bool ff_sws_op_list_is_noop | ( | const SwsOpList * | ops | ) |
Returns whether an op list represents a true no-op operation, i.e.
may be eliminated entirely from an execution graph.
Note that this check is unlikely to ever be hit in practice, since it would imply the existence of planar formats with different plane orders between them, e.g. rgbap <-> gbrap, which doesn't currently exist. However, the check is cheap and lets me sleep at night.
Definition at line 617 of file ops.c.
Referenced by ff_sws_compile_pass(), and run_test().
| int ff_sws_op_list_max_size | ( | const SwsOpList * | ops | ) |
| uint32_t ff_sws_linear_mask | ( | const SwsLinearOp | c | ) |
Definition at line 657 of file ops.c.
Referenced by extract_swizzle(), and ff_sws_op_list_optimize().
|
static |
Definition at line 669 of file ops.c.
Referenced by ff_sws_op_list_print().
|
static |
Definition at line 710 of file ops.c.
Referenced by ff_sws_op_list_print().
|
static |
Definition at line 724 of file ops.c.
Referenced by ff_sws_op_list_print().
|
static |
| void ff_sws_op_list_print | ( | void * | log, |
| int | lev, | ||
| int | lev_extra, | ||
| const SwsOpList * | ops | ||
| ) |
Print out the contents of an operation list.
Definition at line 754 of file ops.c.
Referenced by compile(), ff_sws_compile_pass(), ff_sws_ops_compile(), and run_test().
| const SwsOpBackend backend_c |
Copyright (C) 2025 Niklas Haas.
This file is part of FFmpeg.
FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Definition at line 104 of file ops_backend.c.
| const SwsOpBackend backend_murder |
Definition at line 130 of file ops_memcpy.c.
| const SwsOpBackend backend_x86 |
| const SwsOpBackend backend_vulkan |
| const SwsOpBackend* const ff_sws_op_backends[] |
Definition at line 36 of file ops.c.
Referenced by check_ops(), and ff_sws_ops_compile().
|
static |
Definition at line 242 of file ops.c.
Referenced by ff_sws_op_list_update_comps().
1.8.17