VIDIOC_CROPCAP structure member information

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

VIDIOC_CROPCAP structure member information

1,752 次查看
rashmighoaelmur
Contributor II

HI,

We are using i.MX6Qplus processor nitrogen board, with linux kernel version 4.1.15.

We need some information regarding, MXC V4L2 driver - VIDIOC_CROPCAP ioctl. We are trying to crop the captured image with the resolution of 640x480 from 2592x1944 (maximum resolution our camera supports) using vlc command line application,

   cvlc v4l2:///dev/videox:width=640:height=480:chroma=uyvy -V x11

VLC application uses VIDIOC_S_FMT ioctl to crop the image, then it will call the VIDIOC_CROPCAP to query the capabilities. The driver needs to fill the respective structure v4l2_cropcap,

struct v4l2_cropcap {
        enum v4l2_buf_type      type;   
        struct v4l2_rect        bounds;
        struct v4l2_rect        defrect;
        struct v4l2_fract       pixelaspect;
};

We want to know the difference between the structure member variables (bounds and defrect) in the above structure. We are filling the structure like below in the mxc v4l2 driver, 

bounds.width = 2592; (Max. width)

bounds.height = 1944; (Max. height)

defrect.width = 640; (requested crop width)

defrect.height= 480; (requested crop height)

Kindly clarify whether the above data fill in the driver is correct?. Or the defrect parameters supposed to be same as bounds always even the application requested to change the resolution for cropping.

Thanks in advance.

Regards,
Rashmi Muruganandam

2 回复数

1,520 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Rashmi.

what display do you use? can support 720P? could you share the whole log file and mxc_v4l2_overlay command?

please look at v4L2 and IPU examples on

ipu-examples release notes - v0.1 

0 项奖励
回复

1,520 次查看
rashmighoaelmur
Contributor II

Hi,

We are not using any mxc v4l2 test applications. We are using our customized GUI application.

We are using HDMI display.

We have referred the above mentioned example, and it relates only to IPU and not to V4L2 ioctls.

Kindly share information regarding V4L2 ioctl cropping with respect to VIDIOC_CROPCAP and VIDIOC_S_CROP ioctls.

Thanks in advance

Regards,
Rashmi

0 项奖励
回复