I am trying to operate gray camera using i.mx8mp.
It is captured as shown in the attached picture, but when converting from raw10 to raw8, it seems that the upper bits were just removed.
To make a normal bit change, where should I modify it?
Solved! Go to Solution.
imx335 is also used in other CPU, and is converted to 8bit.
The reason for converting to 8bit is, of course, because the data size is small.
Processing this via S/W takes a lot of time, so ISP processes it.
As the title of this subject suggests, I expected i.MX8MP to convert 10bit to 8bit ISI.
In i.MX8MP, I need to receive 10bit and convert it to 8bit in S/W.
Thank you for answer.
your information is too limited, did you use ISI or ISP to capture? what source code do you change?
is this code for raw8? if yes, I don't think you can use mbus_code = MEDIA_BUS_FMT_SRGGB10_1X10 for raw8, any code for raw10, you need to change it for raw8
Camera output is Raw10. If I force this to be changed to Raw8, more strange images will be captured.
If I change .code = MEDIA_BUS_FMT_SBGGR10_1X10 in imx8-mipi-csi2-sam.c to MEDIA_BUS_FMT_Y8_1X8 or MEDIA_BUS_FMT_Y10_1X10, the message below will appear and capture will not work.
gasket not support format 8193
gasket not support format 8202
Since it operates in bypass mode, I thought there would be no problem with MEDIA_BUS_FMT_SBGGR10_1X10.
I am concerned about the part below in the CHNL_IMG_CTRL register description in IMX8MPRM.pdf.
NOTE: For RAW pixel formats, if the output pixel format has few bits per pixel than the input pixel
format, the most significant bits of each pixel are truncated by the ISP.
1)if you need raw8, as I mentioned before,
struct mxc_isi_fmt mxc_isi_out_formats[] = {
...
{
.name = "GREY8 (Y8)",
.fourcc = V4L2_PIX_FMT_GREY,
.depth = { 8 },
.color = MXC_ISI_OUT_FMT_RAW8,
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_Y10_1X10,
}
}
you need change mbus_code to MEDIA_BUS_FMT_SRGGB8_1X8
2)since you add new member in the mxc_isi_src_formats,did you change the code in the function mxc_isi_get_src_fmt? if no, how could you successfully capture raw10?
3)for imx8-mipi-csi2-sam.c, you don't need change anything, already includes raw8 and raw10 format
1)
I tested by modifying the mbus_code of mxc_isi_out_formats to MEDIA_BUS_FMT_SRGGB8_1X8.
Below (fsize->code != supported_mode.code) an error occurs.
imx335 does not have an 8bit mode, but as you indicated, supported_mode.code was changed from MEDIA_BUS_FMT_Y10_1X10 to MEDIA_BUS_FMT_SRGGB8_1X8.
2)
3)
If I use mipi_csis_formats as MEDIA_BUS_FMT_SBGGR10_1X10, it will be captured like the attached picture, and if I use MEDIA_BUS_FMT_SBGGR8_1X8, a more strange video will be captured.
all of settings I told you is about raw8 capture, since your camera only supports raw10, why do yo need to test raw8 capture? if you already capture raw10 successfully, I'm confused with why you need to test raw8 capture
imx335 is also used in other CPU, and is converted to 8bit.
The reason for converting to 8bit is, of course, because the data size is small.
Processing this via S/W takes a lot of time, so ISP processes it.
As the title of this subject suggests, I expected i.MX8MP to convert 10bit to 8bit ISI.
In i.MX8MP, I need to receive 10bit and convert it to 8bit in S/W.
Thank you for answer.
imx335 does not have an 8bit mode
> what do you mean? imx355 doesn't have 8bit mode, why do you test 8bit mode?
Please, any advice...