{"id":15372,"url":"https://patchwork.libcamera.org/api/1.1/covers/15372/?format=json","web_url":"https://patchwork.libcamera.org/cover/15372/","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":"<20220223104824.25723-1-jeanmichel.hautbois@ideasonboard.com>","date":"2022-02-23T10:48:20","name":"[libcamera-devel,v2,0/4] IPA RkISP1 awb and misc improvements","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/1.1/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/15372/mbox/","series":[{"id":2936,"url":"https://patchwork.libcamera.org/api/1.1/series/2936/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2936","date":"2022-02-23T10:48:21","name":"IPA RkISP1 awb and misc improvements","version":2,"mbox":"https://patchwork.libcamera.org/series/2936/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/15372/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 5B170BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Feb 2022 10:48:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CBD826115A;\n\tWed, 23 Feb 2022 11:48:30 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 74541601FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Feb 2022 11:48:28 +0100 (CET)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:7ebc:9e38:c4df:c57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F300FDD;\n\tWed, 23 Feb 2022 11:48:27 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DDPJsTfq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1645613308;\n\tbh=JgcKQOljnU/VsNvv07Qw+zXWU2woFR6QrnMuCigZTmU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=DDPJsTfqExpCveZpGztOHV+W0tVGT851ZQfcj6LEBGWFOTgFNVkvaHosGxRCOeFKY\n\tyIONgHPOpxIsXneAzXKrigvOgg+7D8R47X90B7nA/CIB+BvGahActXYwffkiYik3jU\n\tt+do6jjYnuGxwKSa38ataAK67u4sD3u+zx8eiHs0=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 23 Feb 2022 11:48:20 +0100","Message-Id":"<20220223104824.25723-1-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 0/4] IPA RkISP1 awb and misc\n\timprovements","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hello,\n\nThis series introduces several algorithms or tuning parameters for the\nRkISP1 IPA.\n\nThe first algorithm is the black level correction. The output is washed\nout if no black correction is applied. It uses the tuning values from\nthe imx219 data file in RPi.\n\nPatch 3/4 introduces the histogram IQ mean estimation as for the IPU3\nand uses the maximum of the relative luminance gain and the iqMean gain\nto determine the shutter speed and analogue gain to apply.\n\nNow, patch 4/4 can estimate the AWB gains to apply on the red and blue\nchannels. The RkISP1 could theoretically give us the red, green and blue\nmean values for the current frame, but the kernel seems to lack support\nfor this. Use the YCrCb estimation instead, and convert the values to\nRGB before estimating the gains. We don't have a grid of average values,\nonly a global mean for each channel.\n\nI have removed two algorithms from this series: sensor degamma and\ncrosstalk matrix. Those need a bit more work (sdg curve may be the wrong\none according to the previous review, and the crosstalk matrix is not a\ntuned one).\n\nI have made some captures (qcam seems to invert width and height when\nsaving the image though):\n\n[1]: agc only (current master): https://snipboard.io/dFO23J.jpg\n[2]: [1] with histogram and black level: https://snipboard.io/fd9zC2.jpg\n[3]: [2] with awb: https://snipboard.io/Sp9Ei6.jpg\n\nThis is the state with this v2 series applied on top of master.\n\nAnd for the record, I picked the previous sdg and ctk algorithms to\ncapture with those:\n[4]: [3] with sensor degamma: https://snipboard.io/5QO46g.jpg\n[5]: [4] with crosstalk matrix: https://snipboard.io/tDOV7l.jpg\n\nJean-Michel Hautbois (4):\n  ipa: rkisp1: Use frame index\n  ipa: rkisp1: Introduce Black Level Correction\n  ipa: rkisp1: agc: Introduce histogram calculation\n  ipa: rkisp1: Introduce AWB\n\n src/ipa/rkisp1/algorithms/agc.cpp     | 102 ++++++++++++++---\n src/ipa/rkisp1/algorithms/agc.h       |   4 +-\n src/ipa/rkisp1/algorithms/awb.cpp     | 155 ++++++++++++++++++++++++++\n src/ipa/rkisp1/algorithms/awb.h       |  33 ++++++\n src/ipa/rkisp1/algorithms/blc.cpp     |  57 ++++++++++\n src/ipa/rkisp1/algorithms/blc.h       |  30 +++++\n src/ipa/rkisp1/algorithms/meson.build |   2 +\n src/ipa/rkisp1/ipa_context.cpp        |  36 ++++++\n src/ipa/rkisp1/ipa_context.h          |  19 ++++\n src/ipa/rkisp1/rkisp1.cpp             |  15 ++-\n 10 files changed, 428 insertions(+), 25 deletions(-)\n create mode 100644 src/ipa/rkisp1/algorithms/awb.cpp\n create mode 100644 src/ipa/rkisp1/algorithms/awb.h\n create mode 100644 src/ipa/rkisp1/algorithms/blc.cpp\n create mode 100644 src/ipa/rkisp1/algorithms/blc.h"}