Hi Carl,

On Friday 17 June 2011 23:33:25 Carl Michal wrote:

[snip]

> I've been looking at lengths of packets and headers in packets where these
> unexpected STI, RES, EOH and ERROR bits are set.
> 
> There are many things that seem inconsistent, but there are some patterns
> that come up repeatedly.  For example getting a packet with an ERROR bit
> set that has a length of 2048 and a header length (from data[0]) of 127 or
> 125 or 110 or some other big number. That packet gets discarded because of
> the error bit, but then when the frame ends, it is 2048 bytes shorter than
> it should be.  I've also seen that with a packet length of 1024 and the
> frame ending 1024 bytes short.
> 
> It looks like the header has somehow disappeared and the image data is
> being interpreted as header.

Good catch.

> To test this, I put in checks in uvc_video_decode_isoc for any EOH, STI, RES
> or ERROR - if any are set (or unset for EOH) then to return a header length
> of 0, so that the entire packet gets used as image data.
> 
> This by no means solves all my problems, but with that - I do find at least
> some frames assembled this way are complete and uncorrupted.
> 
> So somehow some headers are disappearing?

That's totally against the UVC specs. We could work around it in the driver if 
there was a reliable way to detect that a frame doesn't start with a header, 
but that's not possible. I would consider the camera as completely broken.

-- 
Regards,

Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to