Camera RAW12 format issure

Hi, Nvidia Team:
I am working on TOF camera staff on Xavier. The camera is 640*480 raw12 format. And v4l2 config to V4L2_PIX_FMT_SBGGR12.
I add those in camera_common.c


But, when i use v4l2-ctl to capture the frames,i found the size is change to 6404802.They are not alige to 2 bytes,looks so weird.

The size should be 6804801.5, so how can i capture right size frame?

The size is correct. Please have a check TRM. Table 7.16 RAW Memory Formats

Hi, Shane:
Thanks for your help.
I still confused be the raw12 memory.As the TRM RAW Memory Formats chapter,when i use RAW12 it whill be transfer to raw12 like attachment picture. But it looks not match with the data which i captured.
1.raw.tar.gz (134 KB)

It looks like correct. The first pixel of the latest line is 99 33 and the LSB is 99 so it is 3399 than match the TRM.

My frame data some byte are 0xffff,but as the TRM T_R16_I,the first bit should be 0. Here is what i am confused.
And i found in vi5_fromats.c the RAW12 is config to T_R16. There is no description of T_R16 is TRM, only T_R16_I. Is T_R16 high bit is 1?