{"id":17629,"url":"https://patchwork.libcamera.org/api/patches/17629/?format=json","web_url":"https://patchwork.libcamera.org/patch/17629/","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":"<20221019090107.19975-5-naush@raspberrypi.com>","date":"2022-10-19T09:01:04","name":"[libcamera-devel,v4,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/17629/mbox/","series":[{"id":3566,"url":"https://patchwork.libcamera.org/api/series/3566/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3566","date":"2022-10-19T09:01:00","name":"Raspberry Pi AGC digital gain fixes","version":4,"mbox":"https://patchwork.libcamera.org/series/3566/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17629/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17629/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 B23F7C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 Oct 2022 09:01:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C173262E4F;\n\tWed, 19 Oct 2022 11:01:22 +0200 (CEST)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 06D8462E44\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Oct 2022 11:01:21 +0200 (CEST)","by mail-wm1-x329.google.com with SMTP id e18so12482035wmq.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Oct 2022 02:01:21 -0700 (PDT)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tr9-20020a05600c458900b003b47b913901sm1017595wmo.1.2022.10.19.02.01.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 19 Oct 2022 02:01:19 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666170082;\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=onnfr8lZTCy5FjwPPsP0l8NsiswES8DO4CNh71n4fv0Gs21sF6tOOf1u8Ahu+TwqB\n\tOAW+UD2pkQBzkOFEOdJuFa/y00gW/o9yRuRguhO8L2A1xM0PjXeUDY0/Q1cTC8EmOs\n\ty/H3hMGNJ4awwW/y1h4EaRIWTZV+9BanBZWz5dJARNyZ9+oKEsBECKjW4wycbgCk2A\n\t2zcUR6ADlHxVvFtbSwg3x1HDKP7y2e4R5oBRSs5OILJjwzhv7QQD7oqjD+IsK4wnZO\n\tNV5eUs8LloqVz2r4iRsTgQ3AdB1/7+o+IrWy/m82MnVJ79Tv3NePKAfSqT2iVf4haF\n\tDPnEmoEDKlVEw==","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\t:message-id:reply-to;\n\tbh=bo43RPn2Wf8VvpHKyuSwKItQaXGqKlJBIO1xs6MhjIo=;\n\tb=H5UO7zd636sPFw22zGTqQMyGm2lSC5UHy51T0AcTb/RSDIM9PXGDh7LwEe9oHJW94t\n\tC9DpNuI/zuZtAxaGHMXgOBTsZQuXAk7b3vXfqpIasBrNXM+9D1Bq8IVm/UByiJmMtM+P\n\tXtu+/PQgwfeNjBgiM3T/fSLjdCzUPmHDfOQwu0GPtXRldeUo0e9PbFZX680uWXa3kV08\n\tCgqUjMAxAxe7Qk/83Jy2Oxg0tM6bqFi6YmRDonh1sMAatLuqJIc0E0HCBZPb8bTQbyVo\n\tYDcA81ozIN3u9IWW+zcdmKOINndpP6rrQJLU57aOSJegnmijyjdn8IHLWlp+wAjpNCxx\n\t27Fw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"H5UO7zd6\"; 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:message-id:reply-to;\n\tbh=bo43RPn2Wf8VvpHKyuSwKItQaXGqKlJBIO1xs6MhjIo=;\n\tb=NHA0Fu22RVtm36wzxdJCPiD2Oy/Hfjc5gLeCBE+//i/gWjDBqAqzZEfw9VoJFJztMh\n\trDNGEXLLWdpuTKWkXVWakh5MBfSGUTUEv8irjLsx6RXf0+gzLf4gb8HT27vRGL0Xwhat\n\tifiUh25dWfH4we3tXD4cFt8CzjBkw8a9eW96ecQe/dwvGOO2AnHzh8Rerjj3w+6tyVpB\n\tu3b/MGWUZRBfqvwtwVXmPswkglZh5f8dtwfEciv5zSg/eEO1C9fy+p/HZeDDAZeygvJ5\n\t8wrsWkYbwWP3y+vleb+618nfwGsn4m9b+rRnupgpFI24md4EbhrH9vhtoPdgdI6zcy5R\n\t6bzQ==","X-Gm-Message-State":"ACrzQf1C/pM37vdA4k+cDDrB2cSkJBomKEs7V4v5Vy5qXRgslietHk4j\n\tFvZuQGA8eU4Hr9CD08nOkbvPBzdLs+T5Bg==","X-Google-Smtp-Source":"AMsMyM46UGP9Sk6pDp0Hz5DmdlMHmh5F/Og+wnp6FLXLayUYDEKhD+Q+cwgiI1V288ZvujJuhvTTbA==","X-Received":"by 2002:a1c:283:0:b0:3c6:c025:3f3b with SMTP id\n\t125-20020a1c0283000000b003c6c0253f3bmr24379373wmc.101.1666170080474; \n\tWed, 19 Oct 2022 02:01:20 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 19 Oct 2022 10:01:04 +0100","Message-Id":"<20221019090107.19975-5-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20221019090107.19975-1-naush@raspberrypi.com>","References":"<20221019090107.19975-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 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","v4","4/7"]}