kmsgrab: Add more DRM plane formats
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Fri, 15 Sep 2017 20:24:48 +0000 (21:24 +0100)
committerMark Thompson <sw@jkqxz.net>
Tue, 19 Sep 2017 21:47:06 +0000 (22:47 +0100)
libavdevice/kmsgrab.c

index e545340..11f23d8 100644 (file)
@@ -207,7 +207,18 @@ static const struct {
 #endif
 #ifdef DRM_FORMAT_R16
     { AV_PIX_FMT_GRAY16LE, DRM_FORMAT_R16      },
+    { AV_PIX_FMT_GRAY16BE, DRM_FORMAT_R16      | DRM_FORMAT_BIG_ENDIAN },
 #endif
+    { AV_PIX_FMT_RGB8,     DRM_FORMAT_RGB332   },
+    { AV_PIX_FMT_BGR8,     DRM_FORMAT_BGR233   },
+    { AV_PIX_FMT_RGB555LE, DRM_FORMAT_XRGB1555 },
+    { AV_PIX_FMT_RGB555BE, DRM_FORMAT_XRGB1555 | DRM_FORMAT_BIG_ENDIAN },
+    { AV_PIX_FMT_BGR555LE, DRM_FORMAT_XBGR1555 },
+    { AV_PIX_FMT_BGR555BE, DRM_FORMAT_XBGR1555 | DRM_FORMAT_BIG_ENDIAN },
+    { AV_PIX_FMT_RGB565LE, DRM_FORMAT_RGB565   },
+    { AV_PIX_FMT_RGB565BE, DRM_FORMAT_RGB565   | DRM_FORMAT_BIG_ENDIAN },
+    { AV_PIX_FMT_BGR565LE, DRM_FORMAT_BGR565   },
+    { AV_PIX_FMT_BGR565BE, DRM_FORMAT_BGR565   | DRM_FORMAT_BIG_ENDIAN },
     { AV_PIX_FMT_RGB24,    DRM_FORMAT_RGB888   },
     { AV_PIX_FMT_BGR24,    DRM_FORMAT_BGR888   },
     { AV_PIX_FMT_0RGB,     DRM_FORMAT_BGRX8888 },