[FFmpeg-cvslog] avfilter/vf_extractplanes: define common 8-bit pixel formats

Paul B Mahol git at videolan.org
Sun Sep 9 19:22:06 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep  9 18:06:22 2018 +0200| [6c06389d6e801d0e9f6686210c2e5bc2265be75c] | committer: Paul B Mahol

avfilter/vf_extractplanes: define common 8-bit pixel formats

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c06389d6e801d0e9f6686210c2e5bc2265be75c
---

 libavfilter/vf_extractplanes.c | 56 +++++++++++++++++-------------------------
 1 file 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,



More information about the ffmpeg-cvslog mailing list