[libcamera-devel] qcam: Corrupt JPEG data

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Sep 1 07:40:51 CEST 2022


Hi Christian,

On Wed, Aug 31, 2022 at 11:13:50PM +0200, Christian Rauch via libcamera-devel wrote:
> Hi,
> 
> I have a "Logitech, Inc. Webcam C270" (046d:0825) USB wecam that causes
> an MJPEG related error message in qcam of the form: "Corrupt JPEG data:
> XX extraneous bytes before marker 0xXX". I don't see obvious issues with
> the resulting (decoded) image.

How often does this occur ? Do you see the message for every frame, or
once in a while ?

> I don't have this issue with other cameras on MJPEG mode or in "cam". I,

"cam" doesn't attempt to decompress JPEG images, so you won't see the
rror there indeed.

> however, have this same issue in my own code where I decode the jpeg
> payload via OpenCV imdecode.

> The error message originates from "libjpeg-turbo":
> https://github.com/libjpeg-turbo/libjpeg-turbo/blob/2.1.4/jerror.h#L192-L193
> 
> Is this a:
> a) hardware issue
> b) libcamera issue
> c) libjpeg-turbo issue
> d) all of the above :-)

Could you share one JPEG frame that triggers the issue ?

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list