[{"id":23802,"web_url":"https://patchwork.libcamera.org/comment/23802/","msgid":"<YsdSP23ijAvY3aRW@pendragon.ideasonboard.com>","date":"2022-07-07T21:38:07","subject":"Re: [libcamera-devel] [RFC PATCH 4/4] pipeline: rkisp1: Add support\n\tfor UYVY","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 Fri, Jul 08, 2022 at 12:03:10AM +0900, Paul Elder via libcamera-devel wrote:\n> Support for UYVY will be added soon in the rkisp1 driver. Add it to the\n> pipeline handler to support it in libcamera as well.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> ---\n> Besides the fact that support hasn't been merged (or sent yet, for that\n> matter) in the rkisp1 driver, how do we deal with older versions of the\n> driver that won't have UYVY support? Should we enumerate the formats and\n> check if it's available? Just for UYVY or for all formats?\n\nFiltering the formats based on what the device supports sounds good\n(you'll have to turn RkISP1Path::formats_ into a vector). I'd do it for\nall formats, that's more future-proof, and should produce cleaner code\ntoo.\n\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> index 24ff62e1..6b4c4ed5 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> @@ -209,8 +209,9 @@ void RkISP1Path::stop()\n>  namespace {\n>  constexpr Size RKISP1_RSZ_MP_SRC_MIN{ 32, 16 };\n>  constexpr Size RKISP1_RSZ_MP_SRC_MAX{ 4416, 3312 };\n> -constexpr std::array<PixelFormat, 10> RKISP1_RSZ_MP_FORMATS{\n> +constexpr std::array<PixelFormat, 11> RKISP1_RSZ_MP_FORMATS{\n>  \tformats::YUYV,\n> +\tformats::UYVY,\n>  \tformats::YUV420,\n>  \tformats::YVU420,\n>  \tformats::YUV422,","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 774FDBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Jul 2022 21:38:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BBDAD6330E;\n\tThu,  7 Jul 2022 23:38:36 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6EA3160400\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Jul 2022 23:38:35 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C7A52D00;\n\tThu,  7 Jul 2022 23:38:34 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657229916;\n\tbh=3p2KEJz6W3uC+tF8605QqPVs/xrXV3t9BW2JwhnP7O8=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=KWjyiNQzfPsV9A+3VgT3Uf3763sQ2OT9q+kGFmEnXdYMtXrgquzh22hhJEeP55B7p\n\twd77XuLIl05RKfaAEjWJADr+PswiVjq5Ol5AMzM6IUYgHvc8ifgaFL328HZT8Ub2Wg\n\tnjkQsEpN7euakSd2Nkqz+jy2fzhZAdCjwSrBi/liB57OD9uQOls25LFFRkgkwo6CTK\n\t08LdQqyJLeqvm1LqA0506SImw3PXt9nm4F8C248mZDlzuaoPd9mK4jd2oJoLV/v382\n\tVcyNjhub0mVH+QYJ+x8SDJFo/qEpmAsW0JZUkb4yzeaDTkbNs/B9cM6IT1kkJ1nntj\n\tcx0w3edwtHzaQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657229915;\n\tbh=3p2KEJz6W3uC+tF8605QqPVs/xrXV3t9BW2JwhnP7O8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=AFEoae6PEN/bwg/4QpLgEcySMAOp78j6h+fbiDpEZ2MkQVJ/T4S8Asll4pQWvxlWj\n\tJAT47fos+4triG6nqtiVoji8abU6lyw3jLd6rmUBnaTlStT6mk/g7V1oNJx8RQ4LL4\n\tTFxsadzBQi8jJotDfX7ux1UX2UT0ylIoSyw/QUd4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"AFEoae6P\"; dkim-atps=neutral","Date":"Fri, 8 Jul 2022 00:38:07 +0300","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YsdSP23ijAvY3aRW@pendragon.ideasonboard.com>","References":"<20220707150310.3645858-1-paul.elder@ideasonboard.com>\n\t<20220707150310.3645858-5-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220707150310.3645858-5-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC PATCH 4/4] pipeline: rkisp1: Add support\n\tfor UYVY","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]