{"id":9131,"url":"https://patchwork.libcamera.org/api/patches/9131/?format=json","web_url":"https://patchwork.libcamera.org/patch/9131/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20200801101427.1540331-3-niklas.soderlund@ragnatech.se>","date":"2020-08-01T10:14:26","name":"[libcamera-devel,v3,2/3] android: camera_device: Map HAL RAW to libcamera RAW formats","commit_ref":"d4de037a8ae55f9ebf7e98782928b12490a33c1e","pull_url":null,"state":"accepted","archived":false,"hash":"c92d5f30465bfa454ed155f02ae33019bb7c084d","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/9131/mbox/","series":[{"id":1175,"url":"https://patchwork.libcamera.org/api/series/1175/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1175","date":"2020-08-01T10:14:24","name":"android: camera_device: Add RAW support","version":3,"mbox":"https://patchwork.libcamera.org/series/1175/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/9131/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/9131/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 1D412BD86F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  1 Aug 2020 10:15:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EB7F561F24;\n\tSat,  1 Aug 2020 12:15:12 +0200 (CEST)","from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net\n\t[195.74.38.228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E28AC61F2E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  1 Aug 2020 12:15:10 +0200 (CEST)","from bismarck.berto.se (p4fca2eca.dip0.t-ipconnect.de\n\t[79.202.46.202]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid b1755dad-d3df-11ea-86ee-0050569116f7;\n\tSat, 01 Aug 2020 12:13:50 +0200 (CEST)"],"X-Halon-ID":"b1755dad-d3df-11ea-86ee-0050569116f7","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":"Sat,  1 Aug 2020 12:14:26 +0200","Message-Id":"<20200801101427.1540331-3-niklas.soderlund@ragnatech.se>","X-Mailer":"git-send-email 2.27.0","In-Reply-To":"<20200801101427.1540331-1-niklas.soderlund@ragnatech.se>","References":"<20200801101427.1540331-1-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v3 2/3] android: camera_device: Map HAL\n\tRAW to libcamera RAW formats","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add a mapping from HAL RAW formats to the direct equivalent of libcamera\nformats. With this change it is possible to capture RAW images as long\nas the hardware can deliver frames in a format that is native to the\nHAL.\n\nMore work is needed to deal with unpacked 8, 10 and 12 RAW formats as\nthey don't directly map to a native HAL format. Nor do they belong in\nthe RAW_OPAQUE category as the content format is generic and not\nuncommonly supported by hardware.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_device.cpp | 44 +++++++++++++++++++++++++++++++++++\n 1 file changed, 44 insertions(+)","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 8028d3e12bda1316..b7b6cb19426d8760 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -77,6 +77,50 @@ const std::map<int, const Camera3Format> camera3FormatsMap = {\n \t\t\ttrue,\n \t\t\t\"IMPLEMENTATION_DEFINED\"\n \t\t}\n+\t}, {\n+\t\tHAL_PIXEL_FORMAT_RAW10, {\n+\t\t\t{\n+\t\t\t\tformats::SBGGR10_CSI2P,\n+\t\t\t\tformats::SGBRG10_CSI2P,\n+\t\t\t\tformats::SGRBG10_CSI2P,\n+\t\t\t\tformats::SRGGB10_CSI2P\n+\t\t\t},\n+\t\t\tfalse,\n+\t\t\t\"RAW10\"\n+\t\t}\n+\t}, {\n+\t\tHAL_PIXEL_FORMAT_RAW12, {\n+\t\t\t{\n+\t\t\t\tformats::SBGGR12_CSI2P,\n+\t\t\t\tformats::SGBRG12_CSI2P,\n+\t\t\t\tformats::SGRBG12_CSI2P,\n+\t\t\t\tformats::SRGGB12_CSI2P\n+\t\t\t},\n+\t\t\tfalse,\n+\t\t\t\"RAW12\"\n+\t\t}\n+\t}, {\n+\t\tHAL_PIXEL_FORMAT_RAW16, {\n+\t\t\t{\n+\t\t\t\tformats::SBGGR16,\n+\t\t\t\tformats::SGBRG16,\n+\t\t\t\tformats::SGRBG16,\n+\t\t\t\tformats::SRGGB16\n+\t\t\t},\n+\t\t\tfalse,\n+\t\t\t\"RAW16\"\n+\t\t}\n+\t}, {\n+\t\tHAL_PIXEL_FORMAT_RAW_OPAQUE, {\n+\t\t\t{\n+\t\t\t\tformats::SBGGR10_IPU3,\n+\t\t\t\tformats::SGBRG10_IPU3,\n+\t\t\t\tformats::SGRBG10_IPU3,\n+\t\t\t\tformats::SRGGB10_IPU3\n+\t\t\t},\n+\t\t\tfalse,\n+\t\t\t\"RAW_OPAQUE\"\n+\t\t}\n \t},\n };\n \n","prefixes":["libcamera-devel","v3","2/3"]}