Re: [PATCH] media-ctl: Add MEDIA_BUS_FMT_JPEG_1X8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 28, 2022 at 06:01:59PM +0200, Jacopo Mondi wrote:
> On Mon, Mar 28, 2022 at 06:52:50PM +0300, Laurent Pinchart wrote:
> > On Mon, Mar 28, 2022 at 03:56:28PM +0200, Jacopo Mondi wrote:
> > > Add the "JPEG" identifier to enable setting MEDIA_BUS_FMT_JPEG_1X8
> > > media bus code.
> > >
> > > Signed-off-by: Jacopo Mondi <jacopo@xxxxxxxxxx>
> > > ---
> > >  utils/media-ctl/libv4l2subdev.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
> > > index eb9e1cc43b7e..0f9ccc0a1552 100644
> > > --- a/utils/media-ctl/libv4l2subdev.c
> > > +++ b/utils/media-ctl/libv4l2subdev.c
> > > @@ -1084,6 +1084,7 @@ static const struct {
> > >  	{ "RBG24", MEDIA_BUS_FMT_RBG888_1X24 },
> > >  	{ "RGB32", MEDIA_BUS_FMT_RGB888_1X32_PADHI },
> > >  	{ "ARGB32", MEDIA_BUS_FMT_ARGB8888_1X32 },
> > > +	{ "JPEG", MEDIA_BUS_FMT_JPEG_1X8 },
> >
> > I've just realized that media-ctl already supports JPEG, with the
> > "JPEG_1X8" format name. It looks like adding a shorter name isn't
> > needed.
> 
> $ git remote -v | grep origin
> origin	git://linuxtv.org/v4l-utils.git (fetch)
> 
> $ git grep JPEG origin/master  -- utils/media-ctl/
> origin/master:utils/media-ctl/libv4l2subdev.c:  { "jpeg", V4L2_COLORSPACE_JPEG },
> 
> What am I missing ?

#include "media-bus-format-names.h"

in utils/media-ctl/libv4l2subdev.c. That header is generated
automatically from the kernel headers.

> > >  };
> > >
> > >  const char *v4l2_subdev_pixelcode_to_string(enum v4l2_mbus_pixelcode code)

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux