Patch Detail
Show a patch.
GET /api/patches/16309/?format=api
{ "id": 16309, "url": "https://patchwork.libcamera.org/api/patches/16309/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16309/", "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": "<20220622102047.22492-4-naush@raspberrypi.com>", "date": "2022-06-22T10:20:47", "name": "[libcamera-devel,v3,3/3] pipeline: raspberrypi: Advertise ScalerCrop from the pipeline handler", "commit_ref": "9dacde0d651df322058c3611b3515820bf06715e", "pull_url": null, "state": "accepted", "archived": false, "hash": "0b41fe6a6bb85180aa8f5ca5ce1511df7c708344", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16309/mbox/", "series": [ { "id": 3202, "url": "https://patchwork.libcamera.org/api/series/3202/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3202", "date": "2022-06-22T10:20:44", "name": "Correct ControlInfoMap from the IPA", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3202/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16309/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16309/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 6B80FBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 22 Jun 2022 10:21:05 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 140B56563D;\n\tWed, 22 Jun 2022 12:21:05 +0200 (CEST)", "from mail-wr1-x432.google.com (mail-wr1-x432.google.com\n\t[IPv6:2a00:1450:4864:20::432])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6F04C633A7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 Jun 2022 12:21:00 +0200 (CEST)", "by mail-wr1-x432.google.com with SMTP id o8so22726051wro.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 Jun 2022 03:21:00 -0700 (PDT)", "from naush-laptop.localdomain ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\th204-20020a1c21d5000000b0039c693a54ecsm26849423wmh.23.2022.06.22.03.20.58\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 22 Jun 2022 03:20:59 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655893265;\n\tbh=R8W2IaKmrDLUH23lPmlzOIdyDArFwOsNlCOPxwtI32w=;\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=BPdfyIIXswJwP82nkjJf+FjChvYMHgJzSHBtWUPwBs0aqVuK3GhTLYHEoA2J8VwH2\n\tzKoY77cneLsvv7zU4J51I1uxjVVEIaTD3IfzNDdWQ06wFjy+nzUb2VRJyjcnx7pPaW\n\tK/IZaFZOYXF1CBL/1MvaUHTjT1ct6jxvU3FjqnfYgxQtQp7QXq2byF/7cP4F9J9B3Q\n\t9MOJ5wccQQ7z7LHk9FSggIvXIE/8rSveGKt9r3oiVWwAloUjhDXHvJcg1KjTLZttRd\n\t8Th6jkm6Myxy1MpuZQZqyjQvwZR+gfH3kF/oUsiKbhybEKSajqyBMOm3xYNOOCx0eJ\n\t24aDRvUVz7nLw==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=of8OcpUH49FJA/uG9bdSOgvolWS8eZrOGomkTlrVHdg=;\n\tb=qaNuaXEtimiC4yR4JtuWreDE7BOXcUaNKIsuvTexJa41KqCuN7S2UBKVbAhjhISwRD\n\tDNs1A06fMWfCz8TDdGgltcKuixfWLepQo22RBZRFUzLJO0NFvLftAeBrI1eATvwYwgwS\n\tNZn5PFWGQ1HFkKiZF5VWN3kFc0m2GIF00PjiCWehaNletYCEC3MOeklRykXPszhUClDZ\n\tbbCjpe8UQuS7Xu+Dv6PeMXTe+z7Vh5Byw3qRUSfiFmm8Sx70NtoLGyxTovt58zcxrSe3\n\tXLsGOcCx4KY40oRDU7i62Ud/rLUk5cJ3ZA4DyCXrl0PFnEq83QzLq7UdbPtUaADrEnnQ\n\tVwbg==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"qaNuaXEt\"; dkim-atps=neutral", "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=of8OcpUH49FJA/uG9bdSOgvolWS8eZrOGomkTlrVHdg=;\n\tb=PR6WYjzkfCwfPJhkjOxzgJzneB4eK8I2rB5a2GZ/ocoXrL+CVvASapXenS+9W/Roox\n\tfZW8GucsGjIE2q8NodUVT987nrNxzprAM9k3Zjepi1oOVZJ9xVxUQg4GJyS/4Tu+Me9s\n\t5DT24bZwv2tQVbcyb/8PlH6AIFgUsKfZz2/vBHrJQq6fNLFmu5WPyqzOQTJsUISXhX95\n\trKZxidn2pixtE5Fc42qS5FM+WjB6SXczhSYlT/xjoNBaFk6SmBk98WSvah+z0AyzdAS1\n\t7du9Q8ywmMgYg8IkT4ELHPEBUvOQJhKLXypEbTAl/YU+RYIguxlfaqs548B+8wjv9jOU\n\tNbVQ==", "X-Gm-Message-State": "AJIora9Rt9WsHSM9Ws3Pl0ohVNeOHEw4+UvX3ogO0DegBXQb3VP299+s\n\tvqo+gZ8nzSA3bmpwBAftLFb+uqYAvupfnD+m", "X-Google-Smtp-Source": "AGRyM1s9stLD2YOEijmr9SFT/VKUJB2Pc5Jh85SYmdys7x0oeIDjPFmQYYNF9hpNM/5WRkhQIHl7XA==", "X-Received": "by 2002:a05:6000:1548:b0:217:6480:e65 with SMTP id\n\t8-20020a056000154800b0021764800e65mr2611386wry.381.1655893259869; \n\tWed, 22 Jun 2022 03:20:59 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 22 Jun 2022 11:20:47 +0100", "Message-Id": "<20220622102047.22492-4-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220622102047.22492-1-naush@raspberrypi.com>", "References": "<20220622102047.22492-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 3/3] pipeline: raspberrypi: Advertise\n\tScalerCrop from the pipeline handler", "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": "The ScalerCrop control is handled directly by the pipeline handler. Remove the\ncontrol from the IPA's static ControlInfoMap, and let the pipeline handler add\nit to the ControlInfoMap advertised to the application, ensuring the limits\nare set appropriately based on the current sensor mode.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 4596f2babcea..66a84b1dfb97 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -941,7 +941,15 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \tdata->properties_.set(properties::SensorSensitivity, result.modeSensitivity);\n \n \t/* Update the controls that the Raspberry Pi IPA can handle. */\n-\tdata->controlInfo_ = result.controlInfo;\n+\tControlInfoMap::Map ctrlMap;\n+\tfor (auto const &c : result.controlInfo)\n+\t\tctrlMap.emplace(c.first, c.second);\n+\n+\t/* Add the ScalerCrop control limits based on the current mode. */\n+\tctrlMap.emplace(&controls::ScalerCrop,\n+\t\t\tControlInfo(Rectangle(data->ispMinCropSize_), Rectangle(data->sensorInfo_.outputSize)));\n+\n+\tdata->controlInfo_ = ControlInfoMap(std::move(ctrlMap), result.controlInfo.idmap());\n \n \t/* Setup the Video Mux/Bridge entities. */\n \tfor (auto &[device, link] : data->bridgeDevices_) {\n", "prefixes": [ "libcamera-devel", "v3", "3/3" ] }