forked from FFmpeg/FFmpeg
lavfi/vmafmotion: Allow more pix_fmts.
This commit is contained in:
parent
9e271e3fa3
commit
59924d5eb1
1 changed files with 12 additions and 8 deletions
|
@ -261,15 +261,19 @@ int ff_vmafmotion_init(VMAFMotionData *s,
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
static const enum AVPixelFormat pix_fmts[] = {
|
AVFilterFormats *fmts_list = NULL;
|
||||||
AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P,
|
int format, ret;
|
||||||
AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV420P10,
|
|
||||||
AV_PIX_FMT_NONE
|
for (format = 0; av_pix_fmt_desc_get(format); format++) {
|
||||||
};
|
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
|
||||||
|
if (!(desc->flags & (AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_HWACCEL | AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_PAL)) &&
|
||||||
|
(desc->flags & AV_PIX_FMT_FLAG_PLANAR || desc->nb_components == 1) &&
|
||||||
|
(!(desc->flags & AV_PIX_FMT_FLAG_BE) == !HAVE_BIGENDIAN || desc->comp[0].depth == 8) &&
|
||||||
|
(desc->comp[0].depth == 8 || desc->comp[0].depth == 10) &&
|
||||||
|
(ret = ff_add_format(&fmts_list, format)) < 0)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
|
|
||||||
if (!fmts_list)
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
return ff_set_common_formats(ctx, fmts_list);
|
return ff_set_common_formats(ctx, fmts_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue