From patchwork Thu Oct 27 05:55:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne via libcamera-devel X-Patchwork-Id: 17695 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F0C94C3286 for ; Thu, 27 Oct 2022 05:55:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 963EF62F69; Thu, 27 Oct 2022 07:55:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666850131; bh=xnDHkAPd2g5Hq6lyBj4kOwSXhukDArUaOXtHNf0gHhs=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nrqY16QqTs819SmphcSdqYZgytrP8xOwDXgH5e2XYSq8qgPsqcIH3MPsmM3s62sfp omrLiqdoAsVS6tFXoLdzHlLRCrgM65BLZL3c8qeyG6zJI2tTEAkly6EGs+C/5TiQEF E4AoKCZSiRnbIp+1T5AiQ9e/46YOz8ymh3WIEyEqi8lc0w7sh/0RNj2FLiRIo1wAUz yuHvo6Qs1EqPUQSY6G51AQDT6Glup2SyQbTN+NNSyGVs3UIIcePL7SP6kMajBF6JL+ vcoJXvxhS/srySe2Zj5q5oVJmNTxkxFE++EQu8QGeOBbmuZ+lh32yrC5yge+EHJ+SJ GNlhoDH5uYIEg== Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D86E362F72 for ; Thu, 27 Oct 2022 07:55:25 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=rothemail-net.20210112.gappssmtp.com header.i=@rothemail-net.20210112.gappssmtp.com header.b="1Jy8eBKS"; dkim-atps=neutral Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-13c569e5ff5so290853fac.6 for ; Wed, 26 Oct 2022 22:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothemail-net.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=WQuu50Cl3HTjXaKlv5BvG+/QADwbm4W5jqYyVcrkCmw=; b=1Jy8eBKSO2a50QA7d/3vFVRyZNnYLI/F5VxUXhiKYQzQalRr/Epkq8RRiz4TlPG5Q6 DWXUYZRZYzSWlzzsDulLUKTEl8U1WGRbgOTLOEiPEY0a0ZFD3b6snmoeHTHRNbGStn5E pE1Cb5u/XXPLfXCOn1D1lPUibT6nbxSKqo8dF2ewPoy5INCeg8YsqbFkU/aC8xiyDrfA +IWr6DYk72GaHdYAzjmUxKOhOLROTaznBse7n0hAXLmrITly4ImMKDqzXGDMWb34tH3D kTOc4s5375edeEZGvibiYWpsdoIF9XSW+dG4Np2BJ0FaObRAnEwPq0tob9tA8p9++EQb SmXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WQuu50Cl3HTjXaKlv5BvG+/QADwbm4W5jqYyVcrkCmw=; b=lcHVVmBhlyxqw5hZZ4g38TQ40MmqkI5FqTsNUmHuD8jLOs63zv/sSGLqriGd/sziUU IWiBNGRCKCeSvnuNFklCTy3q6X3P1PL2igKIO/SSdoOKCLuBrI+7Vf7oppXBtbVo0Eca 0CAbeCEP7RipGPsvbMLfdv/zXXmaq5XsHaRSytkeMRlPUE7lAzjxF14YZDEOzqSgarW1 xGm4Z+2Ru9JEZdRZica3HQIygCxMxptIQ++Bq/7YT3VQ1yCEylU9iOQgCbgqIU5fn3Il qz5KDyqUU0c7mo8Ug7fiYY36pjJbqjPB7zFbdPBWbarwzmO2PTF78JXUh9kPgcshMKUI X9NQ== X-Gm-Message-State: ACrzQf1ZFYbWaqNu5EQ8Ti0PfDH/jgHeE5IxwdbCiuVbGEY3h4Je412y 4JHUnM6I1BJxeStYxvLEb+t8SvjSQgPDM4uF X-Google-Smtp-Source: AMsMyM5GooIn5fx7RLSidC6Ho8kv4Y0gI/YPs9YfafUdv4zn0JBunEPXbOipJCIGVG67T7CADxhBcw== X-Received: by 2002:a05:6870:1799:b0:13b:86bc:7b52 with SMTP id r25-20020a056870179900b0013b86bc7b52mr4613411oae.189.1666850124268; Wed, 26 Oct 2022 22:55:24 -0700 (PDT) Received: from nroth-pc.attlocal.net ([2600:1700:20:20c0:6406:fc7a:e46d:1666]) by smtp.gmail.com with ESMTPSA id 9-20020a9d0c09000000b00661a05691fasm140021otr.79.2022.10.26.22.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 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: <20221027055515.321791-1-nicholas@rothemail.net> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 04/10] ipa: libcamera: add metadata for the ov8858 sensor X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Nicholas Roth via libcamera-devel From: Nicolas Dufresne via libcamera-devel Reply-To: libcamera-devel@lists.libcamera.org Cc: nicholas@rothemail.net Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Nicholas Roth Currently, libcamera does not have information for the ov8858 sensor used in the PinePhone Pro, a phone designed to run Linux. This commit adds metadata, especially that sensor gain is reported and set in 1/16 discrete increments. For more information, see "5.8 manual exposure compensation/ manual gain compensation" in [0]. [0] http://www.ahdsensor.com/uploadfile/202008/55322e75316871.pdf Signed-off-by: Nicholas Roth --- src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++ src/libcamera/camera_sensor_properties.cpp | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 35056bec..f2040cbd 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -476,6 +476,17 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("ov5693", CameraSensorHelperOv5693) +class CameraSensorHelperOv8858 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv8858() + { + gainType_ = AnalogueGainLinear; + gainConstants_.linear = { 1, 0, 0, 16 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("m00_f_ov8858", CameraSensorHelperOv8858) + class CameraSensorHelperOv8865 : public CameraSensorHelper { public: diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp index e5f27f06..d0757c15 100644 --- a/src/libcamera/camera_sensor_properties.cpp +++ b/src/libcamera/camera_sensor_properties.cpp @@ -146,6 +146,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen */ }, } }, + { "m00_f_ov8858", { + .unitCellSize = { 1200, 1200 }, + .testPatternModes = { + { controls::draft::TestPatternModeOff, 0 }, + { controls::draft::TestPatternModeColorBars, 1 }, + /* + * No best corresponding test pattern for: + * 1: "Vertical Color Bar Type 1", + * 2: "Vertical Color Bar Type 2", + * 3: "Vertical Color Bar Type 3", + * 4: "Vertical Color Bar Type 4" + */ + }, + } }, { "ov8865", { .unitCellSize = { 1400, 1400 }, .testPatternModes = {