[libcamera-devel] [PATCH 03/11] Adds rkisp1 metadata required for the Android HAL to use it.

Jacopo Mondi jacopo at jmondi.org
Tue Oct 25 15:19:59 CEST 2022


On Tue, Oct 25, 2022 at 09:13:22AM +0900, Paul Elder via libcamera-devel wrote:
> On Tue, Oct 25, 2022 at 02:49:25AM +0300, Laurent Pinchart via libcamera-devel wrote:
> > Hi Nicholas,
> >
> > Thank you for the patch.
> >
> > On Mon, Oct 24, 2022 at 12:55:35AM -0500, Nicholas Roth via libcamera-devel wrote:
> > > From: Nicholas Roth <nicholas at rothemail.net>
> > >
> > > ---
> > >  src/ipa/rkisp1/rkisp1.cpp | 7 +++++++
> > >  1 file changed, 7 insertions(+)
> > >
> > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> > > index ba3c547e..c536852c 100644
> > > --- a/src/ipa/rkisp1/rkisp1.cpp
> > > +++ b/src/ipa/rkisp1/rkisp1.cpp
> > > @@ -100,6 +100,13 @@ const ControlInfoMap::Map rkisp1Controls{
> > >  	{ &controls::Contrast, ControlInfo(0.0f, 1.993f) },
> > >  	{ &controls::Saturation, ControlInfo(0.0f, 1.993f) },
> > >  	{ &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },
> > > +	/* libcamera requires a fixed value for minimum frame duration,
> > > +	 * but this depends on the frame size and the rkisp1 device datasheets
> > > +	 * measure this in pixels per second. Neither the datasheets nor the driver
> > > +	 * specify a maximum. The minimum below is for 1920x1920. The maximum
> > > +	 * corresponds to two seconds. */
> > > +	{ &controls::FrameDurationLimits, ControlInfo(48505, 2000000) },
> >
> > Could this be computed the same way we do it in the IPU3 IPA module ?
> >
> > > +	{ &controls::draft::MaxLatency, ControlInfo(0) },
> >
> > Why is this needed ?
>
> This control looks familiar in the context of android...
>
> iirc from the CTS FULL support ordeal, MaxLatency needs to be between 0
> and 4 inclusive for burst capture capability [1], which is required for
> FULL (but not LIMITED).
>

Careful, we're claiming full per-frame control capabilities with this
set to 0 :)

"PER_FRAME_CONTROL (v3.2) 0 Every frame has the requests immediately
applied.  Changing controls over multiple requests one after another
will produce results that have those controls applied atomically each
frame.

All FULL capability devices will have this as their maxLatency."

I would leave it unspecified so that the HAL will use -1

"UNKNOWN (v3.2) -1 Each new frame has some subset (potentially the
entire set) of the past requests applied to the camera settings.  By
submitting a series of identical requests, the camera device will
eventually have the camera settings applied, but it is unknown when
that exact point will be.

All LEGACY capability devices will have this as their maxLatency."

Or use the pipeline depth as its upper limit.

Nicholas was this to satisfy some correctness check, or are you
actually looking into have precise per-frame control ?

>
> Paul
>
>
> [1] https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
>
> > >  	{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },
> > >  };
> > >


More information about the libcamera-devel mailing list