[libcamera-devel] [PATCH] pipeline: raspberrypi: Set sensor default orientation before configure()

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Aug 27 12:44:15 CEST 2020


Hi Naush,

On 27/08/2020 11:17, Naushir Patuck wrote:
> Hi Kieran,
> 
> 
> On Thu, 27 Aug 2020 at 10:57, Kieran Bingham
> <kieran.bingham at ideasonboard.com> wrote:
>>
>> Hi Naush,
>>
>> On 27/08/2020 09:30, Naushir Patuck wrote:
>>> Hi all,
>>>
>>> Another gentle ping for a review and submission of this patch please.
>>
>> This has a tag from both me and Laurent, so I don't see any reason it
>> can't already be in.
> 
> Yes, this can go in as-is.  Thanks!
> 
>>
>> We'll have to look at how to optimise the integration paths for
>> contributions, as we of course just push our own patches after review.
>>
>> I wonder if it would help to make a pull-request (git-request-pull) when
>> a series is ready.
>>
>> I don't want to add extra burden to you though, and I can't see any
>> reason not to apply this now.
>>
> 
> I do not have a problem doing an extra git-request-pull when a patch
> is ready if that helps the workflow for you and the team.  I'm sure
> other external contributors would not have a problem either :)  Let me
> know if this is the preferred way going forward.

For this one, I think it wasn't obvious at a glance it was ready to go
in, so it got missed (it's in now).

We have a patchwork instance running, but it still needs some more
refinement to hook up the mail server correctly. I've also got a bot
running against that instance to automate tasks - so I think perhaps
that a good addition would be to have mail reminders from the bot if it
sees a patch with sufficient RB tags, which is not yet integrated.

--
Kieran



> Regards,
> Naush
> 
>> Pushing ...
>>
>>
>> I'll try to work through the status of the other raw patches now.
>> --
>> Kieran
>>
>>
>>> Thanks,
>>> Naush
>>>
>>> On Fri, 7 Aug 2020 at 13:12, Naushir Patuck <naush at raspberrypi.com> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> Just a gentle ping for the below change to be submitted when you can.
>>>>
>>>> Regards,
>>>> Naush
>>>>
>>>> On Tue, 21 Jul 2020 at 10:23, Naushir Patuck <naush at raspberrypi.com> wrote:
>>>>>
>>>>> The default sensor orientation must be set early on in match() to ensure
>>>>> generateConfiguration() and configure() return out the correct Bayer
>>>>> ordering to the application. This is particularly important for RAW
>>>>> capture streams.
>>>>>
>>>>> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
>>>>> ---
>>>>>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 14 +++++++-------
>>>>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>>>>
>>>>> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
>>>>> index bf1c7714..e9084afd 100644
>>>>> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
>>>>> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
>>>>> @@ -962,6 +962,13 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)
>>>>>         /* Initialize the camera properties. */
>>>>>         data->properties_ = data->sensor_->properties();
>>>>>
>>>>> +       /* Configure the H/V flip controls based on the sensor rotation. */
>>>>> +       ControlList ctrls(data->unicam_[Unicam::Image].dev()->controls());
>>>>> +       int32_t rotation = data->properties_.get(properties::Rotation);
>>>>> +       ctrls.set(V4L2_CID_HFLIP, static_cast<int32_t>(!!rotation));
>>>>> +       ctrls.set(V4L2_CID_VFLIP, static_cast<int32_t>(!!rotation));
>>>>> +       data->unicam_[Unicam::Image].dev()->setControls(&ctrls);
>>>>> +
>>>>>         /*
>>>>>          * List the available output streams.
>>>>>          * Currently cannot do Unicam streams!
>>>>> @@ -1165,13 +1172,6 @@ int RPiCameraData::configureIPA()
>>>>>                                               { V4L2_CID_EXPOSURE, result.data[1] } });
>>>>>                         sensorMetadata_ = result.data[2];
>>>>>                 }
>>>>> -
>>>>> -               /* Configure the H/V flip controls based on the sensor rotation. */
>>>>> -               ControlList ctrls(unicam_[Unicam::Image].dev()->controls());
>>>>> -               int32_t rotation = sensor_->properties().get(properties::Rotation);
>>>>> -               ctrls.set(V4L2_CID_HFLIP, static_cast<int32_t>(!!rotation));
>>>>> -               ctrls.set(V4L2_CID_VFLIP, static_cast<int32_t>(!!rotation));
>>>>> -               unicam_[Unicam::Image].dev()->setControls(&ctrls);
>>>>>         }
>>>>>
>>>>>         if (result.operation & RPI_IPA_CONFIG_SENSOR) {
>>>>> --
>>>>> 2.25.1
>>>>>
>>> _______________________________________________
>>> libcamera-devel mailing list
>>> libcamera-devel at lists.libcamera.org
>>> https://lists.libcamera.org/listinfo/libcamera-devel
>>>
>>
>> --
>> Regards
>> --
>> Kieran

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list