[{"id":19813,"web_url":"https://patchwork.libcamera.org/comment/19813/","msgid":"<20210923120652.kzdvkoqtu4aqfkur@uno.localdomain>","date":"2021-09-23T12:06:52","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't\n\tmove planes to construct FrameBuffer","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Thu, Sep 23, 2021 at 02:55:58PM +0300, Laurent Pinchart wrote:\n> The FrameBuffer class has no constructor that takes an rvalue reference\n> to planes. The std::move() is thus misleading as a copy will still take\n> place. Drop it to clarify the code, no functional change is introduced.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nIndeed!\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> ---\n>  src/libcamera/v4l2_videodevice.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 9b3ee88757be..ba5f88cd41ed 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -1376,7 +1376,7 @@ std::unique_ptr<FrameBuffer> V4L2VideoDevice::createBuffer(unsigned int index)\n>  \t\t}\n>  \t}\n>\n> -\treturn std::make_unique<FrameBuffer>(std::move(planes));\n> +\treturn std::make_unique<FrameBuffer>(planes);\n>  }\n>\n>  FileDescriptor V4L2VideoDevice::exportDmabufFd(unsigned int index,\n>\n> base-commit: 2cc4303b172a76ac5b431c4fb4df8a083f7d3fcf\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 E9677BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Sep 2021 12:06:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9AB876918D;\n\tThu, 23 Sep 2021 14:06:12 +0200 (CEST)","from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C0D069189\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Sep 2021 14:06:12 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id CAC8C1C0004;\n\tThu, 23 Sep 2021 12:06:10 +0000 (UTC)"],"Date":"Thu, 23 Sep 2021 14:06:52 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210923120652.kzdvkoqtu4aqfkur@uno.localdomain>","References":"<20210923115558.31107-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210923115558.31107-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't\n\tmove planes to construct FrameBuffer","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":19815,"web_url":"https://patchwork.libcamera.org/comment/19815/","msgid":"<5775d015-8a3a-38a9-554c-694397e2f763@ideasonboard.com>","date":"2021-09-23T12:46:45","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't\n\tmove planes to construct FrameBuffer","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn 9/23/21 5:25 PM, Laurent Pinchart wrote:\n> The FrameBuffer class has no constructor that takes an rvalue reference\n> to planes. The std::move() is thus misleading as a copy will still take\n> place. Drop it to clarify the code, no functional change is introduced.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>   src/libcamera/v4l2_videodevice.cpp | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 9b3ee88757be..ba5f88cd41ed 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -1376,7 +1376,7 @@ std::unique_ptr<FrameBuffer> V4L2VideoDevice::createBuffer(unsigned int index)\n>   \t\t}\n>   \t}\n>   \n> -\treturn std::make_unique<FrameBuffer>(std::move(planes));\n> +\treturn std::make_unique<FrameBuffer>(planes);\n\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n>   }\n>   \n>   FileDescriptor V4L2VideoDevice::exportDmabufFd(unsigned int index,\n>\n> base-commit: 2cc4303b172a76ac5b431c4fb4df8a083f7d3fcf","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 A5B52BF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Sep 2021 12:46:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EF5166918C;\n\tThu, 23 Sep 2021 14:46:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DD43069189\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Sep 2021 14:46:50 +0200 (CEST)","from [192.168.1.104] (unknown [103.251.226.101])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E748945E;\n\tThu, 23 Sep 2021 14:46:49 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QPvvrpd3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1632401210;\n\tbh=riMD7MiT3bux+H25aRVRdDaaxjYwDvZhnIkpv2Uvffg=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=QPvvrpd3R1pbOOqtU0W5+zCNuprHrCht5q6Qr/lSeKbJtSjicyyHSsOM7gx+/E6TA\n\tGz/0VBriGfWA1X/NZBt/3amU0C2w6to9O0H9kUycbgruDoUbevZaeBrIQm7rJB9Xcd\n\txunfoDz21Y00UbAVPL4oGHmwVq3zgbqye01u29Vk=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210923115558.31107-1-laurent.pinchart@ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<5775d015-8a3a-38a9-554c-694397e2f763@ideasonboard.com>","Date":"Thu, 23 Sep 2021 18:16:45 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.10.2","MIME-Version":"1.0","In-Reply-To":"<20210923115558.31107-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't\n\tmove planes to construct FrameBuffer","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>"}},{"id":19825,"web_url":"https://patchwork.libcamera.org/comment/19825/","msgid":"<20210924054009.GT4382@pyrite.rasen.tech>","date":"2021-09-24T05:40:09","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't\n\tmove planes to construct FrameBuffer","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Thu, Sep 23, 2021 at 02:55:58PM +0300, Laurent Pinchart wrote:\n> The FrameBuffer class has no constructor that takes an rvalue reference\n> to planes. The std::move() is thus misleading as a copy will still take\n> place. Drop it to clarify the code, no functional change is introduced.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/libcamera/v4l2_videodevice.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 9b3ee88757be..ba5f88cd41ed 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -1376,7 +1376,7 @@ std::unique_ptr<FrameBuffer> V4L2VideoDevice::createBuffer(unsigned int index)\n>  \t\t}\n>  \t}\n>  \n> -\treturn std::make_unique<FrameBuffer>(std::move(planes));\n> +\treturn std::make_unique<FrameBuffer>(planes);\n>  }\n>  \n>  FileDescriptor V4L2VideoDevice::exportDmabufFd(unsigned int index,\n> \n> base-commit: 2cc4303b172a76ac5b431c4fb4df8a083f7d3fcf\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 BD4DABF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Sep 2021 05:40:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 310206918A;\n\tFri, 24 Sep 2021 07:40:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 415E160242\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Sep 2021 07:40:17 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B221945E;\n\tFri, 24 Sep 2021 07:40:15 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"JmBDfUzt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1632462016;\n\tbh=Tl8kM2upZDPNdqGGz9zu0pokNzTMqtTQG0Z+qUl8OEw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=JmBDfUzt0nLC2BdEaYdjhlJDCg2wlZm6WIc0QA+DTaOrE8wNtwUeLYkNtLZn1cLdJ\n\tcynue1Pr7VYTUqnymKGNEzH8aDXqRFpUnadxTBg6Foop1SqPe6UgQ9Boe9VT9zexMg\n\tdfC3p8UX3yKuim3CWe8uQRN8LymjJ+vbog3XOfg4=","Date":"Fri, 24 Sep 2021 14:40:09 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210924054009.GT4382@pyrite.rasen.tech>","References":"<20210923115558.31107-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210923115558.31107-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't\n\tmove planes to construct FrameBuffer","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]