{"id":17861,"url":"https://patchwork.libcamera.org/api/covers/17861/?format=json","web_url":"https://patchwork.libcamera.org/cover/17861/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20221124103832.6172-1-naush@raspberrypi.com>","date":"2022-11-24T10:38:27","name":"[libcamera-devel,v2,0/5] Raspberry Pi: Generalise statistics","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"mbox":"https://patchwork.libcamera.org/cover/17861/mbox/","series":[{"id":3635,"url":"https://patchwork.libcamera.org/api/series/3635/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3635","date":"2022-11-24T10:38:27","name":"Raspberry Pi: Generalise statistics","version":2,"mbox":"https://patchwork.libcamera.org/series/3635/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/17861/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 6635CBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Nov 2022 10:38:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9DC896331E;\n\tThu, 24 Nov 2022 11:38:42 +0100 (CET)","from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com\n\t[IPv6:2a00:1450:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0E81D6330A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Nov 2022 11:38:40 +0100 (CET)","by mail-wr1-x42c.google.com with SMTP id v1so1818514wrt.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Nov 2022 02:38:40 -0800 (PST)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ts16-20020adff810000000b002368a6deaf8sm995103wrp.57.2022.11.24.02.38.38\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 24 Nov 2022 02:38:38 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1669286322;\n\tbh=wSfpZ2VCSv4ZA+Hwc6NuLAoaCq/V52QKMihwq7QkBaU=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=3RVajHaG9pBzStyFBbWBko6vp3Hn2yes7fccnbC/Cj+gX3M0oNmZ+nhNsXv3Iai7l\n\t4kzWpLtUbh+TN+aX+POTld0y2ncaw5gPZc7gWUqYJDjPPnLLSPPOCnCLxig8cVZ3+O\n\tCS81ziNx1gvzXnIOMgDBSYsK/ZgVn4gLI/lGP5RQwwoEZ4Y83VxTmC8ygCJYHWZA+L\n\tUeniH6ha5L7DglVnVBgX/ruTTeAwzxIFN6aNlTiNi1YXb47GjDwm7jddxJPbkiYqIS\n\t+P6+VrPJu3xjwnV866ooK5vRDn+qCFhI0jSoz6rdakntjSUMF85TKjcJXBxHpVHkmX\n\tPNjhHoPsEV3hQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=Wz0hlK1jdeOG7mJiWEHwQj+sDAJP3LhczFaDGYfPx9g=;\n\tb=AKYaibZnWXSngLcUbKi8b+OWUHMHFqTAN1HKHZfrpC4Z6CfGjKQX6xrc01ItiPe3l9\n\tPtem3t8VUaW+EFlvkVXXnm35fl8O0/NMr9AGrJUz0GgInWNQB2KMbcW/tkBf+DZ915bj\n\tE7w9b3qjFkrOUCsLwCfzAz8eRNv/YhOX/icLlXX5WERu1ZFfUI0XsrdkPyhkZrbNoswP\n\tY3vI9/7175RjC89WRlF2tOm1FsYd9sPt8ncA4gYnjTkAt/xBcuY9qzj8uRT6eew128pf\n\t01IZATMP69VHgGdiX9mKtFm0tEjiu2nYm+ieGWyyyOnJc4Mft1z8HdERHlvprDHxjYZn\n\tJUOg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"AKYaibZn\"; dkim-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:message-id\n\t:reply-to;\n\tbh=Wz0hlK1jdeOG7mJiWEHwQj+sDAJP3LhczFaDGYfPx9g=;\n\tb=F4ESii0c6OFlr/kLeym6/kuSS79HwtVEXs3k7o2xrQ7kyMc1w8nSQvVWHDwy2v7mAE\n\tca6KA5luIN31yhAHesTSoySJyi2SSCQejCXONGld/W3PnTI+JXgN2yiXkaHNu9/iHKiY\n\twwCiAfBOMJauc4/58v0l6qN4kpS47imlGnI1Tm7UQqV12eIBVYkKo1STIzG5DWHwJuI5\n\tAbdiWsDj82MPuXnHFoW5yFQ2oW21hUhEOZT8g6bBrBcsdMoupFSzh+C3PD5XyXJ9q05t\n\tRSo18gBE8hCiBWsw2I/FrXHOvPaFYdxiIPebqYrGSRG/0OYRfz7LMVVpRG7UPfaVJ2Lf\n\tSO9Q==","X-Gm-Message-State":"ANoB5plEKPqSmuh+YoGGcewD7tsyjOINRwITWYon1tjvUV9L829MGr9S\n\tgDPUuY6Ur6sZWlDuZ7gaAngM4sWx4uk50g==","X-Google-Smtp-Source":"AA0mqf4hondAJSa0JPA81Ot358GNoPd08q8mcqAtRZ1inEbB0YhNdq64tacpYy0vXpoIsJM+QSMMtQ==","X-Received":"by 2002:a5d:6912:0:b0:241:ecf8:d34d with SMTP id\n\tt18-20020a5d6912000000b00241ecf8d34dmr4428763wru.73.1669286319357; \n\tThu, 24 Nov 2022 02:38:39 -0800 (PST)","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 24 Nov 2022 10:38:27 +0000","Message-Id":"<20221124103832.6172-1-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 0/5] Raspberry Pi: Generalise statistics","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi,\n\nQuick turn-around for v2 as we had some internal discussions on some API changes\nto the RegionStats structure in patch 1/5:\n\n1) This now uses utils::Size and utils::Point throughout.\n2) The caller now provides a Region struct in set(), and gets the Region struct through\nget().  This avoids the need for having more parameters in the prototype for\ncounted/uncounted values. In future, we will add position to the Region structure\nas well.\n\nAll other patches remain functionally the same, only using the new RegionStats\nAPI.\n\nThanks,\nNaush\n\nNaushir Patuck (5):\n  ipa: raspberrypi: Generalise statistics\n  ipa: raspberrypi: histogram: Add a constructor for an empty histogram\n  ipa: raspberrypi: awb: Delay release of the statistics buffer\n  ipa: raspberrypi: Use the generic statistics structure in the\n    algorithms\n  ipa: raspberrypi: Normalise region sums to 16-bits\n\n src/ipa/raspberrypi/controller/controller.h   |   4 +-\n src/ipa/raspberrypi/controller/histogram.h    |   5 +\n src/ipa/raspberrypi/controller/region_stats.h | 123 ++++++++++++++++++\n src/ipa/raspberrypi/controller/rpi/agc.cpp    |  31 ++---\n src/ipa/raspberrypi/controller/rpi/agc.h      |   2 +-\n src/ipa/raspberrypi/controller/rpi/alsc.cpp   |  32 ++---\n src/ipa/raspberrypi/controller/rpi/alsc.h     |   3 +-\n src/ipa/raspberrypi/controller/rpi/awb.cpp    |  30 ++---\n src/ipa/raspberrypi/controller/rpi/awb.h      |   1 +\n .../raspberrypi/controller/rpi/contrast.cpp   |   8 +-\n src/ipa/raspberrypi/controller/rpi/focus.cpp  |   7 +-\n src/ipa/raspberrypi/controller/rpi/lux.cpp    |  14 +-\n src/ipa/raspberrypi/raspberrypi.cpp           |  48 ++++++-\n src/ipa/raspberrypi/statistics.h              |  72 ++++++++++\n 14 files changed, 304 insertions(+), 76 deletions(-)\n create mode 100644 src/ipa/raspberrypi/controller/region_stats.h\n create mode 100644 src/ipa/raspberrypi/statistics.h"}