Skip to content

Commit cf92f42

Browse files
committed
avfilter/vf_colorlevels: add support for commands
1 parent 52cd7a6 commit cf92f42

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/filters.texi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7479,6 +7479,10 @@ colorlevels=romin=0.5:gomin=0.5:bomin=0.5
74797479
@end example
74807480
@end itemize
74817481

7482+
@subsection Commands
7483+
7484+
This filter supports the all above options as @ref{commands}.
7485+
74827486
@section colormatrix
74837487

74847488
Convert color matrix.

libavfilter/vf_colorlevels.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ typedef struct ColorLevelsContext {
4848
} ColorLevelsContext;
4949

5050
#define OFFSET(x) offsetof(ColorLevelsContext, x)
51-
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
51+
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
5252
static const AVOption colorlevels_options[] = {
5353
{ "rimin", "set input red black point", OFFSET(range[R].in_min), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -1, 1, FLAGS },
5454
{ "gimin", "set input green black point", OFFSET(range[G].in_min), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -1, 1, FLAGS },
@@ -325,4 +325,5 @@ AVFilter ff_vf_colorlevels = {
325325
.inputs = colorlevels_inputs,
326326
.outputs = colorlevels_outputs,
327327
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
328+
.process_command = ff_filter_process_command,
328329
};

0 commit comments

Comments
 (0)