imx8m plus ISP: how to get get 24-bit RGB images

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8m plus ISP: how to get get 24-bit RGB images

1,409件の閲覧回数
malik_cisse
Senior Contributor I

Hi,
Do you know if there is a way to get 24-bit RGB (or even 10/12bit per pixel RGB) images out of the ISP instead of 8bit YUV (4:2:2)?

In the moment 4K snapshot image is converted from YUY2 (8bit yuv4:2:2) to JPEG.
I added the 24bit RGB format to the list in vvcam/v4l2/video/video.c:

static struct viv_video_fmt formats[] = {
{
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16,
.bpp = 2,
},
{
.fourcc = V4L2_PIX_FMT_NV12,
.depth = 12,
.bpp = 1,
},
{
.fourcc = V4L2_PIX_FMT_NV16,
.depth = 16,
.bpp = 1,
},
};

Now the code is:

static struct viv_video_fmt formats[] = {
{
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16,
.bpp = 2,
},
{
.fourcc = V4L2_PIX_FMT_NV12,
.depth = 12,
.bpp = 1,
},
{
.fourcc = V4L2_PIX_FMT_NV16,
.depth = 16,
.bpp = 1,
},
{
.fourcc = V4L2_PIX_FMT_RGB24,
.depth = 24,
.bpp = 3,
},
};

When I try to snapshot RGB24 images I get an image back with the right size but the content is not RGB24. It rather seems like YUYV with some stuffing.
Here are the pipelines I am using:
gst-launch-1.0 v4l2src num-buffers=1 device=/dev/video0 ! video/x-raw, width=3840, height=2160, format=RGB ! multifilesink location=test1.rgb
v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=2160,pixelformat=RGB3 --stream-mmap --stream-count=1 --stream-to=test2.rgb

Any idea?
Thank you,

0 件の賞賛
返信
2 返答(返信)

1,378件の閲覧回数
malik_cisse
Senior Contributor I

Thank you for the feedback.
These binning settings can be done in the sensor driver but this is quite unrelated to the ISP output.
I am rather interested in what the ISP can deliver. For the time being it seems only YUV is possible.

0 件の賞賛
返信

1,389件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello malik_cisse,

Assume that 2x2binned = 2028x1520, full resolution = 4056x3040,  try below format change and keep the resolution unchanged?

RAW10 2x2binned -> RAW12 2x2binned -> RAW10 2x2binned

OR RAW10 full resolution -> RAW12 full resolution -> RAW10 full resolution

 

Regards

0 件の賞賛
返信