History

lavfi/edgedetect: switch to an AVOptions-based system.

Clément Bœsch committed 13 years ago

Commit 1cdb9f41 parent 34610e13 files · +2 −8Browse files

Unified · Split

3 files
  1. doc/filters.texi +1 −1
  2. libavfilter/avfilter.c +1 −0
  3. libavfilter/vf_edgedetect.c +0 −7
doc/filters.texi+1−1
@@ -3008,7 +3008,7 @@ For more information about fontconfig, check: · 3007 unmodified lines
3008 3008
3009Detect and draw edges. The filter uses the Canny Edge Detection algorithm.3009Detect and draw edges. The filter uses the Canny Edge Detection algorithm.
3010 3010
3011This filter accepts the following optional named parameters:3011The filter accepts the following options:
3012 3012
3013@table @option3013@table @option
3014@item low, high3014@item low, high
libavfilter/avfilter.c+1−0
@@ -667,6 +667,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 666 unmodified lines
667 !strcmp(filter->filter->name, "drawbox" ) ||667 !strcmp(filter->filter->name, "drawbox" ) ||
668 !strcmp(filter->filter->name, "drawtext" ) ||668 !strcmp(filter->filter->name, "drawtext" ) ||
669 !strcmp(filter->filter->name, "ebur128" ) ||669 !strcmp(filter->filter->name, "ebur128" ) ||
670 !strcmp(filter->filter->name, "edgedetect") ||
670 !strcmp(filter->filter->name, "fade" ) ||671 !strcmp(filter->filter->name, "fade" ) ||
671 !strcmp(filter->filter->name, "fieldorder") ||672 !strcmp(filter->filter->name, "fieldorder") ||
672 !strcmp(filter->filter->name, "fps" ) ||673 !strcmp(filter->filter->name, "fps" ) ||
libavfilter/vf_edgedetect.c+0−7
@@ -52,15 +52,8 @@ AVFILTER_DEFINE_CLASS(edgedetect); · 51 unmodified lines
52 52
53static av_cold int init(AVFilterContext *ctx, const char *args)53static av_cold int init(AVFilterContext *ctx, const char *args)
54{54{
55 int ret;
56 EdgeDetectContext *edgedetect = ctx->priv;55 EdgeDetectContext *edgedetect = ctx->priv;
57 56
58 edgedetect->class = &edgedetect_class;
59 av_opt_set_defaults(edgedetect);
60
61 if ((ret = av_set_options_string(edgedetect, args, "=", ":")) < 0)
62 return ret;
63
64 edgedetect->low_u8 = edgedetect->low * 255. + .5;57 edgedetect->low_u8 = edgedetect->low * 255. + .5;
65 edgedetect->high_u8 = edgedetect->high * 255. + .5;58 edgedetect->high_u8 = edgedetect->high * 255. + .5;
66 return 0;59 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t