Camera frames handling

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

Camera frames handling

661 Views
titusstalin
Contributor V

Dear All,

I've a custom camera which will give the frame size what we requested.

Say for ex, if we request frames in 1000bytes, then it will give you the 1000bytes on the MIPI data channel.

Now, I'm requesting the 1440000bytes (800x600x3) data from camera, it give and able to receive as a frame in buffer.

In driver, I took square root of 1440000 and assigned the value to both width and height of image.

drivers/media/platform/mxc/capture/mxc_v4l2_capture.c

Function: mxc_v4l2_s_fmt

        case V4L2_PIX_FMT_BAYER:
//            size = f->fmt.pix.width * f->fmt.pix.height * 3;
            printk("V4L2_PIX_FMT_BAYER  %d:\n",f->fmt.pix.sizeimage);//Size is set by user v4l2 app code i.e 1440000
            size = f->fmt.pix.sizeimage;
            f->fmt.pix.width = f->fmt.pix.height = (int_sqrt(size));
//            bytesperline = f->fmt.pix.width * 3;
            break;

By using the above change, able to get the complete frame for 1440000bytes of data, but not for if I increase 1 bytes (1440001)

And if I have requested 1440055bytes from camera, it gives data to the iMX MIPI channel then its able to get data but misaligned.

How can I get the correct data ?

I'm using Bayer camera sensor so I've used IPU_PIX_FMT_GENERIC option and setting the RAW sensor settings in registers by seeing the other posts.

Any insights or pointers on this problem, how we can apply workaround for this case.

I appreciate your help on this.

Thanks for your help.

Regards,

Titus S.

Labels (3)
0 Kudos
2 Replies

487 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Titus,

    i.MX SoC requires there should be ISP function in ISP module, otherwise camera image can't be displayed on screen. in mxc_v4l2_capture.c, RAW data from camera can normally be received by IPU_PIX_FMT_GENERIC, but no any subsequent handling.

    so you will have to confirm if there is ISP module in your camera!

Best Regards,

Weidong

0 Kudos

487 Views
titusstalin
Contributor V

Hi Wigros sun,

Thanks for your reply.

Yes, our camera has ISP internally.

I have mentioned the issue clearly in the below post too, can you please support ?

Actually I was working iMX+MIPI for a month, spent more time on this, can you please guide me on this to resolve the problem.

https://community.nxp.com/message/860167 

Your help is greatly appreciated.

Thanks.

0 Kudos