From: Jean-Francois Moine <moinejf@free.fr>
To: "Erik Andrén" <erik.andren@gmail.com>
Cc: Hans de Goede <j.w.r.degoede@hhs.nl>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: libv4l: Possibility of changing the current pixelformat on the fly
Date: Sun, 5 Apr 2009 19:52:19 +0200 [thread overview]
Message-ID: <20090405195219.08e63cea@free.fr> (raw)
In-Reply-To: <49D7C17B.80708@gmail.com>
On Sat, 04 Apr 2009 22:22:19 +0200
Erik Andrén <erik.andren@gmail.com> wrote:
[snip]
> When flipping the image horizontally, vertically or both, the sensor
> pixel ordering changes. In the m5602 driver I was able to compensate
> for this in the bridge code. In the stv06xx I don't have this
> option. One way of solving this problem is by changing the
> pixelformat on the fly, i. e V4L2_PIX_FMT_SGRB8 is the normal
> format. When a vertical flip is required, change the format to
> V4L2_SBGGR8.
>
> My current understanding of libv4l is that it probes the pixelformat
> upon device open. In order for this to work we would need either
> poll the current pixelformat regularly or implement some kind of
> notification mechanism upon a flipping request.
>
> What do you think is this the right way to go or is there another
> alternative.
Hi Erik,
I saw such a problem in some other webcams. When doing a flip, the
sensor scans the pixels in the reverse order. So,
R G R G
G B G B
becomes
B G B G
G R G R
The solution is to start the scan one line lower or higher for VFLIP
and one pixel on the left or on the right for HFLIP.
May you do this with all the sensors of the stv06xx?
Cheers.
--
Ken ar c'hentan | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
next prev parent reply other threads:[~2009-04-05 17:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-04 20:22 libv4l: Possibility of changing the current pixelformat on the fly Erik Andrén
2009-04-05 9:08 ` Hans de Goede
2009-04-05 11:26 ` Erik Andrén
2009-04-05 12:35 ` Hans de Goede
2009-04-05 12:58 ` Erik Andrén
2009-04-05 14:10 ` Hans de Goede
2009-04-05 16:53 ` Theodore Kilgore
2009-04-06 8:00 ` Hans de Goede
2009-04-05 17:52 ` Jean-Francois Moine [this message]
2009-04-05 18:53 ` Erik Andrén
2009-04-05 19:02 ` Theodore Kilgore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090405195219.08e63cea@free.fr \
--to=moinejf@free.fr \
--cc=erik.andren@gmail.com \
--cc=j.w.r.degoede@hhs.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox