[{"id":4019,"web_url":"https://patchwork.libcamera.org/comment/4019/","msgid":"<20200316064519.GH4732@pendragon.ideasonboard.com>","date":"2020-03-16T06:45:19","subject":"Re: [libcamera-devel] [PATCH 3/4] libcamera: pipeline: vimc: Remove\n\tinternal usage of ImageFormats","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Mon, Mar 16, 2020 at 03:40:35AM +0100, Niklas Söderlund wrote:\n> There is no need to use the ImageFormats helper to generate a map of\n> PixelFormat to sizes, use std::map directly.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/pipeline/vimc.cpp | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> index 8792dfe48ed8db31..72924bf2f55d0021 100644\n> --- a/src/libcamera/pipeline/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc.cpp\n> @@ -173,17 +173,17 @@ CameraConfiguration *PipelineHandlerVimc::generateConfiguration(Camera *camera,\n>  \tif (roles.empty())\n>  \t\treturn config;\n>  \n> -\tImageFormats formats;\n> +\tstd::map<PixelFormat, std::vector<SizeRange>> formats;\n>  \n>  \tfor (PixelFormat pixelformat : pixelformats) {\n>  \t\t/* The scaler hardcodes a x3 scale-up ratio. */\n>  \t\tstd::vector<SizeRange> sizes{\n>  \t\t\tSizeRange{ 48, 48, 4096, 2160 }\n>  \t\t};\n> -\t\tformats.addFormat(pixelformat, sizes);\n> +\t\tformats[pixelformat] = sizes;\n>  \t}\n>  \n> -\tStreamConfiguration cfg(formats.data());\n> +\tStreamConfiguration cfg(formats);\n>  \n>  \tcfg.pixelFormat = DRM_FORMAT_BGR888;\n>  \tcfg.size = { 1920, 1080 };","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 0D49660417\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Mar 2020 07:45:26 +0100 (CET)","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 4BA2A2D6;\n\tMon, 16 Mar 2020 07:45:25 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584341125;\n\tbh=JoxvgMGbxMHYETztzVojeITRMbcc8kNKfwh2IZ2IsI0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=W6f8FqV8E6YavTH/a/FFQjH9kaeeto3l+0BFYuardAbXvQ++W/byUmrbK4YzEZa+6\n\t/G1i7h5oVhFWsfd3AwBPvjHVf5tVvjhCKGL02alRjKT9HUSGRhtbA1bpbxJlP7zXx8\n\tpxj/mn6v3qQzwVuD+HwI2apyPVjw7MbRpxIrKxjY=","Date":"Mon, 16 Mar 2020 08:45:19 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200316064519.GH4732@pendragon.ideasonboard.com>","References":"<20200316024036.2474307-1-niklas.soderlund@ragnatech.se>\n\t<20200316024036.2474307-4-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200316024036.2474307-4-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 3/4] libcamera: pipeline: vimc: Remove\n\tinternal usage of ImageFormats","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>","X-List-Received-Date":"Mon, 16 Mar 2020 06:45:26 -0000"}}]