|
FFmpeg
|
#include <stdbool.h>#include "libavutil/avassert.h"#include "libavutil/mem.h"#include "libavutil/refstruct.h"#include "libavutil/tree.h"#include "ops.h"#include "ops_internal.h"#include "uops.h"Go to the source code of this file.
Macros | |
| #define | UOP_NAME(OP, ABBR) [SWS_UOP_##OP] = { "SWS_UOP_" #OP, ABBR, #OP } |
| #define | Q2PIXEL(val) pixel_from_q(op->type, val) |
| #define | BPRINT_STR(str) av_bprint_append_data(bp, str, strlen(str)) |
Functions | |
| int | ff_sws_uop_cmp (const SwsUOp *a, const SwsUOp *b) |
| Copyright (C) 2026 Niklas Haas. More... | |
| static SwsPixel | pixel_from_q (SwsPixelType type, AVRational val) |
| static bool | pixel_is_1s (SwsPixelType type, SwsPixel val) |
| void | ff_sws_uop_name (const SwsUOp *op, char buf[SWS_UOP_NAME_MAX]) |
| static int | generate_entry_struct (void *opaque, void *key) |
| static int | generate_entry_args (void *opaque, void *key) |
| static void | uop_uninit (SwsUOp *uop) |
| void | ff_sws_uop_list_free (SwsUOpList **p_ops) |
| SwsUOpList * | ff_sws_uop_list_alloc (void) |
| int | ff_sws_uop_list_append (SwsUOpList *uops, SwsUOp *uop) |
| int | ff_sws_dither_height (const SwsDitherUOp *dither) |
| Computes (1 << size_log2) + MAX(y_offset). More... | |
| static SwsPixelType | pixel_type_to_int (const SwsPixelType type) |
| static bool | exact_product_f32 (float a, float b) |
| static bool | exact_prod (SwsPixelType type, SwsPixel coef, const SwsComps *comps, int idx) |
| static bool | check_filter_fma (SwsContext *ctx, SwsUOpFlags flags, const SwsOp *op) |
| static int | translate_rw_op (SwsContext *ctx, SwsUOpList *ops, SwsUOpFlags flags, const SwsOp *op) |
| static int | count_idx (const int *arr, size_t size, int val) |
| static int | translate_move (SwsUOpList *ops, const SwsOp *op) |
| static int | translate_swizzle (SwsUOpList *ops, SwsUOpFlags flags, const SwsOp *op) |
| static int | translate_dither_op (SwsUOpList *ops, const SwsOp *op) |
| static int | translate_linear_op (SwsContext *ctx, SwsUOpList *ops, SwsUOpFlags flags, const SwsOp *op, const SwsComps *input) |
| static bool | is_expand_bit (SwsPixelType type, AVRational factor) |
| static int | translate_op (SwsContext *ctx, SwsUOpList *uops, SwsUOpFlags flags, const SwsOp *op, const SwsComps *input) |
| 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 executed by backends. More... | |
| static int | register_uop (struct AVTreeNode **root, const SwsUOp *uop) |
| static int | register_flags (SwsContext *ctx, const SwsOpList *ops, SwsUOpFlags flags) |
| static int | register_uops (SwsContext *ctx, const SwsOpList *ops, SwsCompiledOp *out) |
| static int | register_all_uops (SwsContext *ctx, void *graph, SwsOpList *ops) |
| static int | enum_type (void *opaque, void *elem) |
| static int | free_uop_key (void *opaque, void *key) |
| int | ff_sws_uops_macros_gen (char **out_str) |
| Generate a set of boilerplate C preprocessor macros for describing and programmatically iterating over all possible SwsUOps. More... | |
Variables | |
| struct { | |
| char full [32] | |
| char abbr [32] | |
| char macro [32] | |
| } | uop_names [SWS_UOP_TYPE_NB] |
| struct { | |
| char full [16] | |
| char prefix [8] | |
| } | pixel_types [SWS_PIXEL_TYPE_NB] |
| static const SwsUOpFlags | uop_flags [] |
| static const SwsOpBackend | backend_uops |
| static const SwsFlags | flags [] |
| #define BPRINT_STR | ( | str | ) | av_bprint_append_data(bp, str, strlen(str)) |
Copyright (C) 2026 Niklas Haas.
Compare two SwsUOps for equality (excluding constant data).
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 32 of file uops.c.
Referenced by ff_sws_uop_cmp_v(), and ff_sws_uop_lookup().
|
static |
Definition at line 98 of file uops.c.
Referenced by exact_prod().
|
static |
Definition at line 116 of file uops.c.
Referenced by translate_op().
| void ff_sws_uop_name | ( | const SwsUOp * | op, |
| char | buf[SWS_UOP_NAME_MAX] | ||
| ) |
Definition at line 129 of file uops.c.
Referenced by compile(), ff_sws_uop_lookup(), generate_entry_args(), generate_entry_struct(), and print_ops().
|
static |
Definition at line 223 of file uops.c.
Referenced by ff_sws_uops_macros_gen().
|
static |
Definition at line 289 of file uops.c.
Referenced by ff_sws_uops_macros_gen().
|
static |
Definition at line 352 of file uops.c.
Referenced by ff_sws_uop_list_append(), and ff_sws_uop_list_free().
| void ff_sws_uop_list_free | ( | SwsUOpList ** | p_ops | ) |
Definition at line 368 of file uops.c.
Referenced by compile(), print_ops(), and register_flags().
| SwsUOpList* ff_sws_uop_list_alloc | ( | void | ) |
Definition at line 382 of file uops.c.
Referenced by compile(), print_ops(), and register_flags().
| int ff_sws_uop_list_append | ( | SwsUOpList * | uops, |
| SwsUOp * | uop | ||
| ) |
Definition at line 387 of file uops.c.
Referenced by translate_dither_op(), translate_linear_op(), translate_move(), translate_op(), translate_rw_op(), and translate_swizzle().
| int ff_sws_dither_height | ( | const SwsDitherUOp * | dither | ) |
Computes (1 << size_log2) + MAX(y_offset).
The dither matrix attached to the SwsUOp is always pre-padded to this number of lines.
Definition at line 400 of file uops.c.
Referenced by DECL_SETUP(), and translate_dither_op().
|
static |
Definition at line 408 of file uops.c.
Referenced by translate_move(), translate_op(), translate_rw_op(), and translate_swizzle().
Definition at line 421 of file uops.c.
Referenced by exact_prod().
|
static |
Definition at line 428 of file uops.c.
Referenced by translate_linear_op().
|
static |
Definition at line 450 of file uops.c.
Referenced by translate_rw_op().
|
static |
Definition at line 468 of file uops.c.
Referenced by translate_op().
|
static |
Definition at line 510 of file uops.c.
Referenced by translate_move().
|
static |
Definition at line 521 of file uops.c.
Referenced by translate_swizzle().
|
static |
Definition at line 592 of file uops.c.
Referenced by translate_op().
|
static |
Definition at line 646 of file uops.c.
Referenced by translate_op().
|
static |
Definition at line 694 of file uops.c.
Referenced by translate_op().
|
static |
Definition at line 731 of file uops.c.
Referenced by translate_op().
|
static |
Definition at line 749 of file uops.c.
Referenced by ff_sws_ops_translate().
| 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 executed by backends.
Return 0 or a negative error code.
Definition at line 850 of file uops.c.
Referenced by compile(), print_ops(), and register_flags().
|
static |
Definition at line 863 of file uops.c.
Referenced by ff_sws_uops_macros_gen(), and register_flags().
|
static |
Definition at line 884 of file uops.c.
Referenced by register_uops().
|
static |
|
static |
Definition at line 930 of file uops.c.
Referenced by ff_sws_uops_macros_gen().
|
static |
Definition at line 948 of file uops.c.
Referenced by ff_sws_uops_macros_gen().
|
static |
Definition at line 958 of file uops.c.
Referenced by ff_sws_uops_macros_gen().
| int ff_sws_uops_macros_gen | ( | char ** | out_str | ) |
Generate a set of boilerplate C preprocessor macros for describing and programmatically iterating over all possible SwsUOps.
This function can be quite slow as it iterates over every possible combination of pixel formats and flags.
Returns 0 or a negative error code. On success, an allocated string is returned via out_str, and must be av_free()'d by the caller.
Additionally make sure planar reads/writes are always available for all formats, because checkasm depends on them to be able to verify the input/output of any other operations.
Definition at line 964 of file uops.c.
Referenced by main().
| char full[16] |
Definition at line 44 of file uops.c.
Referenced by ff_avg_h264_qpel16_mc01_mmi(), ff_avg_h264_qpel16_mc02_mmi(), ff_avg_h264_qpel16_mc03_mmi(), ff_avg_h264_qpel16_mc11_mmi(), ff_avg_h264_qpel16_mc13_mmi(), ff_avg_h264_qpel16_mc31_mmi(), ff_avg_h264_qpel16_mc33_mmi(), ff_avg_h264_qpel4_mc01_mmi(), ff_avg_h264_qpel4_mc02_mmi(), ff_avg_h264_qpel4_mc03_mmi(), ff_avg_h264_qpel4_mc11_mmi(), ff_avg_h264_qpel4_mc12_mmi(), ff_avg_h264_qpel4_mc13_mmi(), ff_avg_h264_qpel4_mc31_mmi(), ff_avg_h264_qpel4_mc32_mmi(), ff_avg_h264_qpel4_mc33_mmi(), ff_avg_h264_qpel8_mc01_mmi(), ff_avg_h264_qpel8_mc02_mmi(), ff_avg_h264_qpel8_mc03_mmi(), ff_avg_h264_qpel8_mc11_mmi(), ff_avg_h264_qpel8_mc13_mmi(), ff_avg_h264_qpel8_mc31_mmi(), ff_avg_h264_qpel8_mc33_mmi(), ff_put_h264_qpel16_mc01_mmi(), ff_put_h264_qpel16_mc02_mmi(), ff_put_h264_qpel16_mc03_mmi(), ff_put_h264_qpel16_mc11_mmi(), ff_put_h264_qpel16_mc13_mmi(), ff_put_h264_qpel16_mc31_mmi(), ff_put_h264_qpel16_mc33_mmi(), ff_put_h264_qpel4_mc01_mmi(), ff_put_h264_qpel4_mc02_mmi(), ff_put_h264_qpel4_mc03_mmi(), ff_put_h264_qpel4_mc11_mmi(), ff_put_h264_qpel4_mc12_mmi(), ff_put_h264_qpel4_mc13_mmi(), ff_put_h264_qpel4_mc31_mmi(), ff_put_h264_qpel4_mc32_mmi(), ff_put_h264_qpel4_mc33_mmi(), ff_put_h264_qpel8_mc01_mmi(), ff_put_h264_qpel8_mc02_mmi(), ff_put_h264_qpel8_mc03_mmi(), ff_put_h264_qpel8_mc11_mmi(), ff_put_h264_qpel8_mc13_mmi(), ff_put_h264_qpel8_mc31_mmi(), ff_put_h264_qpel8_mc33_mmi(), filter_frame(), init(), map_idx_10_to_20(), map_idx_10_to_34(), map_idx_20_to_34(), map_idx_34_to_20(), parse_string(), remap20(), and remap34().
| char abbr[32] |
Definition at line 45 of file uops.c.
Referenced by av_parse_video_rate(), and av_parse_video_size().
| char macro[32] |
Definition at line 46 of file uops.c.
Referenced by ff_sws_uops_macros_gen().
| const { ... } uop_names[SWS_UOP_TYPE_NB] |
Referenced by ff_sws_uop_name(), ff_sws_uops_macros_gen(), generate_entry_args(), and generate_entry_struct().
| char prefix[8] |
Definition at line 89 of file uops.c.
Referenced by abs_decode(), aps(), avpriv_tempfile(), cbs_sei_get_unit(), coeff_abs_level_remaining_decode(), decode_residual(), dlsym_prefixed(), epic_jb_decode_tile(), exif_ifd_to_dict(), ff_cbs_sei_add_message(), ff_dnxhd_check_header_prefix(), ff_dnxhd_check_header_prefix_hr(), ff_dnxhd_parse_header_prefix(), ff_log_net_error(), ff_sws_uops_macros_gen(), filter_codec_opts(), frei0r_init(), init_cavlc_level_tab(), ivi_create_huff_from_desc(), load_path(), omx_init(), omx_try_load(), read_ts(), sei(), and strmatch().
| const { ... } pixel_types[SWS_PIXEL_TYPE_NB] |
Referenced by ff_sws_uops_macros_gen(), generate_entry_args(), and generate_entry_struct().
|
static |
Definition at line 906 of file uops.c.
Referenced by register_uops().
|
static |
Definition at line 925 of file uops.c.
Referenced by register_all_uops().
|
static |
Definition at line 940 of file uops.c.
Referenced by check_filter_fma(), ff_sws_ops_translate(), ff_sws_uops_macros_gen(), register_flags(), translate_linear_op(), translate_op(), translate_rw_op(), and translate_swizzle().
1.8.17