From: Thomas Kaiser <v4l@kaiser-linux.li>
To: kilgota@banach.math.auburn.edu
Cc: Jean-Francois Moine <moinejf@free.fr>,
Kyle Guinn <elyk03@gmail.com>,
linux-media@vger.kernel.org
Subject: Re: MR97310A and other image formats
Date: Thu, 19 Feb 2009 23:45:27 +0100 [thread overview]
Message-ID: <499DE107.80502@kaiser-linux.li> (raw)
In-Reply-To: <alpine.LNX.2.00.0902191502380.7303@banach.math.auburn.edu>
kilgota@banach.math.auburn.edu wrote:
> Yes, what you quote is the SOF marker for all of these cameras. The
> total header length, including the SOF marker ought to be 12 bytes. On
> all of the mr97310 cameras that I have dealt with, the last 5 bytes are
> obviously related somehow to the image (contrast, color balance, gamma,
> whatever). I have no idea how to interpret those values, but we can hope
> that someone will figure out how.
Two of them are luminance values (middle and edge) for the PAC207.
> Thus, it is not a good idea to throw
> them away as the driver is currently doing. If they have to be tossed,
> then toss them over in libv4lconvert, I would say, instead of shaving
> them off in the driver. It makes for much simpler driver code when one
> does not try to work around them, too.
Yes, there are always some additional Bytes in the SOF header for a good
reason.
> FF FF 00 FF 96 64 00 uncompressed
> FF FF 00 FF 96 64 50 "standard compression" supported here and in
> libgphoto2/camlibs/mars. Supports all cameras in stillcam mode except
> for the next one listed
> FF FF 00 FF 96 64 20 another compression, used by one stillcam, not
> resolved
> FF FF 00 FF 96 64 D0 new compression algorithm used by all the
> 0x093a:0x010e cameras that I own (several of them), when running in
> streaming mode.
So, you found the meaning of an other Byte in the SOF header. I have to
check whats in there for the PAC207 and PAC7311.
> Incidentally, I did have something to do with solving the the 0x50
> decompression. Bertrik Sikkens figured out the basics. It is a
> differential Huffman encoding, as I said. One computes a "predictor" for
> the next pixel to be decompressed by taking a weighted average of some
> previously decompressed pixel data. Then one applies a "corrector" which
> is the next piece of decoded data. Bertrik figured out the Huffman
> scheme, as I said. What I did was to figure out the right pixels to
> average for the predictor part and what weights they get assigned in the
> weighted average.
That is a similar compression like on the PAC207 the first 2 pixels of
the line have the real value and for the other pixels, only the diff to
these two pixels are stored in Huffman codes.
Now you can guess who found out how to decompress -> Bertrik Sikkens
>
> But it seems that you know something about this kind of thing and
> probably have the right tools or clues to be able to handle them. I have
> a couple of other unsolved formats lying around, too. You might be the
> person I have been trying to meet. Interested?
Always interested, but my free time is very limited :-(
It looks like I have 22 webcams on my desk and 3 or 4 of them are _not_
working in Linux. Thus, I have a lot of homework to do.....
Thomas
next prev parent reply other threads:[~2009-02-19 22:45 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 19:09 MR97310A and other image formats Jean-Francois Moine
2009-02-17 19:35 ` Thomas Kaiser
2009-02-18 9:25 ` Jean-Francois Moine
2009-02-18 12:58 ` Thomas Kaiser
2009-02-18 19:17 ` Jean-Francois Moine
2009-02-17 19:43 ` Thomas Kaiser
2009-02-18 1:07 ` Kyle Guinn
2009-02-19 0:40 ` kilgota
2009-03-04 0:12 ` RFC on proposed patches to mr97310a.c for gspca and v4l kilgota
2009-03-04 2:50 ` Kyle Guinn
2009-03-04 5:21 ` kilgota
2009-03-04 8:41 ` Thomas Kaiser
2009-03-04 8:54 ` Thomas Kaiser
2009-03-04 19:01 ` kilgota
2009-03-05 13:02 ` Thomas Kaiser
2009-03-05 18:29 ` kilgota
2009-03-05 19:19 ` Thomas Kaiser
2009-03-05 19:45 ` kilgota
2009-03-05 20:29 ` Thomas Kaiser
2009-03-05 20:55 ` kilgota
2009-03-05 20:51 ` Thomas Kaiser
2009-04-15 23:59 ` Some questions about mr97310 controls (continuing previous thread on mr97310a.c) Theodore Kilgore
2009-04-16 16:10 ` Thomas Kaiser
2009-04-16 22:50 ` Theodore Kilgore
2009-04-17 8:36 ` Hans de Goede
2009-05-02 1:47 ` Progress with the MR97310A "CIF" cameras Theodore Kilgore
2009-04-16 5:14 ` RFC on proposed patches to mr97310a.c for gspca and v4l Kyle Guinn
2009-04-16 18:22 ` Theodore Kilgore
2009-04-17 4:33 ` Kyle Guinn
2009-04-17 17:50 ` Theodore Kilgore
2009-04-18 0:04 ` Kyle Guinn
2009-04-18 0:43 ` Theodore Kilgore
2009-04-21 1:18 ` RFC on proposed patches to mr97310a.c for gspca and v4l (headers) Theodore Kilgore
2009-04-21 2:44 ` Theodore Kilgore
2009-05-15 22:31 ` Preliminary results with an SN9C2028 camera Theodore Kilgore
2009-05-19 7:56 ` Hans de Goede
2009-05-19 18:18 ` Theodore Kilgore
2009-03-04 8:39 ` RFC on proposed patches to mr97310a.c for gspca and v4l Hans de Goede
2009-03-04 18:46 ` kilgota
2009-03-05 1:33 ` Kyle Guinn
2009-03-05 7:01 ` Hans de Goede
2009-03-04 8:35 ` Hans de Goede
2009-03-05 2:49 ` Kyle Guinn
2009-03-05 4:34 ` kilgota
2009-03-05 5:54 ` Kyle Guinn
2009-03-05 6:47 ` kilgota
2009-03-05 7:00 ` Hans de Goede
2009-03-05 19:08 ` kilgota
2009-03-05 19:07 ` Hans de Goede
2009-03-05 20:42 ` kilgota
2009-03-05 20:40 ` Hans de Goede
2009-03-05 20:58 ` kilgota
2009-03-06 1:21 ` Kyle Guinn
2009-03-06 1:57 ` kilgota
2009-03-28 22:42 ` [PATCH] to add new camera in gspca/mr97310a.c Theodore Kilgore
2009-02-19 18:17 ` MR97310A and other image formats kilgota
2009-02-19 19:17 ` Thomas Kaiser
2009-02-19 21:54 ` kilgota
2009-02-19 22:45 ` Thomas Kaiser [this message]
2009-02-19 23:50 ` kilgota
2009-02-20 0:52 ` Thomas Kaiser
2009-02-20 1:32 ` kilgota
2009-02-20 8:00 ` Thomas Kaiser
2009-02-20 18:45 ` kilgota
2009-02-20 19:05 ` Thomas Kaiser
2009-02-20 20:26 ` kilgota
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=499DE107.80502@kaiser-linux.li \
--to=v4l@kaiser-linux.li \
--cc=elyk03@gmail.com \
--cc=kilgota@banach.math.auburn.edu \
--cc=linux-media@vger.kernel.org \
--cc=moinejf@free.fr \
/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