Re: [PATCH 1/2 v2] media: Add support for arbitrary resolution for the ov5642 camera driver
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: 2011-08-31 17:08:01
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: 2011-08-31 17:08:01
Hi Bastian, A second comment. On Wednesday 31 August 2011 17:05:52 Bastian Hecht wrote:
This patch adds the ability to get arbitrary resolutions with a width up to 2592 and a height up to 720 pixels instead of the standard 1280x720 only. Signed-off-by: Bastian Hecht <redacted> ---diff --git a/drivers/media/video/ov5642.c b/drivers/media/video/ov5642.c index 6410bda..87b432e 100644 --- a/drivers/media/video/ov5642.c +++ b/drivers/media/video/ov5642.c
[snip]
@@ -578,9 +605,20 @@ struct ov5642_datafmt { enum v4l2_colorspace colorspace; }; +/* the output resolution and blanking information */ +struct ov5642_out_size { + int width; + int height; + int total_width; + int total_height; +}; + struct ov5642 { struct v4l2_subdev subdev; + const struct ov5642_datafmt *fmt; + struct v4l2_rect crop_rect; + struct ov5642_out_size out_size; };
If I'm not mistaken you store the exact same width/height in crop_rect and out_size. If that's right, you should remove width/height from struct ov5642_out_size (or maybe better move the total_width and total_height directly to the ov5642 structure). -- Regards, Laurent Pinchart