media: staging: rkisp1: cap: change RGB24 format to XBGR32
Subsystems (3)
PATCH 1/1 media: staging: rkisp1: cap: change RGB24 format to XBGR32
According to the manual, the YUV->RGB conversion outputs "24 bit word" that means that each pixel is 4 byte but the last one should be ignored. This matches format V4L2_PIX_FMT_XBGR32.
---
The patch rebased on to of the patch
"media: staging: rkisp1: cap: remove field fmt_type from struct rkisp1_capture_fmt_cfg"
drivers/staging/media/rkisp1/rkisp1-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/rkisp1/rkisp1-capture.c +1 -1
@@ -281,7 +281,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, }, {
Signature · 1 line
2.17.1
Quoted 1 line · Dafna Hirschfeld
According to the manual, the
YUV->RGBconversion outputs
s/manual/datasheet
Quoted 2 lines
"24 bit word" that means that each pixel is 4 byte but the last one should be ignored. This matches format
V4L2_PIX_FMT_XBGR32.
I think you can re-word this a bit, since 24bits is 3 bytes, and this doesn't mean 4 bytes are used.
I guess you meant that datasheet says 4 bytes are used, with 24bits for the RGB and the last byte is ignored.
Quoted 14 lines
Signed-off-by Dafna Hirschfeld <[email protected]>---
The patch rebased on to of the patch
"media: staging: rkisp1: cap: remove fieldfmt_typefrom structrkisp1_capture_fmt_cfg"drivers/staging/media/rkisp1/rkisp1-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/rkisp1/rkisp1-capture.c +0
-0
drivers/staging/media/rkisp1/rkisp1-capture.c static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = { · line 284
Quoted 5 lines
drivers/staging/media/rkisp1/rkisp1-capture.c +1
-1@@ -281,7 +281,7 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = { },/* rgb */ { - .fourcc = V4L2_PIX_FMT_RGB24, + .fourcc = V4L2_PIX_FMT_XBGR32,
Shouldn't it be V4L2_PIX_FMT_RGBX32 ?
Or the colors are inverted as well?
Regards,
Helen
Quoted 4 lines
drivers/staging/media/rkisp1/rkisp1-capture.c +0
-0.write_format = RKISP1_MI_CTRL_SP_WRITE_PLA, .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB888, }, {
hi,
thanks for the review
Quoted 6 lines · Helen Koike
Quoted 1 line · Dafna Hirschfeld
According to the manual, the
YUV->RGBconversion outputss/manual/datasheet
It is actually from the TRM
Quoted 7 lines
Quoted 3 lines
"24 bit word" that means that each pixel is 4 byte but the last one should be ignored. This matches format
V4L2_PIX_FMT_XBGR32.I think you can re-word this a bit, since 24bits is 3 bytes, and this doesn't mean 4 bytes are used.
I guess you meant that datasheet says 4 bytes are used, with 24bits for the RGB and the last byte is ignored.
indeed, i'll change that
Quoted 10 lines
Quoted 10 lines
Signed-off-by Dafna Hirschfeld <[email protected]>---
The patch rebased on to of the patch
"media: staging: rkisp1: cap: remove fieldfmt_typefrom structrkisp1_capture_fmt_cfg"drivers/staging/media/rkisp1/rkisp1-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines
drivers/staging/media/rkisp1/rkisp1-capture.c static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = { · line 284
Quoted 10 lines
drivers/staging/media/rkisp1/rkisp1-capture.c +1
-1@@ -281,7 +281,7 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = { },/* rgb */ { - .fourcc = V4L2_PIX_FMT_RGB24, + .fourcc = V4L2_PIX_FMT_XBGR32,Shouldn't it be
V4L2_PIX_FMT_RGBX32?> Or the colors are inverted as well?
yes, the bytes are inverted
Thanks,
Dafna
Quoted 8 lines
Regards,
HelenQuoted 4 lines
drivers/staging/media/rkisp1/rkisp1-capture.c +0
-0.write_format = RKISP1_MI_CTRL_SP_WRITE_PLA, .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB888, }, {