From: Hans de Goede <hdegoede@redhat.com>
To: kilgota@banach.math.auburn.edu
Cc: Olivier Lorin <o.lorin@laposte.net>,
Adam Baker <linux@baker-net.org.uk>,
video4linux-list@redhat.com, linux-media@vger.kernel.org,
Hans de Goede <j.w.r.degoede@hhs.nl>
Subject: Re: RFC: Where to store camera properties (upside down, needs sw whitebalance, etc). ?
Date: Tue, 20 Jan 2009 11:10:44 +0100 [thread overview]
Message-ID: <4975A324.7000500@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0901171242390.16116@banach.math.auburn.edu>
kilgota@banach.math.auburn.edu wrote:
>
>
> On Fri, 16 Jan 2009, Olivier Lorin wrote:
>
> <snip>
>
>
>> Post gamma or white balance correction seemed to be more part of the
>> webcam
>> capabilities than the image state so that the new API to get these
>> features
>> is quite logical.
>
> Hmmm.
>
> While one is in the process of planning ahead, it it good to think of
> everything. You have not yet seen any code for the sq905c cameras in
> webcam mode, yet. Well, actually, you can if you want to. The needed
> sequence of operations is used in the support for
>
> "gphoto2 --capture-preview"
>
> in libgphoto2/camlibs/digigr8/library.c.
>
> What happens with this camera is, the frame data has been compressed and
> therefore it is needed to know how much data is present for a frame
> before downloading the rest of the frame. The length of the frame header
> is set at 0x50 bytes, so one downloads that first. Here is a sample of
> one such frame header:
>
> 0000 ff 00 ff 00 ff 00 ff 00-ff 00 ff 00 ff 00 ff 00 ................
> 0010 ff 00 ff 00 ff 00 ff 00-ff 00 ff 00 ff 00 ff 00 ................
> 0020 ff 00 ff 00 ff 00 ff 00-ff 00 ff 00 ff 00 ff 00 ................
> 0030 ff 00 ff 00 ff 00 ff 00-ff 00 ff 00 ff 00 ff 00 ................
> 0040 e0 5a 00 00 3b 3e 50 3b-36 00 ff 00 ff 00 ff 00 .Z..;>P;6.......
>
> Now, most of this is just filler. The data size for the frame is to be
> found in bytes 0x40 and 0x41 and it says that 0x5ae0 bytes must be
> downloaded for this frame. I have never seen the next two bytes with
> anything in them, so my reasonable conjecture is that they are similarly
> used, as part of the data size field. It is just that in practice one
> never sees a frame with so much data in it.
>
> Now, my comment here is directed toward bytes 0x44 through 0x48. I do
> not claim to know exactly what they mean. However, I would strongly
> suspect that they have something to do with contrast, color balance,
> intensity, and so on. Really, logic would seem to indicate that there is
> no other point to providing those entries, which certainly do vary from
> one frame to another and the readings in them do seem in some vague
> sense to have something to do with the local light conditions, and sucn.
>
> Therefore, confronted with my experience with these cameras, I would
> tend to suspect that
>
> "Post gamma or white balance correction seemed to be more part of the
> webcam capabilities than the image state"
>
> may not always be the case. For, here, with this camera, it appears that
> some kind of related information is being passed with each individual
> frame.
Yes, we've seen that more often. In this case the solution is simple, since we
need to do decompression in userspace anyways, just pass the entire frame
including the header (with the potential interesting bytes) to userspace in the
frame buffer, then userspace can get that info if it needs to.
A bigger problem is when this happens and the cam generates a standard format
like jpeg (with an additional header), but we haven't encountered cams like
this yet, so lets not worry about that for now.
Regards,
Hans
'
next prev parent reply other threads:[~2009-01-20 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-16 22:56 RFC: Where to store camera properties (upside down, needs sw whitebalance, etc). ? Olivier Lorin
2009-01-17 19:02 ` kilgota
2009-01-20 10:10 ` Hans de Goede [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-01-16 11:43 Olivier Lorin
2009-01-16 20:58 ` RFC: " Adam Baker
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=4975A324.7000500@redhat.com \
--to=hdegoede@redhat.com \
--cc=j.w.r.degoede@hhs.nl \
--cc=kilgota@banach.math.auburn.edu \
--cc=linux-media@vger.kernel.org \
--cc=linux@baker-net.org.uk \
--cc=o.lorin@laposte.net \
--cc=video4linux-list@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).