aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_extractplanes.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-09-09 18:06:22 +0200
committerPaul B Mahol <onemda@gmail.com>2018-09-09 18:06:22 +0200
commit6c06389d6e801d0e9f6686210c2e5bc2265be75c (patch)
tree9811a56fcc5bc3a87a2b60b707fed6b00472f8ff /libavfilter/vf_extractplanes.c
parent43421386f2ccc6975656e6ee989298528cd53993 (diff)
downloadffmpeg-6c06389d6e801d0e9f6686210c2e5bc2265be75c.tar.gz
avfilter/vf_extractplanes: define common 8-bit pixel formats
Diffstat (limited to 'libavfilter/vf_extractplanes.c')
-rw-r--r--libavfilter/vf_extractplanes.c56
1 files changed, 22 insertions, 34 deletions
diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c
index 6bce313189..fc73e63132 100644
--- a/libavfilter/vf_extractplanes.c
+++ b/libavfilter/vf_extractplanes.c
@@ -64,31 +64,34 @@ static const AVOption extractplanes_options[] = {
AVFILTER_DEFINE_CLASS(extractplanes);
+#define EIGHTBIT_FORMATS \
+ AV_PIX_FMT_YUV410P, \
+ AV_PIX_FMT_YUV411P, \
+ AV_PIX_FMT_YUV440P, \
+ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, \
+ AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA422P, \
+ AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, \
+ AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ444P, \
+ AV_PIX_FMT_YUVJ411P, \
+ AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA444P, \
+ AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A, \
+ AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, \
+ AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA, \
+ AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, \
+ AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0, \
+ AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR, \
+ AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP
+
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat in_pixfmts_le[] = {
- AV_PIX_FMT_YUV410P,
- AV_PIX_FMT_YUV411P,
- AV_PIX_FMT_YUV440P,
- AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P,
- AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA422P,
- AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P,
- AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ444P,
- AV_PIX_FMT_YUVJ411P,
- AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA444P,
+ EIGHTBIT_FORMATS,
+ AV_PIX_FMT_YA16LE, AV_PIX_FMT_GRAY16LE,
AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUVA420P16LE,
AV_PIX_FMT_YUV422P16LE, AV_PIX_FMT_YUVA422P16LE,
AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUVA444P16LE,
- AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A,
- AV_PIX_FMT_YA16LE, AV_PIX_FMT_GRAY16LE,
- AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
- AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA,
- AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
- AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0,
- AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR,
AV_PIX_FMT_RGB48LE, AV_PIX_FMT_BGR48LE,
AV_PIX_FMT_RGBA64LE, AV_PIX_FMT_BGRA64LE,
- AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
AV_PIX_FMT_GBRP16LE, AV_PIX_FMT_GBRAP16LE,
AV_PIX_FMT_YUV420P10LE,
AV_PIX_FMT_YUV422P10LE,
@@ -117,28 +120,13 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_NONE,
};
static const enum AVPixelFormat in_pixfmts_be[] = {
- AV_PIX_FMT_YUV410P,
- AV_PIX_FMT_YUV411P,
- AV_PIX_FMT_YUV440P,
- AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P,
- AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA422P,
- AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P,
- AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUVJ444P,
- AV_PIX_FMT_YUVJ411P,
- AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA444P,
+ EIGHTBIT_FORMATS,
+ AV_PIX_FMT_YA16BE, AV_PIX_FMT_GRAY16BE,
AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_YUVA420P16BE,
AV_PIX_FMT_YUV422P16BE, AV_PIX_FMT_YUVA422P16BE,
AV_PIX_FMT_YUV444P16BE, AV_PIX_FMT_YUVA444P16BE,
- AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A,
- AV_PIX_FMT_YA16BE, AV_PIX_FMT_GRAY16BE,
- AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
- AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA,
- AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
- AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0,
- AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR,
AV_PIX_FMT_RGB48BE, AV_PIX_FMT_BGR48BE,
AV_PIX_FMT_RGBA64BE, AV_PIX_FMT_BGRA64BE,
- AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
AV_PIX_FMT_GBRP16BE, AV_PIX_FMT_GBRAP16BE,
AV_PIX_FMT_YUV420P10BE,
AV_PIX_FMT_YUV422P10BE,