[libcamera-devel] JPEG support for libcamera

Pavel Machek pavel at ucw.cz
Tue Jul 12 22:29:46 CEST 2022


Hi!

> > JPEG is very similar to MJPEG format (AFAICT, it may contain extra
> > EXIF headers). Add support for it. Tested with PinePhone and command
> > line cam utility.
> > 
> > Signed-off-by: Pavel Machek <pavel at ucw.cz>
> > 
> > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h
> > index ea11dcb4..b30a705d 100644
> > --- a/include/linux/drm_fourcc.h
> > +++ b/include/linux/drm_fourcc.h
> > @@ -352,6 +352,7 @@ extern "C" {
> >  
> >  /* Compressed formats */
> >  #define DRM_FORMAT_MJPEG	fourcc_code('M', 'J', 'P', 'G') /* Motion-JPEG */
> > +#define DRM_FORMAT_JPEG	fourcc_code('J', 'P', 'E', 'G') /* JFIF JPEG */
> 
> I personally don't see the point of adding a second JPEG format in the public
> API. JPEG being duplicated is an absurdity because there is no decoders that do
> differentiate any of these. I'd rather hide deeply this strange duplication that
> originates from V4L2. Remember that there is a third JPEG format in V4L2 which
> is also not going to be differentiated by the decoders.

As long as JPEGs work for me, I'm quite happy. Can we make that
happen? :-).
								Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20220712/3b25b723/attachment.sig>


More information about the libcamera-devel mailing list