{"id":20152,"url":"https://patchwork.libcamera.org/api/1.1/covers/20152/?format=json","web_url":"https://patchwork.libcamera.org/cover/20152/","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":"<20240530210957.2211897-1-mzamazal@redhat.com>","date":"2024-05-30T21:09:52","name":"[v5,0/5] Software ISP levels cleanup","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/1.1/people/177/?format=json","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"mbox":"https://patchwork.libcamera.org/cover/20152/mbox/","series":[{"id":4342,"url":"https://patchwork.libcamera.org/api/1.1/series/4342/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4342","date":"2024-05-30T21:09:52","name":"Software ISP levels cleanup","version":5,"mbox":"https://patchwork.libcamera.org/series/4342/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/20152/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 A0272BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 May 2024 21:10:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A3022634B6;\n\tThu, 30 May 2024 23:10:15 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 10B2161A43\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 May 2024 23:10:13 +0200 (CEST)","from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n\t[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-227-dy86kcGCPx6TB9dIWUzpTA-1; Thu, 30 May 2024 17:10:09 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id C400E81227E;\n\tThu, 30 May 2024 21:10:08 +0000 (UTC)","from nuthatch.redhat.com (unknown [10.45.224.24])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 7924640C6EB7;\n\tThu, 30 May 2024 21:10:07 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"Cw342hwU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1717103412;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding;\n\tbh=X1DqXNQ+SXxch16Wp8HH6LqqtdST21f5NhY6jY+w+RI=;\n\tb=Cw342hwU7hlpGOix8Zfo/eaAFuIYEhVNzq1iktOPo7vO3MB+hdeGK8oBt2mplN+TeqU32B\n\tzg2auq6HYXLmMVTEsVuBs7DQUc2GuO++N17rqoU1AIgFWdsmTSzrZjzwdTTE4Twaucb9Th\n\t33demC6XQLHV6jV9cRKq/Bdf4CKhsjw=","X-MC-Unique":"dy86kcGCPx6TB9dIWUzpTA-1","From":"Milan Zamazal <mzamazal@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tAndrei Konovalov <andrey.konovalov.ynk@gmail.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"[PATCH v5 0/5] Software ISP levels cleanup","Date":"Thu, 30 May 2024 23:09:52 +0200","Message-ID":"<20240530210957.2211897-1-mzamazal@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.11.54.2","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain; charset=\"US-ASCII\"; x-default=true","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":"This is a cleanup of black level and color gain handling in software\nISP.  It fixes omission of black level subtraction in white balance\ncomputation and moves color lookup tables computations out of\ndebayering.  The latter also serves as a preparation for bringing\nsoftware ISP algorithms closer to common libcamera algorithm handling,\nin future patches.\n\nChanges in v5:\n- Improvements to comments in IPASoftSimple::processStats.\n- Avoiding the use of a lambda function there (code simplification).\n- Dropped DebayerParams::kGamma.\n- Including cmath rather than math.h.\n- Dropped the conversion of color lookup tables in favor of only\n  dropping TODO #4.\n- Fixed type of the array in SoftwareIsp::debayerParams_ initialization (it\n  mistakenly corresponded to the type changed in the dropped patch).\n\nChanges in v4:\n- Removed no longer used private members of DebayerCpu.\n- Added initialization of SoftwareIsp::debayerParams_ (should fix the\n  initial color artifacts observed by Kieran).\n\nChanges in v3:\n- Casting an uint8_t value to unsigned int when logging it. \n\nChanges in v2:\n- stdint.h include moved from black_level.cpp to black_level.h.\n- Removed meaningless multiplication in black level subtraction.\n- Removed local variable scoping block.\n- Added a comment about subtracting black level for auto white balance.\n- A code snippet related to black level subtraction moved to the right\n  patch.\n- Dropped the patch moving TODO #13 to a source code comment.\n- Added a patch to use float rather than uint8_t gains in color lookup\n  tables passed to debayering.\n\nMilan Zamazal (5):\n  libcamera: software_isp: Use a specific integer type for black level\n  libcamera: software_isp: Honor black level in AWB\n  libcamera: software_isp: Move color mappings out of debayering\n  libcamera: software_isp: Remove DebayerParams::kGain10\n  libcamera: software_isp: Remove TODO about internal representation\n\n .../internal/software_isp/debayer_params.h    | 19 +++--\n src/ipa/simple/black_level.cpp                |  2 +-\n src/ipa/simple/black_level.h                  |  5 +-\n src/ipa/simple/soft_simple.cpp                | 75 ++++++++++++++-----\n src/libcamera/software_isp/TODO               | 13 ----\n src/libcamera/software_isp/debayer.cpp        | 28 +++----\n src/libcamera/software_isp/debayer_cpu.cpp    | 43 ++---------\n src/libcamera/software_isp/debayer_cpu.h      | 11 +--\n src/libcamera/software_isp/software_isp.cpp   | 16 +++-\n 9 files changed, 105 insertions(+), 107 deletions(-)"}