[libcamera-devel] [PATCH 2/6] libcamera: formats: Add fields to info ease calculating bpl
Paul Elder
paul.elder at ideasonboard.com
Tue Jun 30 09:49:10 CEST 2020
<snip>
On Tue, Jun 30, 2020 at 04:42:48PM +0900, Paul Elder wrote:
> > > diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h
> > > index f59ac8f..dc19492 100644
> > > --- a/include/libcamera/internal/formats.h
> > > +++ b/include/libcamera/internal/formats.h
> > > @@ -45,13 +45,15 @@ public:
> > >
> > > static const PixelFormatInfo &info(const PixelFormat &format);
> > >
> > > - /* \todo Add support for non-contiguous memory planes */
> > > const char *name;
> > > PixelFormat format;
> > > V4L2PixelFormat v4l2Format;
> > > unsigned int bitsPerPixel;
> > > enum ColourEncoding colourEncoding;
> > > bool packed;
> > > +
> > > + unsigned int bytesPerGroup;
> > > + unsigned int pixelsPerGroup;
> >
> > Missing documentation :-) Didn't doxygen warn you ?
>
> Oops, yes :p
>
> I got used to ignoring doxygen's warnings because it always warns about
> missing docs in camera and controls...
>
> > I would also swap the two fields, I think it's more natural to say that
> > 2 pixels are stored in 3 bytes than saying that 3 bytes store 2 pixels.
>
> Yeah, that's probably better.
Wait, I take that back. I put bytes first then pixels, because then you
can say it's 3 bytes per 2 pixels. It's not a sentence, it's more like a
unit of measurement.
<snip>
Paul
More information about the libcamera-devel
mailing list