aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-12-19 20:41:51 +0100
committerPaul B Mahol <onemda@gmail.com>2020-12-19 20:46:00 +0100
commit64e572db46a2dd44517140b6e85ece989b08d575 (patch)
tree355496fa571ef5d3d60f8398114289a4c852d707
parent4fcfecdd66cb21a0d1aee26abb02eb3057172e9f (diff)
downloadffmpeg-64e572db46a2dd44517140b6e85ece989b08d575.tar.gz
avfilter/vf_maskedminmax: add support for commands
-rw-r--r--doc/filters.texi8
-rw-r--r--libavfilter/vf_maskedminmax.c6
2 files changed, 12 insertions, 2 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index 7ab583accc..edb1757974 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -13991,6 +13991,10 @@ copied from first stream.
By default value 0xf, all planes will be processed.
@end table
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
@section maskedmerge
Merge the first input stream with the second input stream using per pixel
@@ -14026,6 +14030,10 @@ copied from first stream.
By default value 0xf, all planes will be processed.
@end table
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
@section maskedthreshold
Pick pixels comparing absolute difference of two video streams with fixed
threshold.
diff --git a/libavfilter/vf_maskedminmax.c b/libavfilter/vf_maskedminmax.c
index 0685c8a16d..90140827a3 100644
--- a/libavfilter/vf_maskedminmax.c
+++ b/libavfilter/vf_maskedminmax.c
@@ -28,7 +28,7 @@
#include "framesync.h"
#define OFFSET(x) offsetof(MaskedMinMaxContext, x)
-#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
+#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
typedef struct ThreadData {
AVFrame *src, *f1, *f2, *dst;
@@ -50,7 +50,7 @@ typedef struct MaskedMinMaxContext {
} MaskedMinMaxContext;
static const AVOption maskedminmax_options[] = {
- { "planes", "set planes", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
+ { "planes", "set planes", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
{ NULL }
};
@@ -340,6 +340,7 @@ AVFilter ff_vf_maskedmin = {
.inputs = maskedminmax_inputs,
.outputs = maskedminmax_outputs,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS,
+ .process_command = ff_filter_process_command,
};
#define maskedmax_options maskedminmax_options
@@ -357,4 +358,5 @@ AVFilter ff_vf_maskedmax = {
.inputs = maskedminmax_inputs,
.outputs = maskedminmax_outputs,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS,
+ .process_command = ff_filter_process_command,
};