You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avfilter/vf_nlmeans: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -77,8 +77,6 @@ static const AVOption nlmeans_options[] = {
|
|||||||
|
|
||||||
AVFILTER_DEFINE_CLASS(nlmeans);
|
AVFILTER_DEFINE_CLASS(nlmeans);
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
|
||||||
{
|
|
||||||
static const enum AVPixelFormat pix_fmts[] = {
|
static const enum AVPixelFormat pix_fmts[] = {
|
||||||
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
|
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
|
||||||
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
|
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
|
||||||
@@ -90,9 +88,6 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
AV_PIX_FMT_NONE
|
AV_PIX_FMT_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compute squared difference of the safe area (the zone where s1 and s2
|
* Compute squared difference of the safe area (the zone where s1 and s2
|
||||||
* overlap). It is likely the largest integral zone, so it is interesting to do
|
* overlap). It is likely the largest integral zone, so it is interesting to do
|
||||||
@@ -580,7 +575,7 @@ const AVFilter ff_vf_nlmeans = {
|
|||||||
.uninit = uninit,
|
.uninit = uninit,
|
||||||
FILTER_INPUTS(nlmeans_inputs),
|
FILTER_INPUTS(nlmeans_inputs),
|
||||||
FILTER_OUTPUTS(nlmeans_outputs),
|
FILTER_OUTPUTS(nlmeans_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||||
.priv_class = &nlmeans_class,
|
.priv_class = &nlmeans_class,
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user