mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
swscale/ops: rename ff_sws_op_list_update_comps()
Could also be ff_sws_op_list_update_metadata(), but I type this function name often enough to prefer a shorter name. Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
1 parent
181ee7caf8
commit
2cc8f29b68
5 files changed
+8
-8
No files matched your search
+1
-1
@@ -721,7 +721,7 @@ static int add_ops_convert_pass(SwsGraph *graph, const SwsFormat *src,
|
||||
av_get_pix_fmt_name(src->format), av_get_pix_fmt_name(dst->format));
|
||||
|
||||
av_log(ctx, AV_LOG_DEBUG, "Unoptimized operation list:\n");
|
||||
ff_sws_op_list_update_comps(ops);
|
||||
ff_sws_op_list_update(ops);
|
||||
ff_sws_op_list_print(ctx, AV_LOG_DEBUG, AV_LOG_TRACE, ops);
|
||||
|
||||
const int flags = SWS_OP_FLAG_OPTIMIZE | SWS_OP_FLAG_SPLIT_MEMCPY;
|
||||
|
||||
+2
-2
@@ -673,8 +673,8 @@ static void update_input_pads(SwsOpList *ops, SwsOp *op, SwsCompMask need_out[4]
|
||||
memcpy(need_out, need_in, sizeof(need_in));
|
||||
}
|
||||
|
||||
/* Infer + propagate known information about components */
|
||||
void ff_sws_op_list_update_comps(SwsOpList *ops)
|
||||
/* Infer + propagate output pad metadata */
|
||||
void ff_sws_op_list_update(SwsOpList *ops)
|
||||
{
|
||||
/* Forward pass, solves for output pad metadata */
|
||||
for (int n = 0; n < ops->num_ops; n++)
|
||||
|
||||
+3
-3
@@ -268,7 +268,7 @@ struct SwsOp {
|
||||
|
||||
/**
|
||||
* Metadata about the operation's input/output components. Discarded
|
||||
* and regenerated automatically by `ff_sws_op_list_update_comps()`.
|
||||
* and regenerated automatically by `ff_sws_op_list_update()`.
|
||||
*
|
||||
* Note that backends may rely on the presence and accuracy of this
|
||||
* metadata for all operations, during ff_sws_ops_compile().
|
||||
@@ -377,7 +377,7 @@ void ff_sws_op_list_remove_at(SwsOpList *ops, int index, int count);
|
||||
/**
|
||||
* Print out the contents of an operation list.
|
||||
*
|
||||
* Note: This requires having called `ff_sws_op_list_update_comps()` to
|
||||
* Note: This requires having called `ff_sws_op_list_update()` to
|
||||
* refresh the output pads, or the output may be stale/missing.
|
||||
*/
|
||||
void ff_sws_op_list_print(void *log_ctx, int log_level, int log_level_extra,
|
||||
@@ -387,7 +387,7 @@ void ff_sws_op_list_print(void *log_ctx, int log_level, int log_level_extra,
|
||||
* Infer + propagate known information about components. Called automatically
|
||||
* when needed by the optimizer and compiler.
|
||||
*/
|
||||
void ff_sws_op_list_update_comps(SwsOpList *ops);
|
||||
void ff_sws_op_list_update(SwsOpList *ops);
|
||||
|
||||
/**
|
||||
* Fuse compatible and eliminate redundant operations, as well as replacing
|
||||
|
||||
@@ -74,7 +74,7 @@ static int compile_backend(SwsContext *ctx, const SwsOpBackend *backend,
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
/* Ensure these are always set during compilation */
|
||||
ff_sws_op_list_update_comps(copy);
|
||||
ff_sws_op_list_update(copy);
|
||||
|
||||
ret = backend->compile(ctx, copy, &compiled);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -348,7 +348,7 @@ int ff_sws_op_list_optimize(SwsOpList *ops)
|
||||
int ret;
|
||||
|
||||
retry:
|
||||
ff_sws_op_list_update_comps(ops);
|
||||
ff_sws_op_list_update(ops);
|
||||
|
||||
/* Try to push filters towards the input; do this first to unblock
|
||||
* in-place optimizations like linear op fusion */
|
||||
|
||||
Reference in new issue
Block a user