Patch Detail
Show a patch.
GET /api/patches/14394/?format=api
{ "id": 14394, "url": "https://patchwork.libcamera.org/api/patches/14394/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14394/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20211028100349.1098545-5-hanlinchen@chromium.org>", "date": "2021-10-28T10:03:48", "name": "[libcamera-devel,5/6] ipu3: Run AIQ for the first frame to avoid blanking", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8899fe8f2c0aa956ba1a6c6a961b699d9e991316", "submitter": { "id": 98, "url": "https://patchwork.libcamera.org/api/people/98/?format=api", "name": "Hanlin Chen", "email": "hanlinchen@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14394/mbox/", "series": [ { "id": 2673, "url": "https://patchwork.libcamera.org/api/series/2673/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2673", "date": "2021-10-28T10:03:44", "name": "[libcamera-devel,1/6] ipu3: Use ia_aiq_frame_use_preview as default mode for AIQ", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2673/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14394/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14394/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 27D18BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 28 Oct 2021 10:04:03 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CEC4F600B7;\n\tThu, 28 Oct 2021 12:04:02 +0200 (CEST)", "from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com\n\t[IPv6:2607:f8b0:4864:20::102e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A223060103\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Oct 2021 12:04:01 +0200 (CEST)", "by mail-pj1-x102e.google.com with SMTP id\n\tls14-20020a17090b350e00b001a00e2251c8so4262436pjb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Oct 2021 03:04:01 -0700 (PDT)", "from localhost ([2401:fa00:1:10:1bc:52e7:6df5:c7cf])\n\tby smtp.gmail.com with UTF8SMTPSA id\n\tg25sm2815924pfh.216.2021.10.28.03.03.59\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 28 Oct 2021 03:03:59 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"RCEyaZcJ\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=P3cm+inl+EbpNn0pZqEsFguD4IKuCQYqm6q/3QvYvJM=;\n\tb=RCEyaZcJuxc2HJeD2iYL/xcrX4AoMuxxTSmseoskvhRhGhKDs5l/kOY8pvLBb9IZ7t\n\tlNwDm8Q9Njf3QfMl9sejBkLKMXJ/jU7r5uMbH15SN8ZBOqXgPKiLY9zJyywnXiXnT6VT\n\tZ541rfGCgbQeFhTRdi0J8xwKooK7xQF+QPOnc=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=P3cm+inl+EbpNn0pZqEsFguD4IKuCQYqm6q/3QvYvJM=;\n\tb=NALDRLyLaiDv0ltghMeBUQJWQ7G2MEfl8+B/75w6dybKchNIDULU0xvsHtA7ECdkf7\n\tEprzn91EWo7CmDhCTYKbflB3helQ1uYz+mutMAjg/yYKo0tLwEKLYFQjolLVTDqRSYRW\n\tSB6qEk3i0KptUTe4PmZeVnG+2ipXdkDVQ+Sso5Pl+Pf5C6d5xqAduCWLx2vU33EmDpTr\n\tC37HQoapzq7yyVzUoqBSDVPIQg8uCowumNjb06Ywp50BALgw+GUoAqq57hNlDgiQH5ug\n\tQIJhHOLnkHqbdcngZEmjEBT/T/6gHgVAF3Q7V6uMj1Rg8CQeKXAI7K4XtElhg5aI5E4G\n\tz5sg==", "X-Gm-Message-State": "AOAM533xNWmcjkUAWf+MPCmKc3WosePhz/HuEVNREWkFWBtCs7tyRV1q\n\tL+jVDACK0JEixcjuPl9Mk1iqoj0xYsutbFOr", "X-Google-Smtp-Source": "ABdhPJw4rttndHgwG19pXE7nXiP5kg1yxoA4jUuO07+sXNXzFOdVTLpVf3z6cPInDJOxlsv0MHBW8A==", "X-Received": "by 2002:a17:90a:6b0a:: with SMTP id\n\tv10mr11703821pjj.130.1635415440045; \n\tThu, 28 Oct 2021 03:04:00 -0700 (PDT)", "From": "Han-Lin Chen <hanlinchen@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 28 Oct 2021 18:03:48 +0800", "Message-Id": "<20211028100349.1098545-5-hanlinchen@chromium.org>", "X-Mailer": "git-send-email 2.33.1.1089.g2158813163f-goog", "In-Reply-To": "<20211028100349.1098545-1-hanlinchen@chromium.org>", "References": "<20211028100349.1098545-1-hanlinchen@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 5/6] ipu3: Run AIQ for the first frame to\n\tavoid blanking", "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>", "Cc": "Han-Lin Chen <hanlinchen@chromium.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The start() function set the first exposure time and analog gain to maximum.\nIn result, the first frame might be over bright and the user may see a\nbright blank when changing the camera in application. Run AIQ to get an\ninitial exposure time and analog gain in start() to smooth the AE\nprocess.\n\nSigned-off-by: Han-Lin Chen <hanlinchen@chromium.com>\n---\n ipu3.cpp | 45 ++++++++++++++++++++++++++-------------------\n 1 file changed, 26 insertions(+), 19 deletions(-)", "diff": "diff --git a/ipu3.cpp b/ipu3.cpp\nindex 45330ca..b124301 100644\n--- a/ipu3.cpp\n+++ b/ipu3.cpp\n@@ -56,6 +56,7 @@ private:\n \t\t\t const ControlInfoMap &sensorControls,\n \t\t\t ControlInfoMap *ipaControls);\n \tvoid processControls(unsigned int frame, const ControlList &metadata);\n+\tvoid runAiq(unsigned int frame);\n \tvoid fillParams(unsigned int frame, ipu3_uapi_params *params);\n \tvoid parseStatistics(unsigned int frame,\n \t\t\t int64_t frameTimestamp,\n@@ -221,6 +222,7 @@ int IPAIPU3::init(const IPASettings &settings,\n \n int IPAIPU3::start()\n {\n+\trunAiq(0);\n \tsetControls(0);\n \n \treturn 0;\n@@ -370,29 +372,11 @@ void IPAIPU3::processControls([[maybe_unused]] unsigned int frame,\n \t/* \\todo Start processing for 'frame' based on 'controls'. */\n }\n \n-void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n+void IPAIPU3::runAiq(unsigned int frame)\n {\n-\t/* Prepare parameters buffer. */\n-\tmemset(params, 0, sizeof(*params));\n-\n-\t/*\n-\t* Call into the AIQ object, and set up the library with any requested\n-\t* controls or settings from the incoming request.\n-\t*\n-\t* (statistics are fed into the library as a separate event\n-\t* when available)\n-\t*\n-\t* - Run algorithms\n-\t*\n-\t* - Fill params buffer with the results of the algorithms.\n-\t*/\n-\n \t/* Run algorithms into/using this context structure */\n \taiq_.run2a(frame, aiqInputParams_, results_, lensPosition_, lensMovementStartTime_);\n \n-\taic_.updateRuntimeParams(results_);\n-\taic_.run(params);\n-\n \texposure_ = results_.ae()->exposures[0].sensor_exposure->coarse_integration_time;\n \tgain_ = results_.ae()->exposures[0].sensor_exposure->analog_gain_code_global;\n \n@@ -410,6 +394,29 @@ void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n \tlensPosition_ = results_.af()->next_lens_position;\n \n \tresultsHistory_.Push(results_);\n+}\n+\n+void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n+{\n+\t/* Prepare parameters buffer. */\n+\tmemset(params, 0, sizeof(*params));\n+\n+\t/*\n+\t* Call into the AIQ object, and set up the library with any requested\n+\t* controls or settings from the incoming request.\n+\t*\n+\t* (statistics are fed into the library as a separate event\n+\t* when available)\n+\t*\n+\t* - Run algorithms\n+\t*\n+\t* - Fill params buffer with the results of the algorithms.\n+\t*/\n+\n+\trunAiq(frame);\n+\n+\taic_.updateRuntimeParams(results_);\n+\taic_.run(params);\n \n \tsetControls(frame);\n \n", "prefixes": [ "libcamera-devel", "5/6" ] }