mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-06 15:21:15 +00:00
lavfi/edgedetect: switch to an AVOptions-based system.
This commit is contained in:
parent
34610e11e7
commit
1cdb9f48db
@ -3008,7 +3008,7 @@ For more information about fontconfig, check:
|
|||||||
|
|
||||||
Detect and draw edges. The filter uses the Canny Edge Detection algorithm.
|
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
|
@table @option
|
||||||
@item low, high
|
@item low, high
|
||||||
|
@ -667,6 +667,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
|
|||||||
!strcmp(filter->filter->name, "drawbox" ) ||
|
!strcmp(filter->filter->name, "drawbox" ) ||
|
||||||
!strcmp(filter->filter->name, "drawtext" ) ||
|
!strcmp(filter->filter->name, "drawtext" ) ||
|
||||||
!strcmp(filter->filter->name, "ebur128" ) ||
|
!strcmp(filter->filter->name, "ebur128" ) ||
|
||||||
|
!strcmp(filter->filter->name, "edgedetect") ||
|
||||||
!strcmp(filter->filter->name, "fade" ) ||
|
!strcmp(filter->filter->name, "fade" ) ||
|
||||||
!strcmp(filter->filter->name, "fieldorder") ||
|
!strcmp(filter->filter->name, "fieldorder") ||
|
||||||
!strcmp(filter->filter->name, "fps" ) ||
|
!strcmp(filter->filter->name, "fps" ) ||
|
||||||
|
@ -52,15 +52,8 @@ AVFILTER_DEFINE_CLASS(edgedetect);
|
|||||||
|
|
||||||
static av_cold int init(AVFilterContext *ctx, const char *args)
|
static av_cold int init(AVFilterContext *ctx, const char *args)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
EdgeDetectContext *edgedetect = ctx->priv;
|
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->low_u8 = edgedetect->low * 255. + .5;
|
||||||
edgedetect->high_u8 = edgedetect->high * 255. + .5;
|
edgedetect->high_u8 = edgedetect->high * 255. + .5;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user