* [PATCH] media: staging: rkisp1: cap: change RGB24 format to XBGR32
@ 2020-03-28 13:53 Dafna Hirschfeld
2020-03-30 20:19 ` Helen Koike
0 siblings, 1 reply; 3+ messages in thread
From: Dafna Hirschfeld @ 2020-03-28 13:53 UTC (permalink / raw)
To: linux-media, dafna.hirschfeld, helen.koike, ezequiel, hverkuil,
kernel, dafna3, sakari.ailus, linux-rockchip, mchehab,
laurent.pinchart
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.
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
---
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(-)
diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
index 3abf38362f5a..5f248b68190e 100644
--- a/drivers/staging/media/rkisp1/rkisp1-capture.c
+++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
@@ -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,
}, {
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: staging: rkisp1: cap: change RGB24 format to XBGR32
2020-03-28 13:53 [PATCH] media: staging: rkisp1: cap: change RGB24 format to XBGR32 Dafna Hirschfeld
@ 2020-03-30 20:19 ` Helen Koike
2020-05-15 6:16 ` Dafna Hirschfeld
0 siblings, 1 reply; 3+ messages in thread
From: Helen Koike @ 2020-03-30 20:19 UTC (permalink / raw)
To: Dafna Hirschfeld, linux-media, ezequiel, hverkuil, kernel,
dafna3, sakari.ailus, linux-rockchip, mchehab, laurent.pinchart
On 3/28/20 10:53 AM, Dafna Hirschfeld wrote:
> According to the manual, the YUV->RGB conversion outputs
s/manual/datasheet
> "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.
>
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
> ---
> 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(-)
>
> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
> index 3abf38362f5a..5f248b68190e 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
> @@ -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
> .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
> .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB888,
> }, {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: staging: rkisp1: cap: change RGB24 format to XBGR32
2020-03-30 20:19 ` Helen Koike
@ 2020-05-15 6:16 ` Dafna Hirschfeld
0 siblings, 0 replies; 3+ messages in thread
From: Dafna Hirschfeld @ 2020-05-15 6:16 UTC (permalink / raw)
To: Helen Koike, linux-media, ezequiel, hverkuil, kernel, dafna3,
sakari.ailus, linux-rockchip, mchehab, laurent.pinchart
hi,
thanks for the review
On 30.03.20 22:19, Helen Koike wrote:
>
>
> On 3/28/20 10:53 AM, Dafna Hirschfeld wrote:
>> According to the manual, the YUV->RGB conversion outputs
>
> s/manual/datasheet
It is actually from the TRM
>
>> "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
>
>>
>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
>> ---
>> 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(-)
>>
>> diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c
>> index 3abf38362f5a..5f248b68190e 100644
>> --- a/drivers/staging/media/rkisp1/rkisp1-capture.c
>> +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c
>> @@ -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
>
> Regards,
> Helen
>
>> .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
>> .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB888,
>> }, {
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-15 6:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28 13:53 [PATCH] media: staging: rkisp1: cap: change RGB24 format to XBGR32 Dafna Hirschfeld
2020-03-30 20:19 ` Helen Koike
2020-05-15 6:16 ` Dafna Hirschfeld
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).