H264 encoding of parallel camera data

Hello,

I plan to H264 encode a 800 x 600 50Hz, 24 bit parallel RGB camera data using a IMX6 colibri module.

I read in colibri IMX6 datasheet that there are 2 x 20 bit paralell camera inputs. I plan to follow a 2 step approach

1) Use a Colibri IMX6 256Mb + Viola Carrier Board and 
connect  9 bit data + hsync + vsync + pclk   to appropriate pins in viola

  Fiddle with drivers and H264 encode incoming camera data (using builtin H264 video encoder)

Once first part is finished, then make a custom baseboard with all 20 camera pins available to colibri imx6

Do you think that my approach is all right? Can you please advise me about the pitfalls like
• Do the existing linux drivers support 800 x 600 Hz resolution?
• Do the exising linux drivers support 20 bit paralell camera data?
• …

Thank you in advance for your suggestions
rifo

Hi there,
Doing further reading, it seems that I should be using 16bit RGB565 format.
I’ll use the pinout designer and set the appropriate pins into camera mode.
I’ll report back about the developments.

One more thing is, the camera is controlled by another module, so there is no need for any drivers on Colibri.

Hi Rifo

Do you think that my approach is all right? Can you please advise me about the pitfalls like • Do the existing linux drivers support 800 x 600 Hz resolution? • Do the exising linux drivers support 20 bit paralell camera data

Your approach seems to be correct. For the 20 bit parallel camera, you would have to write your own driver. We support up to 8bit parallel camera interface, since this is a generic solution for the most of the colibri modules.

One more thing is, the camera is controlled by another module, so there is no need for any drivers on Colibri.

Thats correct. If the camera is not controller by colibri, then you need any driver for colibri module.

Best regards, Jaski

Hello Jaski,

Thanks for your comment. Can you please point the driver that I should modify? Do you think that’s a lot of work? It has been a while since I modified the kernel drivers :slight_smile:

One more thing is, the camera is controlled by another module, so there is no need for any drivers on Colibri.

That is not entirely correct. The V4L2 subsystem usually expects a full pipeline from source to sink in order to make sure all of them agree to the resp. configuration (e.g. resolution, colour mode and so forth). However, one may get around this by just using something similar to the generic platform approach. Note that the downstream NXP Linux kernel uses a proprietary camera stack not entirely in-line with soc_camera.

hello Marcel,

Is this the driver that Jaski wrote about? Can you please point me in the right direction for the 16bit RGB565 format driver that I should modify?

I came across the following post while searching for the 16 bit RGB565, gated clock driver

The patch seems to modify the following files
... / drivers / mxc / ipu3 / ipu_capture.c
... / drivers / mxc / ipu3 / ipu_common.c
... / drivers / mxc / ipu3 / ipu_param_mem.h
... / include / linux / ipu.h

I’ll do a little more digging and post the results here

Is this the driver that Jaski wrote about? Can you please point me in the right direction for the 16bit RGB565 format driver that I should modify?

Note: Careful as just like with displays also with cameras bit depth may mean different things. There is the interface width which by default is 8-bit plus the in-memory data format which may be 16-bit RGB565 however by default camera sensors deliver BT656 which is a YUV format.

I came across the following post while searching for the 16 bit RGB565, gated clock driver How to Support RGB565 Gated Mode Input to i.MX6 CS... - NXP Community

As mentioned before we have no experience in running the camera interface in such a mode but will try to assist you in trying to do so.

The patch seems to modify the following files
… / drivers / mxc / ipu3 / ipu_capture.c
… / drivers / mxc / ipu3 / ipu_common.c
… / drivers / mxc / ipu3 / ipu_param_mem.h
… / include / linux / ipu.h

No, I believe you misread something. The downstream i.MX 6 V4L2 camera driver stack may be found here:

http://git.toradex.com/cgit/linux-toradex.git/tree/drivers/media/platform/mxc/capture?h=toradex_4.1-2.0.x-imx

I’ll do a little more digging and post the results here

Sure, just let us know should you have any further questions.

Hello Marcel,

Thanks for your comment.
I downloaded the attachment from the forum post and saw those files as modified. That’s why I listed them.

Below post also lists different files along wiht V4L2 camera driver

I’ll try these sometime soon and report here

hello,
Thanks for the feedback.