{"id":15519,"url":"https://patchwork.libcamera.org/api/1.1/patches/15519/?format=json","web_url":"https://patchwork.libcamera.org/patch/15519/","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":"<20220323135614.865252-2-kieran.bingham@ideasonboard.com>","date":"2022-03-23T13:56:10","name":"[libcamera-devel,v2,1/5] ipa: ipu3: af: Move constants to implementation","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"0183c0070886643abbd1dc1c62025a442338642b","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/15519/mbox/","series":[{"id":2989,"url":"https://patchwork.libcamera.org/api/1.1/series/2989/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2989","date":"2022-03-23T13:56:09","name":"ipa: ipu3: af: Small improvements","version":2,"mbox":"https://patchwork.libcamera.org/series/2989/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15519/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15519/checks/","tags":{},"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 95014C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Mar 2022 13:56:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D1A9B604E6;\n\tWed, 23 Mar 2022 14:56:22 +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 D1C9D604C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Mar 2022 14:56:20 +0100 (CET)","from Monstersaurus.ksquared.org.uk.beta.tailscale.net\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 63838FFD;\n\tWed, 23 Mar 2022 14:56:20 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648043782;\n\tbh=UP8RwrbAGIDvpzVfZBXzAkr+JuifgC6JtwxjI7CpIl8=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=Z8a+bZ0NfB5xVjoJOkTNloBmiNUoolQXvh1vOYZjnN5TkTUsOjOy9yZvWoLZNzNvU\n\tYUovBu/87UkwFKtdyEslqg4+yNm4EM9NoRbw8Gmhi5JN/2z2La/3jAZ3pHLKTigIO6\n\tlsxMscDixnxJx7OcNpfi1rk5YGieM95ozOYHHGT6AYSBnfkhZkXj7PUNfXBX4PgxA6\n\t+B5y+adfduwifLCtuZ6+TBinVqZaRXrGCz2E2WSU/6EOzzkfGZdFvCOaqOwaOTqMhl\n\tI2XGlsJgvgzZd4igcp79kpcEzGpWDg4bMViDdfGQ0Ax5aP8ASuTjEEoACBPp7T31T1\n\tZTcG+mV2mdlZg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648043780;\n\tbh=UP8RwrbAGIDvpzVfZBXzAkr+JuifgC6JtwxjI7CpIl8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Hiudojm5VY6aUqOVcM7aD3d73pLmG0sWouPkx4xfn+IzNDSMM4ZWPL8C6Wr2IyyRR\n\tPZaJWxCHR2bFvAp1KOdIfZpGOf7xDxogBOFhQ3KdqXiqE75e3tIgI4tSXMW6u+1YZW\n\t5yT+BCWu4VEBsbK5AYHe7VV5/r7ZJ+8IDsADjtUo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Hiudojm5\"; dkim-atps=neutral","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Wed, 23 Mar 2022 13:56:10 +0000","Message-Id":"<20220323135614.865252-2-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","In-Reply-To":"<20220323135614.865252-1-kieran.bingham@ideasonboard.com>","References":"<20220323135614.865252-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 1/5] ipa: ipu3: af: Move constants to\n\timplementation","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"A selection of constants are imported from ChromiumOS.\n\nMove these out of the header, and simplify their documentation.  Further\nmore, add a direct reference to the location they were obtained from.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n\nv2:\n - s/dimensions/dimension/ on single items.\n\n src/ipa/ipu3/algorithms/af.cpp | 73 ++++++++++------------------------\n src/ipa/ipu3/algorithms/af.h   | 11 -----\n 2 files changed, 22 insertions(+), 62 deletions(-)","diff":"diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp\nindex 0170a3728892..634d0f2e3176 100644\n--- a/src/ipa/ipu3/algorithms/af.cpp\n+++ b/src/ipa/ipu3/algorithms/af.cpp\n@@ -29,59 +29,30 @@\n  * \\file af.h\n  */\n \n-/**\n- * \\var kAfMinGridWidth\n- * \\brief the minimum width of AF grid.\n- * The minimum grid horizontal dimensions.\n- */\n-\n-/**\n- * \\var kAfMinGridHeight\n- * \\brief the minimum height of AF grid.\n- * The minimum grid vertical dimensions.\n- */\n-\n-/**\n- * \\var kAfMaxGridWidth\n- * \\brief the maximum width of AF grid.\n- * The maximum grid horizontal dimensions.\n- */\n-\n-/**\n- * \\var kAfMaxGridHeight\n- * \\brief The maximum height of AF grid.\n- * The maximum grid vertical dimensions.\n- */\n-\n-/**\n- * \\var kAfMinGridBlockWidth\n- * \\brief The minimum block size of the width.\n- * The minimum value of Log2 of the width of the grid cell.\n- */\n-\n-/**\n- * \\var kAfMinGridBlockHeight\n- * \\brief The minimum block size of the height.\n- * The minimum value of Log2 of the height of the grid cell.\n- */\n-\n-/**\n- * \\def kAfMaxGridBlockWidth\n- * \\brief The maximum block size of the width.\n- * The maximum value of Log2 of the width of the grid cell.\n- */\n-\n-/**\n- * \\var kAfMaxGridBlockHeight\n- * \\brief The maximum block size of the height.\n- * The maximum value of Log2 of the height of the grid cell.\n+/*\n+ * Static variables from ChromiumOS Intel Camera HAL and ia_imaging library:\n+ * - https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/master/hal/intel/psl/ipu3/statsConverter/ipu3-stats.h\n+ * - https://chromium.googlesource.com/chromiumos/platform/camera/+/refs/heads/main/hal/intel/ipu3/include/ia_imaging/af_public.h\n  */\n \n-/**\n- * \\var kAfDefaultHeightPerSlice\n- * \\brief The default number of blocks in vertical axis per slice.\n- * The number of blocks in vertical axis per slice.\n- */\n+/** The minimum horizontal grid dimension. */\n+static constexpr uint8_t kAfMinGridWidth = 16;\n+/** The minimum vertical grid dimension. */\n+static constexpr uint8_t kAfMinGridHeight = 16;\n+/** The maximum horizontal grid dimension. */\n+static constexpr uint8_t kAfMaxGridWidth = 32;\n+/** The maximum vertical grid dimension. */\n+static constexpr uint8_t kAfMaxGridHeight = 24;\n+/** The minimum value of Log2 of the width of the grid cell. */\n+static constexpr uint16_t kAfMinGridBlockWidth = 4;\n+/** The minimum value of Log2 of the height of the grid cell. */\n+static constexpr uint16_t kAfMinGridBlockHeight = 3;\n+/** The maximum value of Log2 of the width of the grid cell. */\n+static constexpr uint16_t kAfMaxGridBlockWidth = 6;\n+/** The maximum value of Log2 of the height of the grid cell. */\n+static constexpr uint16_t kAfMaxGridBlockHeight = 6;\n+/** The number of blocks in vertical axis per slice. */\n+static constexpr uint16_t kAfDefaultHeightPerSlice = 2;\n \n namespace libcamera {\n \ndiff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\nindex 13c7e0e877fd..906f2843dd49 100644\n--- a/src/ipa/ipu3/algorithms/af.h\n+++ b/src/ipa/ipu3/algorithms/af.h\n@@ -15,17 +15,6 @@\n \n #include \"algorithm.h\"\n \n-/* Static variables from repo of chromium */\n-static constexpr uint8_t kAfMinGridWidth = 16;\n-static constexpr uint8_t kAfMinGridHeight = 16;\n-static constexpr uint8_t kAfMaxGridWidth = 32;\n-static constexpr uint8_t kAfMaxGridHeight = 24;\n-static constexpr uint16_t kAfMinGridBlockWidth = 4;\n-static constexpr uint16_t kAfMinGridBlockHeight = 3;\n-static constexpr uint16_t kAfMaxGridBlockWidth = 6;\n-static constexpr uint16_t kAfMaxGridBlockHeight = 6;\n-static constexpr uint16_t kAfDefaultHeightPerSlice = 2;\n-\n namespace libcamera {\n \n namespace ipa::ipu3::algorithms {\n","prefixes":["libcamera-devel","v2","1/5"]}