Re: PATCH: gspca-mercurial fix sn9c103 decoding frames
Hans de Goede <[email protected]> Sat, 05 Jul 2008 19:31:13 +0200
| Newsgroups | gmane.linux.drivers.spca50x.devel |
|---|---|
| Message-ID | <[email protected]> |
Andoni Zubimendi wrote:
> Hi All,
>
> This patch makes the sonixb gspca driver decode the frames correctly with
> this bridge.
> The problem with the decoding is the header size, that is different in
> SN9C103, it is 6 bytes bigger.
>
> Now my webcam works with wrong colors, I'm looking at the documentation of
> the sensor it has (OV7630) to see what's going on. Also have some other
> drivers that work with this sensor. Any hints appreciated.
>
It looks like:
1) You're getting hit by the unknown codes in the compressed data stream
problem, see:
http://bertrik.sikken.nl/webcam/sn9c101.htm
2) You're exposure is way of, I have the same problem with an sn9c102 cam with
a tas5110c sensor, try using it in a darker room :)
3) the bayer pattern of your cam is different, no GBRG, like mine, but perhaps
BGGR ?
Edit libv4lconvert/libv4lconvert.c and look for the lines:
case V4L2_PIX_FMT_SN9C10X:
v4lconvert_decode_sn9c10x(src, tmpbuf, dest_fmt->fmt.pix.width,
dest_fmt->fmt.pix.height);
bayer_fmt = V4L2_PIX_FMT_SGBRG8;
break;
And then change the line:
bayer_fmt = V4L2_PIX_FMT_SGBRG8;
To:
bayer_fmt = V4L2_PIX_FMT_SBGGR8;
Also interesting with regards to this is to try the sn9c102 driver which
already is part of the kernel together with libv4lconvert? That doesn't have
the headersize problem AFAIK, and also that can give raw bayer in low res
modes, avoiding the unknown compression codes problem.
BTW how are you using libv4lconvert? And have you applied the camorama nugfix
patches which come together with libv4l to camorama.
ALso notice that even with those patches applied camorama still is quite buggy,
it could be that you're not using libv4lconvert at all, and camorama is
interpreting the compressed data as raw rgb (yes it does that its really stupid).
Regards,
Hans
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08