mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avfilter/vf_displace: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
2af3b6d8f7
commit
339f7e804b
@ -63,8 +63,6 @@ static const AVOption displace_options[] = {
|
|||||||
|
|
||||||
AVFILTER_DEFINE_CLASS(displace);
|
AVFILTER_DEFINE_CLASS(displace);
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
|
||||||
{
|
|
||||||
static const enum AVPixelFormat pix_fmts[] = {
|
static const enum AVPixelFormat pix_fmts[] = {
|
||||||
AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P,
|
AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P,
|
||||||
AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P,
|
AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P,
|
||||||
@ -78,9 +76,6 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
|
AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void displace_planar(DisplaceContext *s, const AVFrame *in,
|
static void displace_planar(DisplaceContext *s, const AVFrame *in,
|
||||||
const AVFrame *xpic, const AVFrame *ypic,
|
const AVFrame *xpic, const AVFrame *ypic,
|
||||||
AVFrame *out)
|
AVFrame *out)
|
||||||
@ -401,7 +396,7 @@ const AVFilter ff_vf_displace = {
|
|||||||
.activate = activate,
|
.activate = activate,
|
||||||
FILTER_INPUTS(displace_inputs),
|
FILTER_INPUTS(displace_inputs),
|
||||||
FILTER_OUTPUTS(displace_outputs),
|
FILTER_OUTPUTS(displace_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||||
.priv_class = &displace_class,
|
.priv_class = &displace_class,
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user