Commit 8a661745 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Mauro Carvalho Chehab

[media] exynos-gsc: fix supported RGB pixel format

The driver exposes 32-bit A/XRGB 8-8-8-8 as supported format but testing
shows that using this format produces frames with wrong colors. The test
was done with the following GStreamer pipeline:

$ gst-launch-1.0 videotestsrc num-buffers=20 ! video/x-raw,format=UYVY \
! v4l2video3convert ! video/x-raw,format=xRGB ! videoconvert ! kmssink

The manual seems to state that the Pixel Format are in Little Endianness
so instead use the 32-bit BGRA/X 8-8-8-8 pixel format. This format works
correctly when using the following pipeline:

$ gst-launch-1.0 videotestsrc num-buffers=20 ! video/x-raw,format=UYVY \
! v4l2video3convert ! video/x-raw,format=BGRx ! kmssink

This change is similar to commit 7f2816e5 ("[media] s5p-fimc: Changed
RGB32 to BGR32") that fixed the same issue on a different Samsung driver.
Suggested-by: default avatarNicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent daba4dfb
......@@ -39,8 +39,8 @@ static const struct gsc_fmt gsc_formats[] = {
.num_planes = 1,
.num_comp = 1,
}, {
.name = "XRGB-8-8-8-8, 32 bpp",
.pixelformat = V4L2_PIX_FMT_RGB32,
.name = "BGRX-8-8-8-8, 32 bpp",
.pixelformat = V4L2_PIX_FMT_BGR32,
.depth = { 32 },
.color = GSC_RGB,
.num_planes = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment