Patch Detail
Show a patch.
GET /api/1.1/patches/16196/?format=api
{ "id": 16196, "url": "https://patchwork.libcamera.org/api/1.1/patches/16196/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16196/", "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": "<20220610122533.11888-3-naush@raspberrypi.com>", "date": "2022-06-10T12:25:33", "name": "[libcamera-devel,3/3] pipeline: raspberrypi: Advertise ScalerCrop from the pipeline handler", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "52f6f4a4449d77b3ce3eb695157834555530adf5", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16196/mbox/", "series": [ { "id": 3169, "url": "https://patchwork.libcamera.org/api/1.1/series/3169/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3169", "date": "2022-06-10T12:25:31", "name": "[libcamera-devel,1/3] pipeline: ipa: raspberrypi: Move ControlInfoMap to the IPA", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3169/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16196/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16196/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 95082BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Jun 2022 12:25:33 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4D0AD65638;\n\tFri, 10 Jun 2022 14:25:33 +0200 (CEST)", "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9475065638\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Jun 2022 14:25:30 +0200 (CEST)", "by mail-wm1-x32e.google.com with SMTP id\n\ti17-20020a7bc951000000b0039c4760ec3fso1977351wml.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Jun 2022 05:25:30 -0700 (PDT)", "from naush-laptop.localdomain ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\te29-20020a5d595d000000b00213b93cff5fsm23097909wri.98.2022.06.10.05.25.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 10 Jun 2022 05:25:28 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654863933;\n\tbh=N/iX+qgcTLfLzyQQp6bpZhymY/EBic0Gs0P6wYW3az0=;\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=a/8lRfLnbHEac9vbXCYIzRzhh2R/hOhMrgLS6YZMUPlshDYiSLofTNA6jEXUMI/Te\n\tx65KqqvGgV6BnkZR0DrRpievMD83qvqgFkNKHBdfblFUfPHy0VdO68/3nBBj5sYfxx\n\tfLY/fp3+OTgK/JrwfPe5a7g/M1fV5P9BFTdWi2vyHdNhNNAK+uHNHnNXsM5l21ZvpO\n\tOznLdnYkfwjo2OLDTrApf0MgShi+Zd/sm9qofJWzrSJj8H91e8WwnrXrCqZkVLTTDN\n\taEXxdnEvNhusBMcyzfuLeLpP/Z2yIkhYcNPCvr4e7KhB/FqrOkAnfoQJPA5sRqDQze\n\t1gOLvSPkVFRQA==", "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=VgFx3Qp83lIvR05neP8MTvYhfy0+XkOHzCIAe5UkSbs=;\n\tb=VYVO65Gri4cTNgtISLQCEW5NFJyWkkn9alDg7TuNoxOEgJ9DmBjTYOEoUN4riFixvZ\n\t5OMkS8/64OuWiclDxH2H08UVa8D9HIDH5iwdL7Fq5gWMTOfjjF3CcuoQNuzCaas3uRwe\n\tSNXNuia6aHlfUU5gCVHuRb8XA5/6Ohw2SC1TtPA+xJVAQeoafcTpcoiKuNe8wHXtJugB\n\tamH1q6H9s+bWbW5VWWHBSuE7AVmS3DbPFJ5Mj7S6mZex0fMWKh0pqJD1isReqTVWkKbt\n\tOJkxgZQWSv0ULcm4S5o1G35265/Spt4TUXfBADlcqG36z5Mf136D7AbchiHTREMNoZ1S\n\tKjxQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"VYVO65Gr\"; 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=VgFx3Qp83lIvR05neP8MTvYhfy0+XkOHzCIAe5UkSbs=;\n\tb=kw1U7m1YgqZwzQzVAtwZvNngjLMKYJC/GW9LMLUR+98Zo2chdjSjB5qYZdabBMpNg2\n\tPdeAf/AnTwo6hxS3iWVdhJxM7K0mrlrRItWYrZdFff8ovPF5wMPRkrU1a0neyBBDzdb2\n\tqwix1pnpNJS5zKOzxH/yTb4yhpl4vr3hmDe/EMNMDBYUkWO4Zh+CuFD/2dsd9igWJZSR\n\t2EdlSiHx7dpRcJJEPxQAYW0tNp45QeEnrThIIfAKfFBJ3sHxui+GZpyL7+JQz7BDNgOg\n\tooMi0ZEBd0SIndAOhLjicD+olGxY+4MGVbxqVHdVYsaMhf4xTTkWuJ8650w46mzh1HMX\n\tbR5g==", "X-Gm-Message-State": "AOAM533ZegD8ze3yPStwyqkktlU9KzYSwZujOtKm8XwZzPeJ7kkakL6X\n\trX+hI1B373Xu8uoVb7Ytdr/fvdCrmIjw6Q==", "X-Google-Smtp-Source": "ABdhPJzubZvwCIdqwZnDjhITbwIZEvnxEJVgTSlGKnT+/2AP3krPn6MRczFBbiVHaka2C+Te2rDs1A==", "X-Received": "by 2002:a1c:4c12:0:b0:39c:6750:be17 with SMTP id\n\tz18-20020a1c4c12000000b0039c6750be17mr8842247wmf.21.1654863929615; \n\tFri, 10 Jun 2022 05:25:29 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 10 Jun 2022 13:25:33 +0100", "Message-Id": "<20220610122533.11888-3-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220610122533.11888-1-naush@raspberrypi.com>", "References": "<20220610122533.11888-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 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/ipa/raspberrypi/raspberrypi.cpp | 1 -\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 10 +++++++++-\n 2 files changed, 9 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 295f6b735dc0..f46fccdd4177 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -86,7 +86,6 @@ static const ControlInfoMap::Map ipaControls{\n \t{ &controls::Saturation, ControlInfo(0.0f, 32.0f, 1.0f) },\n \t{ &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n \t{ &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n-\t{ &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n \t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }\n };\n \ndiff --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", "3/3" ] }