{"id":3300,"url":"https://patchwork.libcamera.org/api/1.1/covers/3300/?format=json","web_url":"https://patchwork.libcamera.org/cover/3300/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200324155145.3896183-1-niklas.soderlund@ragnatech.se>","date":"2020-03-24T15:51:38","name":"[libcamera-devel,0/7] libcamera: Add support for a RAW still capture","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/1.1/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"mbox":"https://patchwork.libcamera.org/cover/3300/mbox/","series":[{"id":770,"url":"https://patchwork.libcamera.org/api/1.1/series/770/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=770","date":"2020-03-24T15:51:39","name":"libcamera: Add support for a RAW still capture","version":1,"mbox":"https://patchwork.libcamera.org/series/770/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/3300/comments/","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BFCE662BDE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 24 Mar 2020 16:51:53 +0100 (CET)","from bismarck.berto.se (p4fca2392.dip0.t-ipconnect.de\n\t[79.202.35.146]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 5ced4a39-6de7-11ea-b7d8-005056917a89;\n\tTue, 24 Mar 2020 16:51:48 +0100 (CET)"],"X-Halon-ID":"5ced4a39-6de7-11ea-b7d8-005056917a89","Authorized-sender":"niklas@soderlund.pp.se","From":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 24 Mar 2020 16:51:38 +0100","Message-Id":"<20200324155145.3896183-1-niklas.soderlund@ragnatech.se>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 0/7] libcamera: Add support for a RAW\n\tstill capture","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 24 Mar 2020 15:51:54 -0000"},"content":"Hi,\n\nThis series adds RAW capture support. It implements a RAW stream in the \nIPU3 pipeline handler as an example. It targets RAW still image captures \nand uses a memcpy to copy out the buffer with the RAW data as soon as \nit's dequeued from the CIO2. The copy is needed as the buffer might need \nto be used in further processing by the IMGU.\n\nPatch 1/7 Defines a new StillCaptureRaw role which can be used to\napplications to generate configurations for raw capture. Patch 2/7 makes\nuse of this new role in the cam utility.\n\nPatch 3/7 is not ready for consumption as it depends on work submitted\nto the DRM subsystem. The patch is however needed as the new DRM formats\nare needed to describe the IPU3's RAW pixel format.\n\nPatch 4/7 adds a helper to do the actual memcpy of FrameBuffers. Patch \n5/7 adds a way for pipelines to set a FrameBuffer Request *. Patch 6/7 \nand 7/7 deals with implementing the RAW stream into the IPU3 pipeline \nhandler.\n\nI have tested this on IPU3 and I can capture both a single RAW stream or\na mix of RAW and video, example with both and writing to disk.\n\n$ ./cam -c1  -s role=video -s role=stillraw -C -F\n...\nfps: 0.00 stream0 seq: 002055 bytesused: 1382400 stream1 seq: 000001 bytesused: 3269376\nfps: 30.30 stream0 seq: 002056 bytesused: 1382400 stream1 seq: 000002 bytesused: 3269376\nfps: 30.30 stream0 seq: 002057 bytesused: 1382400 stream1 seq: 000003 bytesused: 3269376\nfps: 30.30 stream0 seq: 002058 bytesused: 1382400 stream1 seq: 000004 bytesused: 3269376\n...\n\nI have also verified the content of the captured RAW frames have the \nexpected content.\n\nNiklas Söderlund (7):\n  libcamera: stream: Add StillCaptureRaw role\n  cam: Add option to capture StillCaptureRaw stream\n  [DNI] include: drm_fourcc: Add Bayer FourCC and modifiers\n  libcamera: FrameBuffer: Add a method to copy buffer content\n  libcamera: FrameBuffer: Add a setRequest() interface\n  libcamera: ipu3: Do not unconditionally queue buffers to CIO2\n  libcamera: ipu3: Add support for a RAW still capture stream\n\n include/libcamera/buffer.h           |   4 +-\n include/libcamera/stream.h           |   1 +\n include/linux/drm_fourcc.h           |  94 +++++++++++++++++\n src/cam/main.cpp                     |   4 +-\n src/libcamera/buffer.cpp             |  72 +++++++++++++\n src/libcamera/pipeline/ipu3/ipu3.cpp | 152 +++++++++++++++++++++++----\n src/libcamera/stream.cpp             |   3 +\n 7 files changed, 309 insertions(+), 21 deletions(-)"}