mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 15:23:11 +00:00
lavfi/vf_quirc: use FILTER_PIXFMTS_ARRAY() instead of query_formats()
This commit is contained in:
parent
d83d8a1643
commit
c19f3fe61b
@ -71,23 +71,6 @@ static int config_input(AVFilterLink *inlink)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
static const enum AVPixelFormat pix_fmts[] = {
|
||||
AV_PIX_FMT_GRAY8,
|
||||
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
|
||||
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
|
||||
AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P,
|
||||
AV_PIX_FMT_NV12, AV_PIX_FMT_NV21,
|
||||
AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUVJ420P,
|
||||
AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P,
|
||||
AV_PIX_FMT_YUVJ440P,
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
|
||||
return ff_set_common_formats_from_list(ctx, pix_fmts);
|
||||
}
|
||||
|
||||
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
||||
{
|
||||
FilterLink *inl = ff_filter_link(inlink);
|
||||
@ -154,6 +137,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
||||
return ff_filter_frame(outlink, frame);
|
||||
}
|
||||
|
||||
static const enum AVPixelFormat pix_fmts[] = {
|
||||
AV_PIX_FMT_GRAY8,
|
||||
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
|
||||
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
|
||||
AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P,
|
||||
AV_PIX_FMT_NV12, AV_PIX_FMT_NV21,
|
||||
AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUVJ420P,
|
||||
AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P,
|
||||
AV_PIX_FMT_YUVJ440P,
|
||||
AV_PIX_FMT_NONE
|
||||
};
|
||||
|
||||
static const AVClass quirc_class = {
|
||||
.class_name = "quirc",
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
@ -178,7 +173,7 @@ const AVFilter ff_vf_quirc = {
|
||||
.uninit = uninit,
|
||||
FILTER_INPUTS(inputs),
|
||||
FILTER_OUTPUTS(ff_video_default_filterpad),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_PIXFMTS_ARRAY(pix_fmts),
|
||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC |
|
||||
AVFILTER_FLAG_METADATA_ONLY,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user