All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ov7670: remove QCIF mode
@ 2010-10-08 21:04 Daniel Drake
  2010-10-08 21:11 ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2010-10-08 21:04 UTC (permalink / raw)
  To: corbet, mchehab; +Cc: linux-media

This super-low-resolution mode only captures from a small portion of
the sensor FOV, making it a bit useless.

Signed-off-by: Daniel Drake <dsd@laptop.org>
---
 drivers/media/video/ov7670.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c
index a18dcd0..7017e5c 100644
--- a/drivers/media/video/ov7670.c
+++ b/drivers/media/video/ov7670.c
@@ -618,6 +618,7 @@ static struct ov7670_format_struct {
  * which is allegedly provided by the sensor.  So here's the weird register
  * settings.
  */
+#if 0
 static struct regval_list ov7670_qcif_regs[] = {
 	{ REG_COM3, COM3_SCALEEN|COM3_DCWEN },
 	{ REG_COM3, COM3_DCWEN },
@@ -636,6 +637,7 @@ static struct regval_list ov7670_qcif_regs[] = {
 	{ REG_COM13, 0xc0 },
 	{ 0xff, 0xff },
 };
+#endif
 
 static struct ov7670_win_size {
 	int	width;
@@ -681,7 +683,8 @@ static struct ov7670_win_size {
 		.vstop		= 494,
 		.regs 		= NULL,
 	},
-	/* QCIF */
+#if 0
+	/* QCIF - disabled because it only shows a small portion of sensor FOV */
 	{
 		.width		= QCIF_WIDTH,
 		.height		= QCIF_HEIGHT,
@@ -692,6 +695,7 @@ static struct ov7670_win_size {
 		.vstop		= 494,
 		.regs 		= ov7670_qcif_regs,
 	},
+#endif
 };
 
 #define N_WIN_SIZES (ARRAY_SIZE(ov7670_win_sizes))
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] ov7670: remove QCIF mode
  2010-10-08 21:04 [PATCH 1/3] ov7670: remove QCIF mode Daniel Drake
@ 2010-10-08 21:11 ` Jonathan Corbet
  2010-10-08 21:15   ` Daniel Drake
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Corbet @ 2010-10-08 21:11 UTC (permalink / raw)
  To: Daniel Drake; +Cc: mchehab, linux-media

On Fri,  8 Oct 2010 22:04:12 +0100 (BST)
Daniel Drake <dsd@laptop.org> wrote:

> This super-low-resolution mode only captures from a small portion of
> the sensor FOV, making it a bit useless.

I'm certainly not attached to this mode, but...does it harm anybody if
it's there?

ov7670 sensors appear in settings other than OLPC, so I'd be reluctant
to take this out unless there's some real reason to.

jon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] ov7670: remove QCIF mode
  2010-10-08 21:11 ` Jonathan Corbet
@ 2010-10-08 21:15   ` Daniel Drake
  2010-10-16  4:28     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2010-10-08 21:15 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: mchehab, linux-media

On 8 October 2010 22:11, Jonathan Corbet <corbet@lwn.net> wrote:
> I'm certainly not attached to this mode, but...does it harm anybody if
> it's there?

Yes. Applications like gstreamer will pick this resolution if its the
closest resolution to the target file resolution. On XO-1 we always
pick a low res so gstreamer picks this one. And we end up with a video
that only records a miniscule portion of the FOV.

All the other settings of the camera scale the image so that the whole
FOV is covered. But this one records at normal resolution, only
sending a small center portion of the FOV. The same pixels can be read
by recording at full res and then just cutting out the center bit.

Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] ov7670: remove QCIF mode
  2010-10-08 21:15   ` Daniel Drake
@ 2010-10-16  4:28     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2010-10-16  4:28 UTC (permalink / raw)
  To: Daniel Drake; +Cc: Jonathan Corbet, linux-media

Em 08-10-2010 18:15, Daniel Drake escreveu:
> On 8 October 2010 22:11, Jonathan Corbet <corbet@lwn.net> wrote:
>> I'm certainly not attached to this mode, but...does it harm anybody if
>> it's there?
> 
> Yes. Applications like gstreamer will pick this resolution if its the
> closest resolution to the target file resolution. On XO-1 we always
> pick a low res so gstreamer picks this one. And we end up with a video
> that only records a miniscule portion of the FOV.
> 
> All the other settings of the camera scale the image so that the whole
> FOV is covered. But this one records at normal resolution, only
> sending a small center portion of the FOV. The same pixels can be read
> by recording at full res and then just cutting out the center bit.

Seems an application-specific issue to me. I would accept a patch at cafe-ccic
limiting the minimum resolution (as it is device-specific), but I agree with
Jon that limiting it at the sensor is not a good thing to do. 

Getting full res means to require higher bandwidths at the bus (and this may be
a problem if someone wants to have more than one camera, and the bridge is USB).
Also, it will eat more CPU to downscale.

Cheers,
mauro

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-16  4:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08 21:04 [PATCH 1/3] ov7670: remove QCIF mode Daniel Drake
2010-10-08 21:11 ` Jonathan Corbet
2010-10-08 21:15   ` Daniel Drake
2010-10-16  4:28     ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.