History

lavfi/drawutils: move BE check out of loop

rcombs committed 4 years ago

Commit 52fe11e1 parent df9180d1 file · +2 −2Browse files

Unified · Split

libavfilter/drawutils.c+2−2
@@ -89,6 +89,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) · 88 unmodified lines
89 89
90 if (!desc || !desc->name)90 if (!desc || !desc->name)
91 return AVERROR(EINVAL);91 return AVERROR(EINVAL);
92 if (desc->flags & AV_PIX_FMT_FLAG_BE)
93 return AVERROR(ENOSYS);
92 if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))94 if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))
93 return AVERROR(ENOSYS);95 return AVERROR(ENOSYS);
94 if (format == AV_PIX_FMT_P010LE || format == AV_PIX_FMT_P010BE || format == AV_PIX_FMT_P016LE || format == AV_PIX_FMT_P016BE)96 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) · 6 unmodified lines
101 /* for now, only 8-16 bits formats */103 /* for now, only 8-16 bits formats */
102 if (c->depth < 8 || c->depth > 16)104 if (c->depth < 8 || c->depth > 16)
103 return AVERROR(ENOSYS);105 return AVERROR(ENOSYS);
104 if (desc->flags & AV_PIX_FMT_FLAG_BE)
105 return AVERROR(ENOSYS);
106 if (c->plane >= MAX_PLANES)106 if (c->plane >= MAX_PLANES)
107 return AVERROR(ENOSYS);107 return AVERROR(ENOSYS);
108 /* strange interleaving */108 /* strange interleaving */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t