[libcamera-devel,00/10] libcamera: ipu3: ImgU support
mbox series

Message ID 20190228200410.3022-1-jacopo@jmondi.org
Headers show
Series
  • libcamera: ipu3: ImgU support
Related show

Message

Jacopo Mondi Feb. 28, 2019, 8:04 p.m. UTC
This series implements capture operations on IPU3 using the ImgU output device.

Based on the just sent:
"[PATCH v4 0/8] v4l2_(sub)dev: improvements and tests"

It will need rework and rebase to take Laurent series into account, and remove
the few hacks in here that allows me to access cameraData from a slot connected
to a bufferReady signal.

Output frames come from the ImgU output, but from my testing both viewfinder and
stat nodes should be linked and queued with buffer to have the system working.

Tested capturing images in different resolutions (2560x1920, 1920x1080, 640x480)
using the cam tool:
$./cam -c "ov5670 4-0036 1" -C -F  -f width=640,height=480

Images inspected and converted using raw2pnm tool:
raw2pnm -x640 -y480 -fNV12 ./frame-000250.bin /tmp/frames.out.ppm

Capture seems stable at 30FPS if not from an initial buffer queue error on
viewfinder and stat nodes, which then seems to work properly:

-------------------------------------------------------------------------------
Capture until user interrupts by SIGINT
[6:40:28.489657027]   DBG Camera camera.cpp:387 Starting capture
[6:40:28.742554331]   DBG V4L2 v4l2_device.cpp:830 /dev/video1: Buffer 0 is available
[6:40:28.742646387]   DBG V4L2 v4l2_device.cpp:752 /dev/video4: Queueing buffer 0
[6:40:28.746592685]   DBG V4L2 v4l2_device.cpp:830 /dev/video4: Buffer 0 is available
[6:40:28.746684744]   DBG V4L2 v4l2_device.cpp:830 /dev/video6: Buffer 0 is available
seq: 000270 buf: 0 bytesused: 0 timestamp: 24028746466000 fps: 0.00
[6:40:28.748480475]   DBG V4L2 v4l2_device.cpp:752 /dev/video7: Queueing buffer 0
[6:40:28.748548455]   ERR V4L2 v4l2_device.cpp:757 /dev/video7: Failed to queue buffer 0: Invalid argument
[6:40:28.748576798]   DBG V4L2 v4l2_device.cpp:752 /dev/video8: Queueing buffer 0
[6:40:28.748605210]   ERR V4L2 v4l2_device.cpp:757 /dev/video8: Failed to queue buffer 0: Invalid argument
[6:40:28.748628859]   DBG V4L2 v4l2_device.cpp:752 /dev/video1: Queueing buffer 0
[6:40:28.748675600]   DBG V4L2 v4l2_device.cpp:752 /dev/video6: Queueing buffer 0
[6:40:28.748784519]   DBG V4L2 v4l2_device.cpp:830 /dev/video7: Buffer 0 is available
[6:40:28.748840025]   DBG V4L2 v4l2_device.cpp:830 /dev/video8: Buffer 0 is available
[6:40:28.775710908]   DBG V4L2 v4l2_device.cpp:830 /dev/video1: Buffer 1 is available
[6:40:28.775792660]   DBG V4L2 v4l2_device.cpp:752 /dev/video4: Queueing buffer 1
[6:40:28.779597133]   DBG V4L2 v4l2_device.cpp:830 /dev/video6: Buffer 1 is available
seq: 000271 buf: 1 bytesused: 0 timestamp: 24028779481000 fps: 30.29
-------------------------------------------------------------------------------

Jacopo Mondi (10):
  libcamera: ipu3: Group CIO2 devices
  libcamera: ipu3: Get default image sizes from sensor
  libcamera: ipu3: Initialize and link ImgU devices
  libcamera: ipu3: Propagate image format
  libcamera: ipu3: Implement buffer allocation
  libcamera: ipu3: Implement buffer release
  libcamera: ipu3: Queue requests to the pipeline
  libcamera: ipu3: Implement camera start/stop
  libcamera: ipu3: Connect CIO2 output to ImgU input
  libcamera: ipu3: Use NV12 as default image format

 src/libcamera/pipeline/ipu3/ipu3.cpp | 919 ++++++++++++++++++++++-----
 1 file changed, 748 insertions(+), 171 deletions(-)

--
2.20.1