{"id":17695,"url":"https://patchwork.libcamera.org/api/1.1/patches/17695/?format=json","web_url":"https://patchwork.libcamera.org/patch/17695/","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":"<20221027055515.321791-5-nicholas@rothemail.net>","date":"2022-10-27T05:55:09","name":"[libcamera-devel,04/10] ipa: libcamera: add metadata for the ov8858 sensor","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"3956f0ba305d7437f2f80ccb601b307e33480587","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/1.1/people/97/?format=json","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17695/mbox/","series":[{"id":3579,"url":"https://patchwork.libcamera.org/api/1.1/series/3579/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3579","date":"2022-10-27T05:55:08","name":"[libcamera-devel,01/10] ipa: workaround libcxx duration limitation","version":1,"mbox":"https://patchwork.libcamera.org/series/3579/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17695/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17695/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 F0C94C3286\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Oct 2022 05:55:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 963EF62F69;\n\tThu, 27 Oct 2022 07:55:31 +0200 (CEST)","from mail-oa1-x36.google.com (mail-oa1-x36.google.com\n\t[IPv6:2001:4860:4864:20::36])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D86E362F72\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Oct 2022 07:55:25 +0200 (CEST)","by mail-oa1-x36.google.com with SMTP id\n\t586e51a60fabf-13c569e5ff5so290853fac.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Oct 2022 22:55:25 -0700 (PDT)","from nroth-pc.attlocal.net\n\t([2600:1700:20:20c0:6406:fc7a:e46d:1666])\n\tby smtp.gmail.com with ESMTPSA id\n\t9-20020a9d0c09000000b00661a05691fasm140021otr.79.2022.10.26.22.55.23\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Oct 2022 22:55:24 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666850131;\n\tbh=xnDHkAPd2g5Hq6lyBj4kOwSXhukDArUaOXtHNf0gHhs=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=nrqY16QqTs819SmphcSdqYZgytrP8xOwDXgH5e2XYSq8qgPsqcIH3MPsmM3s62sfp\n\tomrLiqdoAsVS6tFXoLdzHlLRCrgM65BLZL3c8qeyG6zJI2tTEAkly6EGs+C/5TiQEF\n\tE4AoKCZSiRnbIp+1T5AiQ9e/46YOz8ymh3WIEyEqi8lc0w7sh/0RNj2FLiRIo1wAUz\n\tyuHvo6Qs1EqPUQSY6G51AQDT6Glup2SyQbTN+NNSyGVs3UIIcePL7SP6kMajBF6JL+\n\tvcoJXvxhS/srySe2Zj5q5oVJmNTxkxFE++EQu8QGeOBbmuZ+lh32yrC5yge+EHJ+SJ\n\tGNlhoDH5uYIEg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=rothemail-net.20210112.gappssmtp.com; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=WQuu50Cl3HTjXaKlv5BvG+/QADwbm4W5jqYyVcrkCmw=;\n\tb=1Jy8eBKSO2a50QA7d/3vFVRyZNnYLI/F5VxUXhiKYQzQalRr/Epkq8RRiz4TlPG5Q6\n\tDWXUYZRZYzSWlzzsDulLUKTEl8U1WGRbgOTLOEiPEY0a0ZFD3b6snmoeHTHRNbGStn5E\n\tpE1Cb5u/XXPLfXCOn1D1lPUibT6nbxSKqo8dF2ewPoy5INCeg8YsqbFkU/aC8xiyDrfA\n\t+IWr6DYk72GaHdYAzjmUxKOhOLROTaznBse7n0hAXLmrITly4ImMKDqzXGDMWb34tH3D\n\tkTOc4s5375edeEZGvibiYWpsdoIF9XSW+dG4Np2BJ0FaObRAnEwPq0tob9tA8p9++EQb\n\tSmXQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=rothemail-net.20210112.gappssmtp.com\n\theader.i=@rothemail-net.20210112.gappssmtp.com header.b=\"1Jy8eBKS\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:reply-to:references\n\t:in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=WQuu50Cl3HTjXaKlv5BvG+/QADwbm4W5jqYyVcrkCmw=;\n\tb=lcHVVmBhlyxqw5hZZ4g38TQ40MmqkI5FqTsNUmHuD8jLOs63zv/sSGLqriGd/sziUU\n\tIWiBNGRCKCeSvnuNFklCTy3q6X3P1PL2igKIO/SSdoOKCLuBrI+7Vf7oppXBtbVo0Eca\n\t0CAbeCEP7RipGPsvbMLfdv/zXXmaq5XsHaRSytkeMRlPUE7lAzjxF14YZDEOzqSgarW1\n\txGm4Z+2Ru9JEZdRZica3HQIygCxMxptIQ++Bq/7YT3VQ1yCEylU9iOQgCbgqIU5fn3Il\n\tqz5KDyqUU0c7mo8Ug7fiYY36pjJbqjPB7zFbdPBWbarwzmO2PTF78JXUh9kPgcshMKUI\n\tX9NQ==","X-Gm-Message-State":"ACrzQf1ZFYbWaqNu5EQ8Ti0PfDH/jgHeE5IxwdbCiuVbGEY3h4Je412y\n\t4JHUnM6I1BJxeStYxvLEb+t8SvjSQgPDM4uF","X-Google-Smtp-Source":"AMsMyM5GooIn5fx7RLSidC6Ho8kv4Y0gI/YPs9YfafUdv4zn0JBunEPXbOipJCIGVG67T7CADxhBcw==","X-Received":"by 2002:a05:6870:1799:b0:13b:86bc:7b52 with SMTP id\n\tr25-20020a056870179900b0013b86bc7b52mr4613411oae.189.1666850124268; \n\tWed, 26 Oct 2022 22:55:24 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 27 Oct 2022 00:55:09 -0500","Message-Id":"<20221027055515.321791-5-nicholas@rothemail.net>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20221027055515.321791-1-nicholas@rothemail.net>","References":"<libcamera Android Enhancements>\n\t<20221027055515.321791-1-nicholas@rothemail.net>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 04/10] ipa: libcamera: add metadata for\n\tthe ov8858 sensor","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>","From":"Nicholas Roth via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"libcamera-devel@lists.libcamera.org","Cc":"nicholas@rothemail.net","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Nicholas Roth <nicholas@rothemail.net>\n\nCurrently, libcamera does not have information for the ov8858 sensor\nused in the PinePhone Pro, a phone designed to run Linux.\n\nThis commit adds metadata, especially that sensor gain is reported and\nset in 1/16 discrete increments.\n\nFor more information, see \"5.8 manual exposure compensation/ manual\ngain compensation\" in [0].\n\n[0] http://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf\n\nSigned-off-by: Nicholas Roth <nicholas@rothemail.net>\n---\n src/ipa/libipa/camera_sensor_helper.cpp    | 11 +++++++++++\n src/libcamera/camera_sensor_properties.cpp | 14 ++++++++++++++\n 2 files changed, 25 insertions(+)","diff":"diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\nindex 35056bec..f2040cbd 100644\n--- a/src/ipa/libipa/camera_sensor_helper.cpp\n+++ b/src/ipa/libipa/camera_sensor_helper.cpp\n@@ -476,6 +476,17 @@ public:\n };\n REGISTER_CAMERA_SENSOR_HELPER(\"ov5693\", CameraSensorHelperOv5693)\n \n+class CameraSensorHelperOv8858 : public CameraSensorHelper\n+{\n+public:\n+\tCameraSensorHelperOv8858()\n+\t{\n+\t\tgainType_ = AnalogueGainLinear;\n+\t\tgainConstants_.linear = { 1, 0, 0, 16 };\n+\t}\n+};\n+REGISTER_CAMERA_SENSOR_HELPER(\"m00_f_ov8858\", CameraSensorHelperOv8858)\n+\n class CameraSensorHelperOv8865 : public CameraSensorHelper\n {\n public:\ndiff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\nindex e5f27f06..d0757c15 100644\n--- a/src/libcamera/camera_sensor_properties.cpp\n+++ b/src/libcamera/camera_sensor_properties.cpp\n@@ -146,6 +146,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n \t\t\t\t */\n \t\t\t},\n \t\t} },\n+\t\t{ \"m00_f_ov8858\", {\n+\t\t\t.unitCellSize = { 1200, 1200 },\n+\t\t\t.testPatternModes = {\n+\t\t\t\t{ controls::draft::TestPatternModeOff, 0 },\n+\t\t\t\t{ controls::draft::TestPatternModeColorBars, 1 },\n+\t\t\t\t/*\n+\t\t\t\t * No best corresponding test pattern for:\n+\t\t\t\t * 1: \"Vertical Color Bar Type 1\",\n+\t\t\t\t * 2: \"Vertical Color Bar Type 2\",\n+\t\t\t\t * 3: \"Vertical Color Bar Type 3\",\n+\t\t\t\t * 4: \"Vertical Color Bar Type 4\"\n+\t\t\t\t */\n+\t\t\t},\n+\t\t} },\n \t\t{ \"ov8865\", {\n \t\t\t.unitCellSize = { 1400, 1400 },\n \t\t\t.testPatternModes = {\n","prefixes":["libcamera-devel","04/10"]}