[{"id":11169,"web_url":"https://patchwork.libcamera.org/comment/11169/","msgid":"<20200704183204.GC6018@pendragon.ideasonboard.com>","date":"2020-07-04T18:32:04","subject":"Re: [libcamera-devel] [PATCH v3 03/22] libcamera:\n\tStreamConfiguration: Add frameSize field","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Sat, Jul 04, 2020 at 10:31:21PM +0900, Paul Elder wrote:\n> In addition to the stride field, we want the pipeline handler to be able\n> to declare the frame size for the configuration. Add a frameSize field\n> to StreamConfiguration for this purpose.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> ---\n> New in v3\n> ---\n>  include/libcamera/stream.h |  1 +\n>  src/libcamera/stream.cpp   | 17 ++++++++++++++---\n>  2 files changed, 15 insertions(+), 3 deletions(-)\n> \n> diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> index 1a68bd2..f502b35 100644\n> --- a/include/libcamera/stream.h\n> +++ b/include/libcamera/stream.h\n> @@ -43,6 +43,7 @@ struct StreamConfiguration {\n>  \tPixelFormat pixelFormat;\n>  \tSize size;\n>  \tunsigned int stride;\n> +\tunsigned int frameSize;\n\nWe'll have to make these fields per-plane, but it can be done on top.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \n>  \tunsigned int bufferCount;\n>  \n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index 6df5882..6d6e279 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -279,7 +279,8 @@ SizeRange StreamFormats::range(const PixelFormat &pixelformat) const\n>   * handlers provide StreamFormats.\n>   */\n>  StreamConfiguration::StreamConfiguration()\n> -\t: pixelFormat(0), stride(0), bufferCount(0), stream_(nullptr)\n> +\t: pixelFormat(0), stride(0), frameSize(0), bufferCount(0),\n> +\t  stream_(nullptr)\n>  {\n>  }\n>  \n> @@ -287,8 +288,8 @@ StreamConfiguration::StreamConfiguration()\n>   * \\brief Construct a configuration with stream formats\n>   */\n>  StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n> -\t: pixelFormat(0), stride(0), bufferCount(0), stream_(nullptr),\n> -\t  formats_(formats)\n> +\t: pixelFormat(0), stride(0), frameSize(0), bufferCount(0),\n> +\t  stream_(nullptr), formats_(formats)\n>  {\n>  }\n>  \n> @@ -315,6 +316,16 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n>   * the camera is configured.\n>   */\n>  \n> +/**\n> + * \\var StreamConfiguration::frameSize\n> + * \\brief Frame size for the stream, in bytes\n> + *\n> + * The frameSize value reports the number of bytes necessary to contain one\n> + * frame of an image buffer for this stream. The value is valid after\n> + * successfully validating the configuration with a call to\n> + * CameraConfiguration::validate().\n> + */\n> +\n>  /**\n>   * \\var StreamConfiguration::bufferCount\n>   * \\brief Requested number of buffers to allocate for the stream","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 1B1A3BD792\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  4 Jul 2020 18:32:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A8D2E60E01;\n\tSat,  4 Jul 2020 20:32:09 +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 4BC2E609C7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jul 2020 20:32:08 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C78DC296;\n\tSat,  4 Jul 2020 20:32:07 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"jR8mdWa0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593887528;\n\tbh=XtT0xIF9g2WU3EdTyPOX3dWgOsqCXH8CcWn8JWtZsHU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jR8mdWa0uveX0gmN0+8NAFcHiSahxFPrlrk7kNMuCb17/yTtslFlIbtgo61wliTto\n\t6qjAjh2Fk9sZjTumJUZWv+S6Bl9TmLUqKMRqu3RNfGRHApGGBce6DKP9qKgG64XD4e\n\t/Pu0Pu20MgwSjvUt//8pgXPd4vpcyxGAtZdcSCYM=","Date":"Sat, 4 Jul 2020 21:32:04 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20200704183204.GC6018@pendragon.ideasonboard.com>","References":"<20200704133140.1738660-1-paul.elder@ideasonboard.com>\n\t<20200704133140.1738660-4-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200704133140.1738660-4-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 03/22] libcamera:\n\tStreamConfiguration: Add frameSize field","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","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]