<div dir="ltr"><div dir="ltr">Hi Jacopo,<div><br></div><div>Thank you for the feedback.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 28 Aug 2024 at 10:10, Jacopo Mondi <<a href="mailto:jacopo.mondi@ideasonboard.com">jacopo.mondi@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Naush<br>
<br>
On Thu, Aug 08, 2024 at 11:23:40AM GMT, Naushir Patuck wrote:<br>
> Add a vendor control rpi::ScalerCrops that is analogous to the current<br>
> core::ScalerCrop, but can apply a different crop to each configured<br>
> stream.<br>
><br>
> This control takes a span of Rectangle structures - the order of<br>
> rectangles must match the order of streams configured by the application.<br>
><br>
> Signed-off-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com" target="_blank">naush@raspberrypi.com</a>><br>
> ---<br>
> src/ipa/rpi/common/ipa_base.cpp | 2 ++<br>
> src/libcamera/control_ids_rpi.yaml | 15 +++++++++++++++<br>
> 2 files changed, 17 insertions(+)<br>
><br>
> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp<br>
> index ee3848b54f21..463f6d384c9e 100644<br>
> --- a/src/ipa/rpi/common/ipa_base.cpp<br>
> +++ b/src/ipa/rpi/common/ipa_base.cpp<br>
> @@ -71,6 +71,7 @@ const ControlInfoMap::Map ipaControls{<br>
> { &controls::HdrMode, ControlInfo(controls::HdrModeValues) },<br>
> { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },<br>
> { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },<br>
> + { &controls::rpi::ScalerCrops, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },<br>
<br>
Can this be registered only in the pisp IPA ? In this way you won't<br>
see the control on vc4 platforms, and you can safely keep the code<br>
handling it in pipeline_base, but it will only be exercized on pi5<br></blockquote><div><br></div><div>Yes this is possible. I can rework it for v2.</div><div><br></div><div>Regards,</div><div>Naush</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> { &controls::FrameDurationLimits, ControlInfo(INT64_C(33333), INT64_C(120000)) },<br>
> { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },<br>
> { &controls::rpi::StatsOutputEnable, ControlInfo(false, true, false) },<br>
> @@ -1070,6 +1071,7 @@ void IpaBase::applyControls(const ControlList &controls)<br>
> break;<br>
> }<br>
><br>
> + case controls::rpi::SCALER_CROPS:<br>
> case controls::SCALER_CROP: {<br>
> /* We do nothing with this, but should avoid the warning below. */<br>
> break;<br>
> diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml<br>
> index cb097f887e16..3d4a305dd8f5 100644<br>
> --- a/src/libcamera/control_ids_rpi.yaml<br>
> +++ b/src/libcamera/control_ids_rpi.yaml<br>
> @@ -26,4 +26,19 @@ controls:<br>
><br>
> \sa StatsOutputEnable<br>
><br>
> + - ScalerCrops:<br>
> + type: Rectangle<br>
> + size: [n]<br>
> + description: |<br>
> + An array of rectangles, where each singular value has identical functionality<br>
> + to the ScalerCrop control. This control allows the Raspberry Pi pipeline<br>
> + handler to control individual scaler crops per output stream.<br>
> +<br>
> + The order of rectangles passed into the control must match the order of<br>
> + streams configured by the application.<br>
> +<br>
> + Note that using different crop rectangles for each output stream is only<br>
> + applicable on the Pi5/PiSP platform.<br>
> +<br>
> + \sa ScalerCrop<br>
> ...<br>
> --<br>
> 2.34.1<br>
><br>
</blockquote></div></div>