Skip to content
Snippets Groups Projects
Commit 52fe11ef authored by rcombs's avatar rcombs
Browse files

lavfi/drawutils: move BE check out of loop

parent df9180d8
No related branches found
No related tags found
No related merge requests found
...@@ -89,6 +89,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) ...@@ -89,6 +89,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
if (!desc || !desc->name) if (!desc || !desc->name)
return AVERROR(EINVAL); return AVERROR(EINVAL);
if (desc->flags & AV_PIX_FMT_FLAG_BE)
return AVERROR(ENOSYS);
if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA)) if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))
return AVERROR(ENOSYS); return AVERROR(ENOSYS);
if (format == AV_PIX_FMT_P010LE || format == AV_PIX_FMT_P010BE || format == AV_PIX_FMT_P016LE || format == AV_PIX_FMT_P016BE) if (format == AV_PIX_FMT_P010LE || format == AV_PIX_FMT_P010BE || format == AV_PIX_FMT_P016LE || format == AV_PIX_FMT_P016BE)
...@@ -101,8 +103,6 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) ...@@ -101,8 +103,6 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
/* for now, only 8-16 bits formats */ /* for now, only 8-16 bits formats */
if (c->depth < 8 || c->depth > 16) if (c->depth < 8 || c->depth > 16)
return AVERROR(ENOSYS); return AVERROR(ENOSYS);
if (desc->flags & AV_PIX_FMT_FLAG_BE)
return AVERROR(ENOSYS);
if (c->plane >= MAX_PLANES) if (c->plane >= MAX_PLANES)
return AVERROR(ENOSYS); return AVERROR(ENOSYS);
/* strange interleaving */ /* strange interleaving */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment