{"id":17502,"url":"https://patchwork.libcamera.org/api/1.1/covers/17502/?format=json","web_url":"https://patchwork.libcamera.org/cover/17502/","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":"<20221003142357.602633-1-fsylvestre@baylibre.com>","date":"2022-10-03T14:23:55","name":"[libcamera-devel,v3,0/2] Take into account color temperature during LSC algorithm for rkisp1","submitter":{"id":123,"url":"https://patchwork.libcamera.org/api/1.1/people/123/?format=json","name":"Florian Sylvestre","email":"fsylvestre@baylibre.com"},"mbox":"https://patchwork.libcamera.org/cover/17502/mbox/","series":[{"id":3525,"url":"https://patchwork.libcamera.org/api/1.1/series/3525/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3525","date":"2022-10-03T14:23:55","name":"Take into account color temperature during LSC algorithm for rkisp1","version":3,"mbox":"https://patchwork.libcamera.org/series/3525/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/17502/comments/","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 9F320C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Oct 2022 14:24:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E221A601C1;\n\tMon,  3 Oct 2022 16:24:06 +0200 (CEST)","from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com\n\t[IPv6:2a00:1450:4864:20::42d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 996DA600E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Oct 2022 16:24:05 +0200 (CEST)","by mail-wr1-x42d.google.com with SMTP id bq9so16999398wrb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 03 Oct 2022 07:24:05 -0700 (PDT)","from BL087.. ([2a01:e34:eea9:e630:b89c:8d5f:fc22:ea71])\n\tby smtp.gmail.com with ESMTPSA id\n\tbt4-20020a056000080400b0022cd96b3ba6sm12814031wrb.90.2022.10.03.07.24.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 03 Oct 2022 07:24:04 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664807046;\n\tbh=QcOlkzmEjk7fY1Ess5PIarLSo6ZEqTSJegf9Hw1M5zY=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=AvFcg0QzE6OCWS9HxNXWBxoMv+/d5zRSXoDnoRTB8Dxo07T19vO0WNPTFa+eYr0m6\n\tWcMbawdGUxZeL6d9zQmuXc2YsjIeju0H0GJYpcoKRqO2bFMLHuVsQsjTl4zPiDhbyA\n\tLNB8DkBTcheWTLRxSRn4HMzmcnNC0SRBZhzfenHCoD/ukoQ0Uv6w4kHWl5I1z0a/h3\n\tJcLjpVZjXL1UeBkXMxjID9lS4ycIJ3v6rQPIo+pVhNVAm2nvByJ6T8WQYnyROgK8nz\n\tem46i+YzLRaL0NLm7HBJcmxFLKU+s7Cy4wmD+d2eItIW6yfjTH1NtcJy0jWbR3Cq5r\n\tXLRdUpBTrOovQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20210112.gappssmtp.com; s=20210112;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date;\n\tbh=IFKBrx5R6kPwYsDZk05O0kn5O7R/cXaOGkjB/RkVR28=;\n\tb=MoSniiiaFTXNNnhZz0RkU6+NIwyxX+9vpVKo8jT5NFELJ3v/2TUTTy13peCQX49g0U\n\t4BBH/Ru8TU2igyRWnSfoqwHGFXyNDw4b3nPTvdV50uploXlnC/AXGctEvRwT5AsxkZy+\n\tld+i0RzuqkZdrxhEz9eCju0DJjpiQFWIEJXDR9DSEqZODznB5syuEVr25EHrVJbin4XZ\n\tMu8rs0Ly8BGavHGjJxgr17/xkx2jh+66JJUNFwPHzHkZTdMmM5OmqLXZbygGaYdtO5xC\n\tvFoAy3dOOC4dcd8zY5CPhUnGlQeWBHolaOgF4HQhk+6tHmk1BDFNQTIIEkO+WHUdC9zE\n\tntKA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20210112.gappssmtp.com\n\theader.i=@baylibre-com.20210112.gappssmtp.com header.b=\"MoSniiia\"; \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:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date;\n\tbh=IFKBrx5R6kPwYsDZk05O0kn5O7R/cXaOGkjB/RkVR28=;\n\tb=WKm0oxpbyBWEzDOMRNlxgzNT0ir142qe0MuPntmgnvvUQqecFF7GVrdlXMRIdNbECi\n\tI86D+qfih5ah0BX1cMrfl8TkqXCpf7QsEMCVTHOSqoTnChCpkSDQ6AIPNxVPhBT0BvAs\n\t8sxxQc9CVWEoiJIErwCku4GVT4Sa5UoqkY3iijrdrfz8j3YLGQBLqhCc77+lnQFLEcXN\n\tNTLURJsT0fULuRx5GvJHo8cyTtXqWsd42vbRXRj7B/6qvS/zfa84N31FYNgFFMz0Hx/q\n\t5nHFsh6pCs+Rt4MxIe34frJGVLmuSC/nC0umMIsYzE0Aj2PgE4bNCIwBL18SSIGRdAaS\n\t/fvg==","X-Gm-Message-State":"ACrzQf2uo4xdd7gCrr3DWW1Mx2/jJtf+OBGnkWWGYqcfvcXp24bJ79Q3\n\tt7KUxlO+Pntfjuk5VWnFA4OFL63439qETQ==","X-Google-Smtp-Source":"AMsMyM7kLaiTTGt68d8YBNtZSG+Ja9w6Ypd/77gRqfnrPidNRDIuEALVBzQeye4NIfEa3SdTUx/S+g==","X-Received":"by 2002:a5d:6301:0:b0:226:d87b:b55c with SMTP id\n\ti1-20020a5d6301000000b00226d87bb55cmr12611014wru.560.1664807044895; \n\tMon, 03 Oct 2022 07:24:04 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Mon,  3 Oct 2022 16:23:55 +0200","Message-Id":"<20221003142357.602633-1-fsylvestre@baylibre.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 0/2] Take into account color\n\ttemperature during LSC algorithm for rkisp1","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":"Florian Sylvestre via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Florian Sylvestre <fsylvestre@baylibre.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"First brick to have an adaptive LSC algorithm on Rkisp1: add LSC coefficients\nsets in YAML tuning file depending of color temperature.\nFor this version the computation of coefficients regarding the current computed\ncolor temperature is done inside prepare() method.\nFor reference: the computation time has been measured at an average 135us on an\nImx8Mp board.\n\nThe different coefficients are computed by doing a linear interpolation with the\ntwo coefficients sets that have the closer color temperature values.\nIn case the current color temperature is 'out of bound' the closest set is used.\nThe LSC can work with a single set in case of monochrome sensor for example.\n\nThe 'grad' and 'size' tables are now computed in configure() to gain some\ntime by doing only a memcpy() of them during prepare().\n\nModifications in V3:\n- Rebased on top of \"ipa: rkisp1: Remove initialized_ flags from algorithms\"\n- Add specific check if there is a single LSC set: Remove out-of-bound access\nwhile looking for correct set.\n- Minor cleanup\n\nModifications in V2:\n- The single commit has been splited into two commits. The first one only\ncontains the move of LSC parameters computation in configure().\n- LSC parameters are no more re-computed when there is small color temperature\nvariations between two frames.\n- LSC parameters are not interpolated when the actual color temperature is\nclose to one defined in the tuning parameters sets.\n- Minor typo/cleanups\n\nFlorian Sylvestre (2):\n  ipa: rkisp1: Compute LSC algorithm parameter during configure\n  ipa: rkisp1: Take into account color temperature during LSC algorithm\n\n src/ipa/rkisp1/algorithms/lsc.cpp | 191 +++++++++++++++++++-----\n src/ipa/rkisp1/algorithms/lsc.h   |  25 +++-\n src/ipa/rkisp1/data/ov5640.yaml   | 231 ++++++++++++++++++++----------\n 3 files changed, 328 insertions(+), 119 deletions(-)"}