* Re: Zooming with V4L2 [not found] <000001cb883f$ec4e4220$c4eac660$@org> @ 2010-11-20 17:37 ` Laurent Pinchart 2010-11-20 23:50 ` Shuzhen Wang 0 siblings, 1 reply; 3+ messages in thread From: Laurent Pinchart @ 2010-11-20 17:37 UTC (permalink / raw) To: Shuzhen Wang; +Cc: linux-media Hi Shuzhen, On Saturday 20 November 2010 00:17:23 Shuzhen Wang wrote: > Hello, > > I am working on a SOC V4L2 driver, and need to implement zoom > functionality. > > From application, there are 2 ways to do zooming. The 1st way is to use > cropping and scaling as described in section 1.11.1. The application needs > to figure out what the steps will be, and calling VIDIOC_S_CROP. > > The 2nd way is to use V4L2_CID_ZOOM_ABSOLUTE and V4L2_CID_ZOOM_RELATIVE as > described by Laurent in > http://video4linux-list.1448896.n2.nabble.com/RFC-Zoom-controls-in-V4L2- td1451987.html. > > Our camera hardware supports digital zoom. However, it acts LIKE optical > zoom because it doesn't do upscaling, so no video quality is sacrificed. How can you apply a digital zoom, keeping the output size constant, without performing upscaling ? > As a driver writter, is it okay to support only V4L2_CID_ZOOM_ABSOLUTE and > V4L2_CID_ZOOM_RELATIVE? > > I guess it also depends on how zooming is done for most of the V4L2 user > application out there. The V4L2_CID_ZOOM_* controls are really meant for optical zoom. Digital zoom should be implemented using cropping. -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Zooming with V4L2 2010-11-20 17:37 ` Zooming with V4L2 Laurent Pinchart @ 2010-11-20 23:50 ` Shuzhen Wang 0 siblings, 0 replies; 3+ messages in thread From: Shuzhen Wang @ 2010-11-20 23:50 UTC (permalink / raw) To: 'Laurent Pinchart'; +Cc: linux-media Hello, Laurent, Thank you for the reply. In our case, most of the time the sensor outputs bigger image size than the output size, so the ISP hardware does downscaling. When zooming in, we can do cropping, and less downscaling to achieve the same output size. All these happen under of the hood of ISP driver. That's why I said it was like optical zoom to the application. So if "digital zoom == cropping and upscaling", then I don't think my case fits in digital zoom category. Regards, Shuzhen -----Original Message----- From: Laurent Pinchart [mailto:laurent.pinchart@ideasonboard.com] Sent: Saturday, November 20, 2010 9:37 AM To: Shuzhen Wang Cc: linux-media@vger.kernel.org Subject: Re: Zooming with V4L2 Hi Shuzhen, On Saturday 20 November 2010 00:17:23 Shuzhen Wang wrote: > Hello, > > I am working on a SOC V4L2 driver, and need to implement zoom > functionality. > > From application, there are 2 ways to do zooming. The 1st way is to use > cropping and scaling as described in section 1.11.1. The application needs > to figure out what the steps will be, and calling VIDIOC_S_CROP. > > The 2nd way is to use V4L2_CID_ZOOM_ABSOLUTE and V4L2_CID_ZOOM_RELATIVE as > described by Laurent in > http://video4linux-list.1448896.n2.nabble.com/RFC-Zoom-controls-in-V4L2- td1451987.html. > > Our camera hardware supports digital zoom. However, it acts LIKE optical > zoom because it doesn't do upscaling, so no video quality is sacrificed. How can you apply a digital zoom, keeping the output size constant, without performing upscaling ? > As a driver writter, is it okay to support only V4L2_CID_ZOOM_ABSOLUTE and > V4L2_CID_ZOOM_RELATIVE? > > I guess it also depends on how zooming is done for most of the V4L2 user > application out there. The V4L2_CID_ZOOM_* controls are really meant for optical zoom. Digital zoom should be implemented using cropping. -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 3+ messages in thread
* Zooming with V4L2
@ 2010-11-19 23:22 Shuzhen Wang
0 siblings, 0 replies; 3+ messages in thread
From: Shuzhen Wang @ 2010-11-19 23:22 UTC (permalink / raw)
To: linux-media
Hello,
I am working on a SOC V4L2 video driver, and need to implement zoom
functionality.
>From application, there are 2 ways to do zooming. The 1st way is to use
cropping and scaling as described in section 1.11.1. The application calls
VIDIOC_S_CROP to achieve zoom. The 2nd way is to use V4L2_CID_ZOOM_ABSOLUTE
and V4L2_CID_ZOOM_RELATIVE as described by Laurent in
http://video4linux-list.1448896.n2.nabble.com/RFC-Zoom-controls-in-V4L2-td14
51987.html.
Our camera hardware supports digital zoom. However, it acts LIKE optical
zoom because it doesn't do upscaling, so no video quality is sacrificed. As
a driver writter, is it okay to support only V4L2_CID_ZOOM_ABSOLUTE and
V4L2_CID_ZOOM_RELATIVE?
I guess it also depends on how zooming is done for most of the V4L2 user
application out there.
Your comments are appreciated.
-Shuzhen
^ permalink raw reply [flat|nested] 3+ messages in threadend of thread, other threads:[~2010-11-20 23:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <000001cb883f$ec4e4220$c4eac660$@org>
2010-11-20 17:37 ` Zooming with V4L2 Laurent Pinchart
2010-11-20 23:50 ` Shuzhen Wang
2010-11-19 23:22 Shuzhen Wang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox