All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anders Blomdell <anders.blomdell@control.lth.se>
To: Thomas Kaiser <v4l@kaiser-linux.li>
Cc: video4linux-list@redhat.com
Subject: Re: Topro 6800 driver
Date: Mon, 09 Mar 2009 13:10:40 +0100	[thread overview]
Message-ID: <49B50740.3000902@control.lth.se> (raw)
In-Reply-To: <49B194A7.4030808@kaiser-linux.li>

Thomas Kaiser wrote:
> Hello Anders
> 
> Anders Blomdell wrote:
>> Hi,
>>
>> I'm trying to write a driver for a webcam based on Topro TP6801/CX0342
>> (06a2:0003). My first attempt (needs gspca) can be found on:
> 
> I own a cam with a TP6810 USB bridge and a CX0342 sensor (this is 
> written on the driver CD).
> 
>> http://www.control.lth.se/user/andersb/tp6800.c
>>
>> Unfortunately the JPEG images (one example dump is in
>> http://www.control.lth.se/user/andersb/topro_img_dump.txt), seems to be bogus,
>> they start with (data is very similar to windows data):
>>
>> 00000000: 0xff,0xd8,0xff,0xfe,0x28,0x3c,0x01,0xe8,...
>> ...
>> 0000c340: ...,0xf4,0xc0,0xff,0xd9
>>
>> Anybody who has a good idea of how to find a DQT/Huffman table that works with
>> this image data?
> 
> I did some usbsnoops today and see some similar things in the stream as 
> in your trace. Maybe you can comment on my observation?
> 
> When I stop the capturing, the las 2 Bytes are always 0xff 0xd9 which 
> look like a valid JPEG marker (End of Image)
> 
> When I search for 0xffd9, I see the following sequence:
> 
> FF D9 5x FF D8 FF FE 14 1E xx xx xx
Is the 5x directly following the FFD9 (in my camera, the next frame [55] is in a
new ISO frame)?

> - 5x is 55 or 5A
I have only seen ISO frames starting with 55 (new frame) AA (abort frame) CC
(frame continuation), the 5A case is not documented in the manual I have

> - the 3 xx are mostly the same, but they change a lot when I cover the 
> lens of the cam. So I think this is some image information (brightness?).
Or perhaps JPEG encoded data.

> This said, i don't think that FF D8 and FF FE are JPEG markers, just a 
> unique Byte pattern to mark the start of a new frame.
Since the manual states that the chip does JPEG compression, and the frames are
significantly smaller than 640*480 and varies in size, I expect it to be in some
compressed format, and so far I expect JPEG (but with unknown Huffman/DQT tables).

> I guess 5x FF D8 FF FE 14 1E xx xx xx and may be some more bytes is the 
> frame marker.
> 
> Comments?
It would be interesting to know if somebody well versed in windows programming
could write a program to get JPEG frames out of the driver directly (provided
this is possible of course), if the image part of such a frame matches the data
seen on USB, we would then have the Huffman/DQT tables.

At the moment I'm stuck, since I see no way to find out what Huffman/DQT tables
that are used.

/Anders

-- 
Anders Blomdell                  Email: anders.blomdell@control.lth.se
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118                     Fax:      +46 46 138118
SE-221 00 Lund, Sweden

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  parent reply	other threads:[~2009-03-09 12:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27 22:15 Topro 6800 driver Anders Blomdell
2009-02-28 10:31 ` Jean-Francois Moine
2009-02-28 15:11   ` Anders Blomdell
2009-02-28 15:54     ` Thomas Kaiser
2009-03-01  7:26     ` Jean-Francois Moine
2009-03-01 16:33     ` Thomas Champagne
2009-03-02 13:20       ` Jean-Francois Moine
2009-03-02 16:58         ` Anders Blomdell
2009-02-28 11:54 ` Thomas Kaiser
     [not found] ` <49B194A7.4030808@kaiser-linux.li>
2009-03-09 12:10   ` Anders Blomdell [this message]
     [not found]     ` <49B50E16.8080703@kaiser-linux.li>
2009-03-09 14:06       ` Anders Blomdell
2009-03-09 18:51       ` Anders Blomdell
2009-03-09 20:10         ` Thomas Kaiser
2009-03-09 20:29           ` Anders Blomdell
2009-03-09 20:43             ` Thomas Kaiser
     [not found]               ` <49B62023.2090206@control.lth.se>
     [not found]                 ` <49B65BA7.6070700@kaiser-linux.li>
     [not found]                   ` <49B68F34.60802@control.lth.se>
     [not found]                     ` <49B6A495.9060204@kaiser-linux.li>
2009-03-11 15:09                       ` Anders Blomdell
2009-03-11 19:11                         ` Thomas Kaiser
2009-03-17 20:13                         ` Topro 6800 driver [JPEG decoding solved] Thomas Kaiser
2009-03-18 20:10                           ` Thomas Kaiser
2009-03-18 21:42                             ` Thomas Champagne
2009-03-25 17:10                             ` Anders Blomdell
     [not found]         ` <49B5786D.4060102@kaiser-linux.li>
     [not found]           ` <49B57CB6.8000402@control.lth.se>
2009-03-09 20:38             ` Mail list, Is WIKI up to date? Thomas Kaiser
  -- strict thread matches above, loose matches on Subject: below --
2009-03-27 18:06 topro 6800 driver Andy Shevchenko
     [not found] ` <49CD2868.9080502@kaiser-linux.li>
     [not found]   ` <5ec8ebd50903311144h316c7e3bmd30ce2c3d5a268ee@mail.gmail.com>
     [not found]     ` <49D4EAB2.4090206@control.lth.se>
2009-04-03 20:07       ` Anders Blomdell
2009-04-03 20:54         ` Erik Andrén
2009-04-04 11:29           ` Anders Blomdell
2009-04-05 17:36             ` Jean-Francois Moine
2009-04-20 15:37               ` Thomas Champagne

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=49B50740.3000902@control.lth.se \
    --to=anders.blomdell@control.lth.se \
    --cc=v4l@kaiser-linux.li \
    --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 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.