I am trying to get the raw bayer grbg 12-bit data from my image sensor from the CSI-2 interface. I run the following command to capture the data to a file:
v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=BA12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=output.raw -d /dev/video0
My image sensor can generate several test patterns. These patterns look okay when viewed with the
argus_camera application going through the ISP. However, looking at the raw data output from the above
v4l2-ctl command I see places in the raw data where there are 14-bits of data set and not just 12-bits. Why am I not seeing only 12-bits of least significant data for every 2-byte word from the
v4l2-ctl command output above?
Does this post from Display bayer CSI camera output without ISP have to do with the issue I’m seeing?
Is there a way to have the raw 12-bit data only use 12-bits instead of 14-bit output?