--- On Wed, 6/9/10, P F <[email protected]> wrote:

> From: P F <[email protected]>
> Subject: [Linux-uvc-devel] [RFC] Discard overrun (corrupted) RX images
> To: [email protected]
> Date: Wednesday, June 9, 2010, 12:59 AM
> Hi,
> 
> First of all, thank you for providing such great Linux
> support for webcams.  I have encountered an issue in this
> area that I hope you experts can help with.
> 
> I am using UVC/V4L on an embedded system, and I am
> experiencing a problem with corrupted camera images.  The
> system consists of a custom ASIC with an ARM926EJ-S and OHCI
> USB host controller connected to a UVC camera which supports
> only MJPEG.
> 
> The problem I have is that buffers dequeued in user space
> occasionally contain corrupted JPEGs.  This corruption
> ranges from slight, with a row of macroblocks shifted, to
> severe, with the JPEG being totally undecompressible.
> 
> If I enable UVC_TRACE_FRAME, I see several instances of:
> "uvcvideo: USB isochronous frame lost (-70)."
> in dmesg.  I have noticed a correlation between the
> presence of this message and visual corruption in captured
> JPEGs.
> 
> I see that this error code corresponds to -ECOMM, which in
> turn corresponds to TD_BUFFEROVERRUN in the isochronous
> packet status.  I assume that this is caused by CPU
> starvation, which should just manifest as dropped frames.
> 
> However, I think these overrun frames are not being
> dropped, and instead are being passed to user space in an
> indeterminate state, leading to the visual corruption that
> I've witnessed.
> 
> The attached patch (against 2.6.31) is my naïve attempt at
> fixing the problem.  It does appear to resolve the
> corruption, but I am not entirely sure it's the correct
> thing to do.  Does it look reasonable?  I would appreciate
> any feedback.
> 
> Thank you,
> Filter
> 
> 
>       
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> Linux-uvc-devel mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
> 

I have discovered that the previous patch works only when some
significant amount of tracing is active. e.g., UVC_TRACE_FRAME or
UVC_TRACE_IOCTL.  With tracing completely disabled, the patch has no
effect.  Activating tracing without the patch also does not resolve the
corruption.

Clearly, I have more investigation to do.  If anybody has ideas about what
might be occurring, I would like to hear them.

Thank you,
Filter


      
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to