IMX8MP CSI RAW12 data shifting

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMX8MP CSI RAW12 data shifting

2,421 次查看
jjiimmyy
Contributor II

Hi,

Our sensor is sending RAW 12 ,but only 10 bits are valid. So

data need to be shift left by 2 bits. 

video pipeline is currently setup as, sensor -> csi -> isp.

How and where can I have data shifted left by 2 bits in this video pipeline?

Thanks

 

0 项奖励
回复
3 回复数

2,392 次查看
malik_cisse
Senior Contributor I

Hi
Did you try to declare the video to be Bit in the kernel driver and in the isp-imx wrapper?
I suppose the Bayer pixel will be transmitted as 16bit/pixel anyway and the IP will do the shifting automatically according to the bit depth you have declared in the driver.

0 项奖励
回复

2,388 次查看
jjiimmyy
Contributor II

malik_cisse,

 

Thanks for the suggestion.

How do you  "declare the video to be Bit in the kernel driver and in the isp-imx wrapper"?

Could you point out the files and format?

Thanks

0 项奖励
回复

2,297 次查看
malik_cisse
Senior Contributor I

Hi,
The full steps to port a new camera driver are described here:
https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/225459/1/AN13713(8MP%20IS...

As for the bit depth in the sensor kernel driver, here is an example for ar1335 sensor:
https://github.com/nxp-imx/isp-vvcam/blob/2102360b58d9d1b36bc0c654c8301e4014b33951/vvcam/v4l2/sensor...

.bit_width also needs to be set as shown in this example:
in isp_imx\isp-imx-4.2.2.11.0\units\isi\drv\OV2775\source\OV2775.c
static struct vvcam_mode_info pov2775_mode_info[] = {
{
.index = 0,
.width = 1920,
.height = 1080,
.fps = 30,
.hdr_mode = SENSOR_MODE_LINEAR,
.bit_width = 12,
.bayer_pattern = BAYER_GBRG,
},

Note that no git repo exis for isp-imx. Only binary is provided as explained in pdf doc above. See example yocto recipe:
https://github.com/Freescale/meta-freescale/tree/master/recipes-bsp/isp-imx

IMHO these are the two only code where bit depth is set.
Experts, please correct if I am wrong!

0 项奖励
回复