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,
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.
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