From 0227d0ca6042b628f07fb982261cc2c02bcb2e95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 9 Mar 2020 20:12:12 +0200 Subject: [PATCH] compositor: Define a separate checker fill function for BGRx/RGBx than for xBGR/xRGB Otherwise we'll create a cyan or yellow checkerboard. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/736 --- gst/compositor/blend.c | 3 +++ gst/compositor/blend.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/compositor/blend.c b/gst/compositor/blend.c index 0746193..657732a 100644 --- a/gst/compositor/blend.c +++ b/gst/compositor/blend.c @@ -873,6 +873,7 @@ RGB_FILL_COLOR (xrgb, 4, _memset_xrgb); MEMSET_XRGB (xbgr, 0, 16, 24); RGB_FILL_COLOR (xbgr, 4, _memset_xbgr); +RGB_FILL_CHECKER_C (rgbx, 4, 0, 1, 2); MEMSET_XRGB (rgbx, 24, 16, 8); RGB_FILL_COLOR (rgbx, 4, _memset_rgbx); @@ -1053,6 +1054,7 @@ FillCheckerFunction gst_compositor_fill_checker_y41b; FillCheckerFunction gst_compositor_fill_checker_rgb; /* BGR is equal to RGB */ FillCheckerFunction gst_compositor_fill_checker_xrgb; +FillCheckerFunction gst_compositor_fill_checker_rgbx; /* BGRx, xRGB, xBGR are equal to RGBx */ FillCheckerFunction gst_compositor_fill_checker_yuy2; /* YVYU is equal to YUY2 */ @@ -1113,6 +1115,7 @@ gst_compositor_init_blend (void) gst_compositor_fill_checker_y41b = GST_DEBUG_FUNCPTR (fill_checker_y41b); gst_compositor_fill_checker_rgb = GST_DEBUG_FUNCPTR (fill_checker_rgb_c); gst_compositor_fill_checker_xrgb = GST_DEBUG_FUNCPTR (fill_checker_xrgb_c); + gst_compositor_fill_checker_rgbx = GST_DEBUG_FUNCPTR (fill_checker_rgbx_c); gst_compositor_fill_checker_yuy2 = GST_DEBUG_FUNCPTR (fill_checker_yuy2_c); gst_compositor_fill_checker_uyvy = GST_DEBUG_FUNCPTR (fill_checker_uyvy_c); diff --git a/gst/compositor/blend.h b/gst/compositor/blend.h index d7df05e..92ec21a 100644 --- a/gst/compositor/blend.h +++ b/gst/compositor/blend.h @@ -90,8 +90,8 @@ extern FillCheckerFunction gst_compositor_fill_checker_rgb; #define gst_compositor_fill_checker_bgr gst_compositor_fill_checker_rgb extern FillCheckerFunction gst_compositor_fill_checker_rgbx; #define gst_compositor_fill_checker_bgrx gst_compositor_fill_checker_rgbx -#define gst_compositor_fill_checker_xrgb gst_compositor_fill_checker_rgbx -#define gst_compositor_fill_checker_xbgr gst_compositor_fill_checker_rgbx +extern FillCheckerFunction gst_compositor_fill_checker_xrgb; +#define gst_compositor_fill_checker_xbgr gst_compositor_fill_checker_xrgb extern FillCheckerFunction gst_compositor_fill_checker_yuy2; #define gst_compositor_fill_checker_yvyu gst_compositor_fill_checker_yuy2; extern FillCheckerFunction gst_compositor_fill_checker_uyvy; -- 2.7.4