Patch Detail
Show a patch.
GET /api/1.1/patches/14098/?format=api
{ "id": 14098, "url": "https://patchwork.libcamera.org/api/1.1/patches/14098/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14098/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20211011151154.72856-17-jacopo@jmondi.org>", "date": "2021-10-11T15:11:54", "name": "[libcamera-devel,v3,16/16] android: capabilities: Cap frame rate to 30 FPS", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "fab29bcb555bce660c2dcbec5fa0381e11a6bf31", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14098/mbox/", "series": [ { "id": 2613, "url": "https://patchwork.libcamera.org/api/1.1/series/2613/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2613", "date": "2021-10-11T15:11:38", "name": "IPU3 control info update and HAL frame durations", "version": 3, "mbox": "https://patchwork.libcamera.org/series/2613/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14098/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14098/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 8FE0CC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Oct 2021 15:11:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5BCCA68F4D;\n\tMon, 11 Oct 2021 17:11:31 +0200 (CEST)", "from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0F44168F66\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Oct 2021 17:11:27 +0200 (CEST)", "(Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 7297DE000B;\n\tMon, 11 Oct 2021 15:11:26 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 11 Oct 2021 17:11:54 +0200", "Message-Id": "<20211011151154.72856-17-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.33.0", "In-Reply-To": "<20211011151154.72856-1-jacopo@jmondi.org>", "References": "<20211011151154.72856-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 16/16] android: capabilities: Cap frame\n\trate to 30 FPS", "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": "Limit the reported minumum frame duration to 30 FPS.\n\nThe reason to do is to bring the libcamra HAL in par with the Intel\nHAL implementation on IPU3 platform, where 30FPS is the frame rate used\nto perform quality tuning in the closed-source IPA module and has been\nvalidated as the most efficient rate for the power/performace budget.\n\nThis change bring into the HAL a platform specific constraints, which\nmight be opportune for most platforms but should rather be configurable\nby system integrators. Record that with a \\todo entry.\n\nAlso record that, even if we report a lower frame rate, we currently\ndo not limit what the camera actually produce.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_capabilities.cpp | 24 ++++++++++++++++++++++++\n 1 file changed, 24 insertions(+)", "diff": "diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\nindex fbce816c5f61..0d72a1ff07fa 100644\n--- a/src/android/camera_capabilities.cpp\n+++ b/src/android/camera_capabilities.cpp\n@@ -635,6 +635,30 @@ int CameraCapabilities::initializeStreamConfigurations()\n \n \t\t\tint64_t minFrameDuration = frameDurations->second.min().get<int64_t>() * 1000;\n \t\t\tint64_t maxFrameDuration = frameDurations->second.max().get<int64_t>() * 1000;\n+\n+\t\t\t/*\n+\t\t\t * Cap min frame duration to 30 FPS.\n+\t\t\t *\n+\t\t\t * 30 frames per second has been validated as the most\n+\t\t\t * opportune frame rate for quality tuning, and power\n+\t\t\t * vs performances budget on Intel IPU3-based\n+\t\t\t * Chromebooks.\n+\t\t\t *\n+\t\t\t * \\todo This is a platform-specific decision that needs\n+\t\t\t * to be abstracted and delegated to the configuration\n+\t\t\t * file.\n+\t\t\t *\n+\t\t\t * \\todo libcamera only allows to control frame duration\n+\t\t\t * through the per-request controls::FrameDuration\n+\t\t\t * control. If we cap the durations here, we should be\n+\t\t\t * capable of configuring the camera to operate at such\n+\t\t\t * duration without requiring to have the FrameDuration\n+\t\t\t * control to be specified for each Request. Defer this\n+\t\t\t * to the in-development configuration API rework.\n+\t\t\t */\n+\t\t\tif (minFrameDuration < 1e9 / 30.0)\n+\t\t\t\tminFrameDuration = 1e9 / 30.0;\n+\n \t\t\tstreamConfigurations_.push_back({\n \t\t\t\tres, androidFormat, minFrameDuration, maxFrameDuration,\n \t\t\t});\n", "prefixes": [ "libcamera-devel", "v3", "16/16" ] }