[libcamera-devel] [PATCH 0/7] libcamera: Map multiple V4L2 formats to a single libcamera::format

Pavel Machek pavel at ucw.cz
Sat Jul 23 20:00:08 CEST 2022


Hi!

> Thanks for testing!
> 
> Turns out I have a pinephone as well, and I spent the last days trying
> to set it up to test libcamera there.

Nice!

> The result is that I have sent a v2 of this series with one additional
> patch on top and had to massage the video driver a bit to make it
> slightly more compliant with libcamera requirements.
> 
> With these two branches:
> 
> - postmarket os patches + ov5640 backport + sun6i-csi
> https://git.sr.ht/~jmondi_/linux/log/pinephone/orange-pi-5.17-20220429-1618/postmarketos
> - JPEG/MJPEG mapping
> https://git.sr.ht/~jmondi_/libcamera/log/jmondi/pinephone
> 
> I'm able to capture from ov5640 in YUYV and JPEG formats in different
> resolutions:
> $ cam -c2 -C --stream pixelformat=YUYV,width=640,height=480
> $ cam -c2 -C --stream pixelformat=MJPEG,width=1920,height=1080 -F

> I've been able to inspect the YUYV image and they're ok, the JPEG one
> can't be opened with my viewer and I've not investigated why. I recall
> I tested JPEG with the ov5640 driver in a CSI-2 setup and it worked.

JPEG works for me. At some resolution/fps setting I was getting
corruption in YUYV (?), and there JPEG got corrupted, too.

> Capturing in full resolution doesn't work. The sensor hangs and I
> presume it is because of the sensor driver. The long list of changes
> now upstreamed for the ov5640 sensor modes only apply to CSI-2

This worked for me:

#build/src/cam/cam  -c /base/i2c-csi/rear-camera at 4c  -spixelformat=JPEG,width=2592,height=1944 --sdl -C20 -F/tmp/delme.#

frame_interval was 10 iirc. This, too:

#build/src/qcam/qcam -r gles -spixelformat=SBGGR8,width=2592,height=1944 -c /base/i2c-csi/rear-camera at 4c

SBGGR8 works for me at high resolutions, while YUYV works at low
resolutions. I have to adjust frame_interval for some stuff to work.

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/20220723/6af7e2f6/attachment.sig>


More information about the libcamera-devel mailing list