{"id":17401,"url":"https://patchwork.libcamera.org/api/patches/17401/?format=json","web_url":"https://patchwork.libcamera.org/patch/17401/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20220926095737.30506-5-naush@raspberrypi.com>","date":"2022-09-26T09:57:34","name":"[libcamera-devel,v3,4/7] ipa: raspberrypi: Add RPiController::Metadata::mergeCopy","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"6a8535cdbd90b4b94685519208d27aea33fda4f8","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17401/mbox/","series":[{"id":3503,"url":"https://patchwork.libcamera.org/api/series/3503/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3503","date":"2022-09-26T09:57:30","name":"Raspberry Pi AGC digital gain fixes","version":3,"mbox":"https://patchwork.libcamera.org/series/3503/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17401/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17401/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 59FCBBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Sep 2022 09:58:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 129B56225A;\n\tMon, 26 Sep 2022 11:58:11 +0200 (CEST)","from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com\n\t[IPv6:2a00:1450:4864:20::42f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6AA036224C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 11:58:09 +0200 (CEST)","by mail-wr1-x42f.google.com with SMTP id cc5so9362273wrb.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 02:58:09 -0700 (PDT)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tp22-20020a05600c419600b003a4efb794d7sm10160671wmh.36.2022.09.26.02.58.06\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Sep 2022 02:58:06 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664186291;\n\tbh=naXEqMC/INqUw+OoX1V7tmh3rdoy6RmaWlVoUDk/4qI=;\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=vxwV42e9p+72UKk9eKa2R219MbWoZ4kTHtCJtkRlcfPbJ8r3eXuxMSLSN74XVrQHk\n\tHvgIGal8nMcGFekByFIfT0U5BVB1dAc95eoABAAxUyqwXNCnLIdW/EjxiKKFeyp56U\n\t5vniJTkITZWpBfvCbCzRCVS/V4S5GvA7ydjUPJ+OiOT7xwH3l4p9RMtKKarZWdsRpJ\n\t85c8qopXpMjXHKx0gXysfYz8GxzTLf8VSL16wHzVoFkQa4lMpxbLK09JyAvZSr48nj\n\t+oL609oIO/dUrmzw+CYmjHrObEP8Wr0oEljvtw2aHVtHA/bA93aCK7XXF9FDUdcPCU\n\tB1mgGePLWYzkA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date;\n\tbh=bo43RPn2Wf8VvpHKyuSwKItQaXGqKlJBIO1xs6MhjIo=;\n\tb=qr4dsU6Tf1ALqHJ2s+IkeN3j2BFyR7DMdzeRHtJCvfa6dZPyr1khrkYHyRWkzQcsKu\n\tt54iq3XtFIEkP4vWt2z9cWNvy0UPxKVwOQKjTWtcvpJZbKiVgOiOfjwngKDZvkUdc2Sd\n\t6r5JV/bPpbs6seEJQhNXimaeK37pBtudXU7+U25DYJxP3E1myqm7xmgipZeXYgzl5pW+\n\tq7/lo0uHpD+WVL0hT/XUXs79yqHFC5kWW5aEk3jnamOlOS+Hrh60l7SW/BDmVGrW7Asy\n\tBLOz0Jl+6VRIgK+7JK0Apzswn2qtEQd+FmLrVgWILa7DXHLEs1OcDIHShfNELLT5TrNl\n\tQMtA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"qr4dsU6T\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date;\n\tbh=bo43RPn2Wf8VvpHKyuSwKItQaXGqKlJBIO1xs6MhjIo=;\n\tb=6BMJyh0jhVYHcqKzsSwLGcMRnnyk37QRGtwZW7ak1IF3ck2Ih+OzLnhGsIT95LyIF2\n\tIuzoudCHojZ+cmLXlCZmf0jvpaq1pNw+vlX2cs2dZJCBeo0tuWPassAiWWN5zNNBRLgR\n\t4v1nVwGT9BJeSaXGtNPikIlmlT6Crgv8Xvub3JXKpf253KmjakwGt7RLTmXnCXr+d8Zk\n\tzndAlcbS7Z5DdEic8hQ7DOp1fOcw1RuSiRhUo+5+/Skzzxe6GLXhIC0btChCixqGYX8F\n\te/4c/wyAoi7c/i1KKEcKGXrOZjg6fUcA6hDMDIbouUwx18cb5K97HkL0hYvsJE+57wNu\n\t1haw==","X-Gm-Message-State":"ACrzQf2wz6qqgAa5QXFEwapBSNchcVQuodPBMz6LrojEMSBnNTqaDNsB\n\tZ5qQg8IQYcdYCbjspFQCVzZT6AyaVf9dDBa1","X-Google-Smtp-Source":"AMsMyM56F761mKbo/39DO+G5Cf1qVyhm2pva64Yw3/SkrKG+KeLCob3NiLQS0GXFXvbvaAaYHv26fg==","X-Received":"by 2002:a5d:5258:0:b0:229:9c2c:3120 with SMTP id\n\tk24-20020a5d5258000000b002299c2c3120mr13207766wrc.695.1664186288939; \n\tMon, 26 Sep 2022 02:58:08 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 26 Sep 2022 10:57:34 +0100","Message-Id":"<20220926095737.30506-5-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20220926095737.30506-1-naush@raspberrypi.com>","References":"<20220926095737.30506-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 4/7] ipa: raspberrypi: Add\n\tRPiController::Metadata::mergeCopy","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":"Add a new member function to RPiController::Metadata that copies unique\nkey/value pairs from one object to the other. This is different from\nstd::map::merge that would remove the key/value pairs from the source object.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/metadata.h | 10 ++++++++++\n 1 file changed, 10 insertions(+)","diff":"diff --git a/src/ipa/raspberrypi/controller/metadata.h b/src/ipa/raspberrypi/controller/metadata.h\nindex 0f7ebfaf4c25..ddce491784e9 100644\n--- a/src/ipa/raspberrypi/controller/metadata.h\n+++ b/src/ipa/raspberrypi/controller/metadata.h\n@@ -78,6 +78,16 @@ public:\n \t\tdata_.merge(other.data_);\n \t}\n \n+\tvoid mergeCopy(const Metadata &other)\n+\t{\n+\t\tstd::scoped_lock lock(mutex_, other.mutex_);\n+\t\t/*\n+\t\t * If the metadata key exists, ignore this item and copy only\n+\t\t * unique key/value pairs.\n+\t\t */\n+\t\tdata_.insert(other.data_.begin(), other.data_.end());\n+\t}\n+\n \ttemplate<typename T>\n \tT *getLocked(std::string const &tag)\n \t{\n","prefixes":["libcamera-devel","v3","4/7"]}