[FFmpeg-cvslog] lavfi/edgedetect: switch to an AVOptions-based system.
Clément Bœsch
git at videolan.org
Wed Apr 10 23:34:36 CEST 2013
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed Apr 10 22:28:37 2013 +0200| [1cdb9f48dbc3601fc9ba007d344a7cd45da094d4] | committer: Clément Bœsch
lavfi/edgedetect: switch to an AVOptions-based system.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1cdb9f48dbc3601fc9ba007d344a7cd45da094d4
---
doc/filters.texi | 2 +-
libavfilter/avfilter.c | 1 +
libavfilter/vf_edgedetect.c | 7 -------
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index c94e512..01380bc 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -3008,7 +3008,7 @@ For more information about fontconfig, check:
Detect and draw edges. The filter uses the Canny Edge Detection algorithm.
-This filter accepts the following optional named parameters:
+The filter accepts the following options:
@table @option
@item low, high
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 8643992..b631326 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -667,6 +667,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
!strcmp(filter->filter->name, "drawbox" ) ||
!strcmp(filter->filter->name, "drawtext" ) ||
!strcmp(filter->filter->name, "ebur128" ) ||
+ !strcmp(filter->filter->name, "edgedetect") ||
!strcmp(filter->filter->name, "fade" ) ||
!strcmp(filter->filter->name, "fieldorder") ||
!strcmp(filter->filter->name, "fps" ) ||
diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c
index fb137ef..0f9610a 100644
--- a/libavfilter/vf_edgedetect.c
+++ b/libavfilter/vf_edgedetect.c
@@ -52,15 +52,8 @@ AVFILTER_DEFINE_CLASS(edgedetect);
static av_cold int init(AVFilterContext *ctx, const char *args)
{
- int ret;
EdgeDetectContext *edgedetect = ctx->priv;
- edgedetect->class = &edgedetect_class;
- av_opt_set_defaults(edgedetect);
-
- if ((ret = av_set_options_string(edgedetect, args, "=", ":")) < 0)
- return ret;
-
edgedetect->low_u8 = edgedetect->low * 255. + .5;
edgedetect->high_u8 = edgedetect->high * 255. + .5;
return 0;
More information about the ffmpeg-cvslog
mailing list