Hi,
I was a little bit unhappy that I managed to get
uncompressed pics from my 680 webcam when the device
is connected to an usb 2.0 hub (which uses the ehci
drivers) and no compressed pics.
Therefore I spent the better part of this afternoon
studying the code.
What happens is that I get an underflow. If I add
debug printk statements I see that the size of the
received data fluctuates when I have compressed data
The actual value changes a between 230, 231, 232 and
233
As a lower received size is used to trigger the end of
a frame this apparently terminates the frame
prematurely.
code in pwc-if.c around line 700 it says:
if (flen <
pdev->vlast_packet_size) {
/* Shorter packet...
We probably have the end of an image-frame;
and at around line 750 it says:
if (fbuf->filled < pdev->frame_total_size) {
Trace(TRACE_FLOW, "Frame buffer underflow (got %d
bytes, expected %d bytes); discarded.\n",
fbuf->filled, pdev->frame_total_size);
(note that my linenumbers might be off a little bit
because I added printk statements. I also changed the
trace statement above a little bit to also print the
total_size).
The odd thing is that frame_total_size is fixed and
seems to be the size of a frame after decompression.
So why do we have an underrun here. Decompression is
done in a later stage. So how can we decide here that
we have insufficient data?
Can someone explain this?
Would there be another way to detect the start of a
frame ?
I'm open to all suggestions.
Frans
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
_______________________________________________
pwc mailing list
http://lists.saillard.org/mailman/listinfo/pwc
|