From b393b650ab9bfb9654fc116163ab331907216d74 Mon Sep 17 00:00:00 2001 From: "olivier.crete@collabora.com" Date: Tue, 6 Aug 2019 19:09:54 +0100 Subject: [PATCH] wayland: Drop big-endian version of the DRM formats They were a big in some big-endian implementations --- ext/wayland/wlvideoformat.c | 24 ------------------------ ext/wayland/wlwindow.c | 4 ---- 2 files changed, 28 deletions(-) diff --git a/ext/wayland/wlvideoformat.c b/ext/wayland/wlvideoformat.c index 77cfac8a09..e82b469415 100644 --- a/ext/wayland/wlvideoformat.c +++ b/ext/wayland/wlvideoformat.c @@ -43,16 +43,6 @@ typedef struct } wl_DmabufVideoFormat; static const wl_ShmVideoFormat shm_formats[] = { -#if G_BYTE_ORDER == G_BIG_ENDIAN - {WL_SHM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_xRGB}, - {WL_SHM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_ARGB}, - {WL_SHM_FORMAT_XBGR8888, GST_VIDEO_FORMAT_xBGR}, - {WL_SHM_FORMAT_RGBX8888, GST_VIDEO_FORMAT_RGBx}, - {WL_SHM_FORMAT_BGRX8888, GST_VIDEO_FORMAT_BGRx}, - {WL_SHM_FORMAT_ABGR8888, GST_VIDEO_FORMAT_ABGR}, - {WL_SHM_FORMAT_RGBA8888, GST_VIDEO_FORMAT_RGBA}, - {WL_SHM_FORMAT_BGRA8888, GST_VIDEO_FORMAT_BGRA}, -#else {WL_SHM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_BGRx}, {WL_SHM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_BGRA}, {WL_SHM_FORMAT_XBGR8888, GST_VIDEO_FORMAT_RGBx}, @@ -61,7 +51,6 @@ static const wl_ShmVideoFormat shm_formats[] = { {WL_SHM_FORMAT_ABGR8888, GST_VIDEO_FORMAT_RGBA}, {WL_SHM_FORMAT_RGBA8888, GST_VIDEO_FORMAT_ABGR}, {WL_SHM_FORMAT_BGRA8888, GST_VIDEO_FORMAT_ARGB}, -#endif {WL_SHM_FORMAT_RGB888, GST_VIDEO_FORMAT_RGB}, {WL_SHM_FORMAT_BGR888, GST_VIDEO_FORMAT_BGR}, {WL_SHM_FORMAT_RGB565, GST_VIDEO_FORMAT_RGB16}, @@ -84,18 +73,6 @@ static const wl_ShmVideoFormat shm_formats[] = { }; static const wl_DmabufVideoFormat dmabuf_formats[] = { -#if G_BYTE_ORDER == G_BIG_ENDIAN - {DRM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_xRGB}, - {DRM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_ARGB}, - {DRM_FORMAT_XBGR8888, GST_VIDEO_FORMAT_xBGR}, - {DRM_FORMAT_RGBX8888, GST_VIDEO_FORMAT_RGBx}, - {DRM_FORMAT_BGRX8888, GST_VIDEO_FORMAT_BGRx}, - {DRM_FORMAT_ABGR8888, GST_VIDEO_FORMAT_ABGR}, - {DRM_FORMAT_RGBA8888, GST_VIDEO_FORMAT_RGBA}, - {DRM_FORMAT_BGRA8888, GST_VIDEO_FORMAT_BGRA}, - {DRM_FORMAT_RGB888, GST_VIDEO_FORMAT_RGB}, - {DRM_FORMAT_BGR888, GST_VIDEO_FORMAT_BGR}, -#else {DRM_FORMAT_XRGB8888, GST_VIDEO_FORMAT_BGRx}, {DRM_FORMAT_ARGB8888, GST_VIDEO_FORMAT_BGRA}, {DRM_FORMAT_XBGR8888, GST_VIDEO_FORMAT_RGBx}, @@ -106,7 +83,6 @@ static const wl_DmabufVideoFormat dmabuf_formats[] = { {DRM_FORMAT_BGRA8888, GST_VIDEO_FORMAT_ARGB}, {DRM_FORMAT_RGB888, GST_VIDEO_FORMAT_BGR}, {DRM_FORMAT_BGR888, GST_VIDEO_FORMAT_RGB}, -#endif {DRM_FORMAT_RGB565, GST_VIDEO_FORMAT_RGB16}, {DRM_FORMAT_YUYV, GST_VIDEO_FORMAT_YUY2}, {DRM_FORMAT_NV12, GST_VIDEO_FORMAT_NV12}, diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c index b24b26e5ca..d97794e3ca 100644 --- a/ext/wayland/wlwindow.c +++ b/ext/wayland/wlwindow.c @@ -504,11 +504,7 @@ gst_wl_window_update_borders (GstWlWindow * window) } /* we want WL_SHM_FORMAT_XRGB8888 */ -#if G_BYTE_ORDER == G_BIG_ENDIAN - format = GST_VIDEO_FORMAT_xRGB; -#else format = GST_VIDEO_FORMAT_BGRx; -#endif /* draw the area_subsurface */ gst_video_info_set_format (&info, format, width, height);