[libcamera-devel] ScalerCrop control and camera modes

Jacopo Mondi jacopo.mondi at ideasonboard.com
Wed Jan 11 16:55:19 CET 2023


Hi David

On Wed, Jan 11, 2023 at 01:27:31PM +0000, David Plowman via libcamera-devel wrote:
> Hi everyone
>
> A little question about what happens to the ScalerCrop control when we
> switch between camera modes (i.e. call configure). Paying particular
> attention to the case when the two camera modes have different sensor
> crops (and therefore a different FoV), should the ScalerCrop be
> preserved or not?

How is a Control "preserved" between streaming sessions ?

Are you wondering if the ScalerCrop set by an application during a
streaming session should be retained by the pipeline handler after a
[stop - configure] sequence and re-applied at start() time without
application's intervention ?

If that's the case, are there other controls preserved between
reconfigurations or do you have any in mind ?

>
> I think we could go either way.
>
> If the ScalerCrop is preserved that's fine, but you have to handle the
> case where the previous ScalerCrop is not entirely available in the
> new mode. You also have to consider how an application would reset the
> ScalerCrop so as to switch from a mode with a limited FoV to one with
> a larger FoV.
>
> If the ScalerCrop isn't preserved that's fine too, but you have to
> consider how an application would preserve the ScalerCrop if it wanted
> to.
>
> In many respects I don't think there's much difference, applications
> would (sometimes) have to specify the ScalerCrop they want when they
> call start. But which do we think is the most desirable behaviour? On
> the Pi, by not having thought about it, we are implementing the second
> alternative (ScalerCrop not preserved).
>
> Thoughts?
>
> Thanks!
> David


More information about the libcamera-devel mailing list