TX1 camera crop ops

Hi,

I want to add crop subdev ops for my camera sensor on TX1, and I added s_crop callback function for my driver. It is not work correctly when I crop it from 1280x1080 to other size, the 1280x1080 is full resolution. The camera output is right, is there anything I forget to set?

thanks

Hi
TX1 VI not support crop you, however you can crop it by the VIC like gstreamer or some MM API sample code.

Hi ShaneCCC,

I know TX1 VI not support crop, but this function is not achieved by VI, just camera.

for example:
I crop it to 640*480, the camera’s output is 640x480, TX1 just receive and display.
the phenomena produced by crop is two bad frame between each normal frame.

thanks

Ok, that should be a new sensor mode. You just need to add an new resolution and initial table.

I have do this as follows:
(1).added s_crop callback function for my driver, that set some registers to enable camera to output crop image, like 640x480
(2).TX1 setting

what should I do for TX1 setting? common_data->fmt_height/fmt_width? Anything else?

thanks

You should not use the s_crop for the mode setting. You have to add a mode setting in your sensor driver then the v4l2 control can choice one of them from below command. There’s no need any setting for TX1.

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=1

I know, but the start point is undefined.
Follow your idea, the crop range can only change it’s width and height, what about the left and top?

Seems you would like to implement cropping function like below link that we are’t implementation. Could tell the detail problem with your implementation. Do you use VIDEO_S_CROP to set the crop setting? What’s your sensor does it support crop output?

https://www.linuxtv.org/downloads/legacy/video4linux/API/V4L2_API/spec-single/v4l2.html#id2914637

Yeah, the phenomena produced by crop callback function is two bad frame between each normal frame, So I asked you what should I do for TX1 setting. I have tested the camera setting is right.

What your purpose for. Why not use VIC for the crop?
I can’t tell what you should do you have to give much more detail information what you are doing and what’s the result.

Hi cloundliu,

Have you clarified and fixed the issue?
Any further suggestion required?

Thanks