[PATCH] libcamera: software_isp: Clear frameContexts on Stop()

Robert Mader robert.mader at collabora.com
Sun Oct 13 18:42:35 CEST 2024


On 13.10.24 17:50, Umang Jain wrote:
> Hi Robert,
>
> On 13/10/24 5:34 pm, Robert Mader wrote:
>> Like the hardware pipelines do. Otherwise we might hit the following
>> assert: "Frame context for ... has been overwritten by ...".
>
> Would you like to mention here briefly, on what use-case you hit this 
> assertion.
Can do. Most easily this can be reproduced when switching back and forth 
between two cameras using the swISP, e.g. on a phone like the Pixel 3a.
>>
>> Fixes: 04d171e6 ("libcamera: software_isp: Call 
>> Algorithm::queueRequest")
>> Signed-off-by: Robert Mader <robert.mader at collabora.com>
>> ---
>>   src/ipa/simple/soft_simple.cpp | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/src/ipa/simple/soft_simple.cpp 
>> b/src/ipa/simple/soft_simple.cpp
>> index b28c7039..ac8847cb 100644
>> --- a/src/ipa/simple/soft_simple.cpp
>> +++ b/src/ipa/simple/soft_simple.cpp
>> @@ -245,6 +245,7 @@ int IPASoftSimple::start()
>>     void IPASoftSimple::stop()
>>   {
>> +  context_.frameContexts.clear();
>
> Looks good to me but additional hardware pipelines also reset/clear at 
> configure() time, for e.g.
>
>        /* Clear the IPA context before the streaming session. */
>         context_.configuration = {};
>         context_.activeState = {};
>         context_.frameContexts.clear();
>
> Would it make sense to do it in Soft IPA as well?
Yeah, good point - looks like cleaning up configuration and activeState 
so far wasn't really required for gain, but will be for the blacklevel.

-- 
Robert Mader
Consultant Software Developer

Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK
Registered in England & Wales, no. 5513718



More information about the libcamera-devel mailing list