video_play example and gstplugin pipewiresrc have different colour convertion
If you are filing this issue with a regular release please try master as it might already be fixed.
0.3.32, Arch Linux, sway:
Description of Problem:
Two official examples/plugins convert colours differently
How Reproducible:
Always
Steps to Reproduce:
- Start a screencast with https://gitlab.gnome.org/-/snippets/19
- Use pw-dot to find the of the portal
- Connect video-play to that node.
Actual Results:
Both have different colours.
Portal uses gstreamer colour convertion:
Portal uses sdl.h colour convertion (see sdl.h)
Expected Results:
Both have same colours.
Difference on the portal side between the first and second picture is this diff:
enum spa_video_format xdpw_format_pw_from_drm_fourcc(uint32_t format) {
switch (format) {
case DRM_FORMAT_ARGB8888:
- return SPA_VIDEO_FORMAT_BGRA;
+ return SPA_VIDEO_FORMAT_ARGB;
case DRM_FORMAT_XRGB8888:
- return SPA_VIDEO_FORMAT_BGRx;
+ return SPA_VIDEO_FORMAT_xRGB;
case DRM_FORMAT_RGBA8888:
- return SPA_VIDEO_FORMAT_ABGR;
+ return SPA_VIDEO_FORMAT_RGBA;
case DRM_FORMAT_RGBX8888:
- return SPA_VIDEO_FORMAT_xBGR;
+ return SPA_VIDEO_FORMAT_RGBx;
case DRM_FORMAT_ABGR8888:
- return SPA_VIDEO_FORMAT_RGBA;
+ return SPA_VIDEO_FORMAT_ABGR;
case DRM_FORMAT_XBGR8888:
- return SPA_VIDEO_FORMAT_RGBx;
+ return SPA_VIDEO_FORMAT_xBGR;
case DRM_FORMAT_BGRA8888:
- return SPA_VIDEO_FORMAT_ARGB;
+ return SPA_VIDEO_FORMAT_BGRA;
case DRM_FORMAT_BGRX8888:
- return SPA_VIDEO_FORMAT_xRGB;
+ return SPA_VIDEO_FORMAT_BGRx;
case DRM_FORMAT_NV12:
return SPA_VIDEO_FORMAT_NV12;
default: