[libcamera-devel] [PATCH] libcamera: pipeline: raspberrypi: Add StreamFormats to StreamConfiguration

Naushir Patuck naush at raspberrypi.com
Thu Jun 25 09:30:55 CEST 2020


Hi Laurent,



On Thu, 25 Jun 2020 at 03:37, Laurent Pinchart
<laurent.pinchart at ideasonboard.com> wrote:
>

<snip>

> > >>>>>>>> +            /* Translate the V4L2PixelFormat to PixelFormat. */
> > >>>>>>>> +            std::map<PixelFormat, std::vector<SizeRange>> deviceFormats;
> > >>>>>>>> +            std::transform(fmts.begin(), fmts.end(), std::inserter(deviceFormats, deviceFormats.begin()),
>
> One additional comment, should this be deviceFormats.end(), to insert
> the new entries at the end of the map ? It will make a difference in
> efficiency *if* new entries gets inserted right before the iterator.
> There's no such guarantee, as fmts is sorted by V4L2PixelFormat, and we
> convert that to a PixelFormat, but I think there's a bigger chance that
> insertion would happen at the end than at the beginning. If this
> analysis is correct, I'll fix the UVC pipeline handler accordingly.

Yes, that seems reasonable.

>
> I can address both the formats:: conflict and this issue when applying,
> but maybe it would be best if you could test a v2, in which case you
> could as well send it out :-)
>

I'll push version 2 of this patch shortly.

Regards,
Naush


More information about the libcamera-devel mailing list