Unified · Split
| @@ -3008,7 +3008,7 @@ For more information about fontconfig, check: · 3007 unmodified lines | |||
| 3008 | 3008 | ||
| 3009 | Detect and draw edges. The filter uses the Canny Edge Detection algorithm. | 3009 | Detect and draw edges. The filter uses the Canny Edge Detection algorithm. |
| 3010 | 3010 | ||
| 3011 | This filter accepts the following optional named parameters: | 3011 | The filter accepts the following options: |
| 3012 | 3012 | ||
| 3013 | @table @option | 3013 | @table @option |
| 3014 | @item low, high | 3014 | @item low, high |
| @@ -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" ) || |
| @@ -52,15 +52,8 @@ AVFILTER_DEFINE_CLASS(edgedetect); · 51 unmodified lines | |||
| 52 | 52 | ||
| 53 | static av_cold int init(AVFilterContext *ctx, const char *args) | 53 | static 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; |