[libcamera-devel] softISP for libcamera

Pavel Machek pavel at ucw.cz
Wed Dec 6 12:42:14 CET 2023


Hi!

> > I believe modifying the code to support bayer8 was fairly easy (but I
> > did not look at the results yet).
> > 
> > Unfortunately processing is quite slow:
> > 
> > 58747.865896 (0.57 fps) cam0-stream0 seq: 000016 bytesused: 2752812
> > 58750.104232 (0.45 fps) cam0-stream0 seq: 000035 bytesused: 2752812
> > 58752.342576 (0.45 fps) cam0-stream0 seq: 000054 bytesused: 2752812
> > 58754.580913 (0.45 fps) cam0-stream0 seq: 000073 bytesused: 2752812
> > 58756.819244 (0.45 fps) cam0-stream0 seq: 000092 bytesused: 2752812
> > 58759.057586 (0.45 fps) cam0-stream0 seq: 000111 bytesused: 2752812
> > 
> > Am I right that you only use top 8 bits from the bayer10 data?
> 
> Seems very low, I wonder is it related to softisp conversion or something
> else ?

Uncached data from kernel, I'd say.

> You might try out Hans' debayer optimisations which gets me aprox 50%
> conversions improvement
> 
> https://gitlab.freedesktop.org/camera/libcamera-softisp/-/tree/SoftwareISP-v01-hans1?ref_type=heads

Yep, I see improvement, too, in the same ballpark. (Like 0.45 fps ->
0.65 fps). I would be getting 8fps if caches were working
correctly. If I prepend manual copy, I get to 2.8fps to this based on
the copy block size:

70715.935183 (4.24 fps) cam0-stream0 seq: 000303 bytesused: 2716992
70716.052795 (8.50 fps) cam0-stream0 seq: 000304 bytesused: 2716992
70716.288411 (4.24 fps) cam0-stream0 seq: 000306 bytesused: 2716992
70716.406212 (8.49 fps) cam0-stream0 seq: 000307 bytesused: 2716992
70716.642007 (4.24 fps) cam0-stream0 seq: 000309 bytesused: 2716992
70716.759633 (8.50 fps) cam0-stream0 seq: 000310 bytesused: 2716992
70716.995245 (4.24 fps) cam0-stream0 seq: 000312 bytesused: 2716992
70717.113050 (8.49 fps) cam0-stream0 seq: 000313 bytesused: 2716992
70717.348662 (4.24 fps) cam0-stream0 seq: 000315 bytesused: 2716992

Best regards,
								Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20231206/bd148f67/attachment.sig>


More information about the libcamera-devel mailing list