Capture RAW10/12 Video on iMX.6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Capture RAW10/12 Video on iMX.6

1,397 Views
vladimirchulkov
Contributor I

Hello,

I have MIPI CSI-2 Camera (RAW10/12 Video Data 1080p30). 

Is it possible to capture this video format on iMX.6 Quad?

0 Kudos
3 Replies

931 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Vladimir,

Yes it is supported by the MIPI CSI2 driver.

Regards

0 Kudos

931 Views
vladimirchulkov
Contributor I

Thank you for your answer!

I studied a lot of topics in the forum about this problem.

I have Toradex Apalis iMX6Q (Toradex Linux BSP based NXP Release imx_4.9.123_2.3.0_ga).

I make for my camera, which is based on the Sony IMX327 sensor, a driver based on ov5640.

I set in driver:

  • mipi_csi2_set_datatype(mipi_csi2_info, MIPI_DT_RAW12);
  • p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_12BIT;
  • in file mxc_v4l2_capture.c add in mxc_v4l2_s_param function

    else if (ifparm.u.bt656.mode == V4L2_IF_TYPE_BT656_MODE_NOBT_12BIT)

    {

    csi_param.data_width = IPU_CSI_DATA_WIDTH_12;

    }

  • in file mxc_v4l2_capture.c add in mxc_v4l2_s_fmt function

    case V4L2_PIX_FMT_SBGGR12:
    size = f->fmt.pix.width * f->fmt.pix.height * 2;
    bytesperline = f->fmt.pix.width * 2;
    break;

  • in file ipu_csi_enc.c add in csi_enc_setup function
    else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_SBGGR12)
    pixel_fmt = IPU_PIX_FMT_GENERIC_16;
  • in file mxc_v4l2_capture.c in struct mxc_capture_inputs[MXC_V4L2_CAPTURE_NUM_INPUTS] change  .name = "CSI IC MEM" replace by .name = "CSI MEM".

And so far I have no results.

Buffer capture based on https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/capture.c.html

0 Kudos

931 Views
vladimirchulkov
Contributor I

I also tried the changes described i.MX6Q capture raw(bayer) data and debayer

Nothing happened.

0 Kudos