From patchwork Tue Sep 6 16:12:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Sylvestre X-Patchwork-Id: 17305 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 6E61BC3272 for ; Tue, 6 Sep 2022 16:12:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8511E62083; Tue, 6 Sep 2022 18:12:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1662480743; bh=RHH7Skm/D31bdxXYxCBfsfkj+/NPqPDUr3RrOVir+ws=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rOMJcWZdMc5ir16Pgp98rEzg7Vflpwetg1aSoQtGkxzSq622dF1HXLxgTod7FdMRH 3eILnabIJjxjKuOwEJrJsSpmAjoQSZUI7bocxpuI7MfhmGOaU8/qj2D/Esf8jyBzqW 0dKI4zQxV4UBBr30wYKoaJItQqEkneeEVEXjEbd87FfyNh7HdRjOTElTX1dk31v9iK 9/T9IsmrNzbFVhZQ3yGHvjmcY9t8IRdqUEgZQyowi3twcHtxUrHQokx3WltmnUNwxV Q++ILLngEC0yhgiCWbmlfkbNHiPOXuKYBe1u5K3IMYBHgcWhJ+0Dc3SsR94Cp5SL7y hphA0tel02iWw== Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3CC1D6041F for ; Tue, 6 Sep 2022 18:12:22 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="A+d/hvmC"; dkim-atps=neutral Received: by mail-wr1-x42f.google.com with SMTP id k9so16243454wri.0 for ; Tue, 06 Sep 2022 09:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=/KMitLmqjHDYXyQG6/rebYhUSj8KFlmyrt4jO7sNrcU=; b=A+d/hvmCzW7mI8E/tghK5J0QtbRe3cnV/OPUzpviQdaumGComXcSta+j4KDjCYJz7h WWn67cajdoMSAot76ZB8LOjInM/b6FpjJy0NqdNVYj1VXB27jRP65wGPjBVg6rn5TZjr Spf1iZ/A46hgc/v5b7HfAuySE+2KLPeNtXXKbOLdUum/+e2+0kTzKnCb9BE1V9hwwo8a zeverv9cp4yPhucYTPYvx8PwkqWUT53ysdnIiSL15RXMaxd+gyo9xaSzvJHHl7oP7wj7 B6p+AHqj+PgmrYAboY66nTBoM4xKIL0xcbE8R+Gr1hX4bl7gqpzgX70PUPlAbezIrQt1 8W5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=/KMitLmqjHDYXyQG6/rebYhUSj8KFlmyrt4jO7sNrcU=; b=GtTGaUrQ26oCTeaF8lHdH0fKQaarvZYSB0x9VCcKegqUaJKjSXGyEwRnRRtB2M1Ey1 cgvAvAEc+/f9Bqg8oseV7fDXIjjQ4nCT2pTZNIW+XGkHABfr6Xz+DaHCGMVb8cbnEvWq WdlUOHML9U51oGbXa7hRDXTwMyh55FFtW/O5L6UNAuW1ZVMJEQDqr1x9xaVwFSQ6LLVM LzMUAMaQs9q+YgILAVlbD59oTI8h/kpxV2AEGjVcgspwgcvp3DdOZsOfvdhwS1XpDhqq IIAmt1RflpHOJCXISVl1Q4/R4f6HJv4zdIgfK4V0OG21iGJAehz9bf8tnutrpa0FUV96 Lk2A== X-Gm-Message-State: ACgBeo2C65MUyG9mcdsTFiKHTTEf10F5/hO9KYauOPd5UbTOMQ6E/OJj UyT0NNBT5NAU27+IBqIrjxyw5aI/9wcmew== X-Google-Smtp-Source: AA6agR7nd9fEzXbd5qVMo9LK3HoO1x6yOyoQMCDEO3cnoHINfgMAX2HMFWroB3wETMoR/fOKtcT56g== X-Received: by 2002:a05:6000:1189:b0:228:62c7:7e6c with SMTP id g9-20020a056000118900b0022862c77e6cmr8899780wrx.716.1662480741547; Tue, 06 Sep 2022 09:12:21 -0700 (PDT) Received: from BL087.. ([2a01:e34:eea9:e630:3a88:2632:fc4a:f97c]) by smtp.gmail.com with ESMTPSA id c7-20020adfe747000000b00226dfac0149sm8338555wrn.114.2022.09.06.09.12.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 09:12:21 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 6 Sep 2022 18:12:16 +0200 Message-Id: <20220906161217.1806662-1-fsylvestre@baylibre.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/1] Take into account color temperature during LSC algorithm for rkisp1 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: Florian Sylvestre via libcamera-devel From: Florian Sylvestre Reply-To: Florian Sylvestre Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" First brick to have an adaptive LSC algorithm on Rkisp1: add LSC coefficients sets in YAML tuning file depending of color temperature. For this version the computation of coefficients regarding the current computed color temperature is done inside prepare() method. For reference: the computation time has been measured at an average 135us on an Imx8Mp board. The different coefficients are computed by doing a linear interpolation with the two coefficients sets that have the closer color temperature values. In case the current color temperature is 'out of bound' the closest set is used. The LSC can work with a single set in case of monochrome sensor for example. Note: the 'grad' and 'size' tables are now computed in configure() to gain some time by doing only a memcpy() of them during prepare(). Florian Sylvestre (1): ipa: rkisp1: Take into account color temperature during LSC algorithm src/ipa/rkisp1/algorithms/lsc.cpp | 170 ++++++++++++++++------ src/ipa/rkisp1/algorithms/lsc.h | 21 ++- src/ipa/rkisp1/data/ov5640.yaml | 231 ++++++++++++++++++++---------- 3 files changed, 300 insertions(+), 122 deletions(-)