[FFmpeg-cvslog] kmsgrab: Fix DRM format definitions

Mark Thompson git at videolan.org
Wed Sep 20 01:15:53 EEST 2017


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Fri Sep 15 20:48:18 2017 +0100| [22afa87a8e90c83d736400bf8fd6bb19152defaf] | committer: Mark Thompson

kmsgrab: Fix DRM format definitions

All DRM formats are defined in terms of little-endian words, so RGB formats
like XRGB actually have the elements in the opposite order order in memory
to the order they are in the name.

This does not affect YUYV and similar YUV 4:2:2 formats, which are in the
expected order.

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

 libavdevice/kmsgrab.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/libavdevice/kmsgrab.c b/libavdevice/kmsgrab.c
index 67a83ef84a..bcb6865f60 100644
--- a/libavdevice/kmsgrab.c
+++ b/libavdevice/kmsgrab.c
@@ -210,14 +210,14 @@ static const struct {
 #endif
     { AV_PIX_FMT_RGB24,    DRM_FORMAT_RGB888   },
     { AV_PIX_FMT_BGR24,    DRM_FORMAT_BGR888   },
-    { AV_PIX_FMT_0RGB,     DRM_FORMAT_XRGB8888 },
-    { AV_PIX_FMT_0BGR,     DRM_FORMAT_XBGR8888 },
-    { AV_PIX_FMT_RGB0,     DRM_FORMAT_RGBX8888 },
-    { AV_PIX_FMT_BGR0,     DRM_FORMAT_BGRX8888 },
-    { AV_PIX_FMT_ARGB,     DRM_FORMAT_ARGB8888 },
-    { AV_PIX_FMT_ABGR,     DRM_FORMAT_ABGR8888 },
-    { AV_PIX_FMT_RGBA,     DRM_FORMAT_RGBA8888 },
-    { AV_PIX_FMT_BGRA,     DRM_FORMAT_BGRA8888 },
+    { AV_PIX_FMT_0RGB,     DRM_FORMAT_BGRX8888 },
+    { AV_PIX_FMT_0BGR,     DRM_FORMAT_RGBX8888 },
+    { AV_PIX_FMT_RGB0,     DRM_FORMAT_XBGR8888 },
+    { AV_PIX_FMT_BGR0,     DRM_FORMAT_XRGB8888 },
+    { AV_PIX_FMT_ARGB,     DRM_FORMAT_BGRA8888 },
+    { AV_PIX_FMT_ABGR,     DRM_FORMAT_RGBA8888 },
+    { AV_PIX_FMT_RGBA,     DRM_FORMAT_ABGR8888 },
+    { AV_PIX_FMT_BGRA,     DRM_FORMAT_ARGB8888 },
     { AV_PIX_FMT_YUYV422,  DRM_FORMAT_YUYV     },
     { AV_PIX_FMT_YVYU422,  DRM_FORMAT_YVYU     },
     { AV_PIX_FMT_UYVY422,  DRM_FORMAT_UYVY     },



More information about the ffmpeg-cvslog mailing list