]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: staging: rkisp1: cap: change RGB24 format to XBGR32
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Tue, 1 Sep 2020 11:16:03 +0000 (13:16 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 08:57:38 +0000 (10:57 +0200)
According to the TRM [1], the YUV->RGB conversion outputs
RGB 888 format with 4 bytes, where the last byte is ignored,
using big endian representation:

|___X___|___R___|___G___|___B___|
31      24      16      8       0

Which matches format V4L2_PIX_FMT_XBGR32 in little endian
representation, so replace it accordingly.

"24 bit word". What it means is that 4 bytes are used with
24bit for the RGB and the last byte is ignored.
This matches format V4L2_PIX_FMT_XBGR32.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/rkisp1/rkisp1-capture.c

index 1435edb0525f9fd691afaa8c1dde469152613584..a7635f8d5c6f2d1fd42fe10ed158e9805f7730a3 100644 (file)
@@ -276,7 +276,7 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
        },
        /* rgb */
        {
-               .fourcc = V4L2_PIX_FMT_RGB24,
+               .fourcc = V4L2_PIX_FMT_XBGR32,
                .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
                .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB888,
        }, {