[RFC PATCH 0/1] Enable raw streams with software ISP

Milan Zamazal mzamazal at redhat.com
Mon Nov 25 10:52:14 CET 2024


Hi Laurent,

Laurent Pinchart <laurent.pinchart at ideasonboard.com> writes:

> On Fri, Nov 22, 2024 at 09:13:03PM +0100, Milan Zamazal wrote:
>> This makes raw streams working again in ‘simple’ pipeline when software
>> ISP is enabled for the given device.  For now, only a single raw stream
>> is supported and there are no immediate plans to change that unless
>> there is a request for more.
>
> Cameras don't support multiple raw streams in general. By "only a single
> raw stream is supported", do you mean you can't capture raw + processed
> ? 

Yes.

> I think that should be fixed, otherwise this sounds too much of a
> hack.

The primary purpose of this patch is to remedy the situation that
`simple' pipeline can produce a raw stream only when software ISP is
disabled in the sources for the given device.  But I can further work on
raw + processed if it solves a real problem.

>> An example ‘cam’ invocation requesting a raw stream rather than a debayered stream:
>> 
>>   cam -c1 -C8 -s role=raw,width=1920,height=1080 -Ffile#.raw
>> 
>> See the commit message for more information about the patch.
>> 
>> The patch is RFC because I’m not sure where it is placed on the scale
>> between a hack/PoC and a proper solution and because it’s not that
>> useful until a control for exposure/gain adjustments is implemented.
>> 
>> In the meantime, fixed exposure+gain can be hardwired in
>> src/ipa/simple/soft_simple.cpp by changing the lines
>> 
>>   ctrls.set(V4L2_CID_EXPOSURE, …);
>>   ctrls.set(V4L2_CID_ANALOGUE_GAIN, …);
>> 
>> to set the desired values (values used under the given conditions can be
>> obtained from normal software ISP debayered output debug log).
>> 
>> Milan Zamazal (1):
>>   libcamera: simple: Fix raw output
>> 
>>  src/libcamera/pipeline/simple/simple.cpp | 66 +++++++++++++++++++-----
>>  1 file changed, 54 insertions(+), 12 deletions(-)



More information about the libcamera-devel mailing list