From patchwork Tue Jul 19 07:40:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 16678 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A22F2BD1F1 for ; Tue, 19 Jul 2022 07:40:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D046163313; Tue, 19 Jul 2022 09:40:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658216444; bh=yj4kFUkhoQxA/sirNocycMR/0UpHkomScMwRmYOlO1g=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=X4cnL0YptbYioSqaTbHDX9xgyLAN2cddhoGQF9jqGUSjsj9EJ/hVAQDpvhPKPuiMG rQ7KUpDXc2N1/nd5XXIUEz/ePB3XfJCxn3spXpDa1mPjV7WmUuz8elMaYerg6VAxRJ BCifElWiXcdryeHKQ0KK3yAK5RSrTplPxat32qw50Z5zOBfeyz+1/LfiBsAlUeVqly KADDZIICwgA8qCPZb2lHvSXu8UFGJAY9I2R0COlMtz7inElfBOxYioHNw2KJJQLU/+ kXGBW1cpl/yZW4iGrrwwPJLXG0z1Qbzuzm3/hQViXrwrptRfjNyRg4ys1EM4Ycma9V JQ/8g5MHjNSrQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EFA5C6330D for ; Tue, 19 Jul 2022 09:40:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qISv40c9"; dkim-atps=neutral Received: from pyrite.rasen.tech (softbank036240121080.bbtec.net [36.240.121.80]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4400C6EE; Tue, 19 Jul 2022 09:40:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658216441; bh=yj4kFUkhoQxA/sirNocycMR/0UpHkomScMwRmYOlO1g=; h=From:To:Cc:Subject:Date:From; b=qISv40c96CyKg8De6t77UpodgK9tPSceQo2wiNU0B6SwMqcvga75dcVKkjr21UZ6y 0fh4Po6EOMF26Ga3XIHsveirrN8WXB0US5gvyDeE32qckA0cgD+aCFFxC8LD2I3Fh6 FYncKRfrOpc3MtMYCH7JYKm8mV55leh7KYxTYQD8= To: libcamera-devel@lists.libcamera.org Date: Tue, 19 Jul 2022 16:40:12 +0900 Message-Id: <20220719074013.846726-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/2] pipeline: rkisp1: Add output support for YUV420 and YVU420 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Paul Elder via libcamera-devel From: Paul Elder Reply-To: Paul Elder Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" YUV420 and YVU420 are already supported as output formats by the rkisp1 driver. Add them to the pipeline handler to support them in libcamera as well. Signed-off-by: Paul Elder Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- Changes in v2: - move to after NV formats - add to self path too --- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp index 6f175758..c070929d 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp @@ -130,6 +130,8 @@ int RkISP1Path::configure(const StreamConfiguration &config, switch (config.pixelFormat) { case formats::NV12: case formats::NV21: + case formats::YUV420: + case formats::YVU420: ispFormat.mbus_code = MEDIA_BUS_FMT_YUYV8_1_5X8; break; default: @@ -207,24 +209,28 @@ void RkISP1Path::stop() namespace { constexpr Size RKISP1_RSZ_MP_SRC_MIN{ 32, 16 }; constexpr Size RKISP1_RSZ_MP_SRC_MAX{ 4416, 3312 }; -constexpr std::array RKISP1_RSZ_MP_FORMATS{ +constexpr std::array RKISP1_RSZ_MP_FORMATS{ formats::YUYV, formats::NV16, formats::NV61, formats::NV21, formats::NV12, + formats::YUV420, + formats::YVU420, formats::R8, /* \todo Add support for RAW formats. */ }; constexpr Size RKISP1_RSZ_SP_SRC_MIN{ 32, 16 }; constexpr Size RKISP1_RSZ_SP_SRC_MAX{ 1920, 1920 }; -constexpr std::array RKISP1_RSZ_SP_FORMATS{ +constexpr std::array RKISP1_RSZ_SP_FORMATS{ formats::YUYV, formats::NV16, formats::NV61, formats::NV21, formats::NV12, + formats::YUV420, + formats::YVU420, formats::R8, formats::RGB565, formats::XRGB8888, From patchwork Tue Jul 19 07:40:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 16679 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D7582BD1F1 for ; Tue, 19 Jul 2022 07:40:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8C9CA63315; Tue, 19 Jul 2022 09:40:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658216446; bh=tI42qEgQsveM4r7sKYvuo+HxLAXL8Tf2UyHY5/DmHUQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=osoAvo3JY2jrgR0CMQxx1bAgJFXLXtdO+1zCcaddxX126NMLALdgUq5MGYQUb6uow L8UZlRGeT1SBITteehXz+MfU4wNBV2TIxKqBXUT6iN4qP2GCpoGpuGtBNPJYfeZam5 kQDhzeU8QB8Bbks1KKgpWOYFVgelZKgpnDESiSKUiyoDKyrdWplnQF/Ubo5O9Z+DUn F15TJHmbTuMf9290BEJ22KgBvjol3IOI9JcJxkOe+JXSjA96F/SkaKYHHm9pEN+wX2 I1t26h2hGx1I/YtwGmzN1X6SmC0kkaVhS1me7O++8FNbcbLLSLj8nmUREGE9TTyZIg bujbxkoG5/PMw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9BCCC6330E for ; Tue, 19 Jul 2022 09:40:43 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hmPmogm4"; dkim-atps=neutral Received: from pyrite.rasen.tech (softbank036240121080.bbtec.net [36.240.121.80]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 330836EE; Tue, 19 Jul 2022 09:40:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658216443; bh=tI42qEgQsveM4r7sKYvuo+HxLAXL8Tf2UyHY5/DmHUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hmPmogm4/7pjwKKoDWbKnq57xf/lAquZ158gMa+KiZae1SMQlYDs3qWQtuweLm9wr BwEEUGYwyETA+9mtY0einLSvlLixXSs7N9ODooBUokOYvdV8lmzPATI95SneM4IeGi Ti0eoXbgyb3TSkaB9wZBaivW4l2Sr76ch0Sl7gpM= To: libcamera-devel@lists.libcamera.org Date: Tue, 19 Jul 2022 16:40:13 +0900 Message-Id: <20220719074013.846726-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220719074013.846726-1-paul.elder@ideasonboard.com> References: <20220719074013.846726-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/2] pipeline: rkisp1: Add support for YUV422 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Paul Elder via libcamera-devel From: Paul Elder Reply-To: Paul Elder Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" YUV422 is already supported as an output format by the rkisp1 driver. Add them to the pipeline handler to support them in libcamera as well. YVU422 is also supported by the driver, but there only exists a multiplanar V4L2 format, which libcamera is currently unable to map to from the libcamera YVU422 format. This will be fixed later. Signed-off-by: Paul Elder --- Changes in v2: - remove YVU422 - reorder formats --- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp index c070929d..856554b3 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp @@ -209,7 +209,7 @@ void RkISP1Path::stop() namespace { constexpr Size RKISP1_RSZ_MP_SRC_MIN{ 32, 16 }; constexpr Size RKISP1_RSZ_MP_SRC_MAX{ 4416, 3312 }; -constexpr std::array RKISP1_RSZ_MP_FORMATS{ +constexpr std::array RKISP1_RSZ_MP_FORMATS{ formats::YUYV, formats::NV16, formats::NV61, @@ -217,13 +217,14 @@ constexpr std::array RKISP1_RSZ_MP_FORMATS{ formats::NV12, formats::YUV420, formats::YVU420, + formats::YUV422, formats::R8, /* \todo Add support for RAW formats. */ }; constexpr Size RKISP1_RSZ_SP_SRC_MIN{ 32, 16 }; constexpr Size RKISP1_RSZ_SP_SRC_MAX{ 1920, 1920 }; -constexpr std::array RKISP1_RSZ_SP_FORMATS{ +constexpr std::array RKISP1_RSZ_SP_FORMATS{ formats::YUYV, formats::NV16, formats::NV61, @@ -231,6 +232,7 @@ constexpr std::array RKISP1_RSZ_SP_FORMATS{ formats::NV12, formats::YUV420, formats::YVU420, + formats::YUV422, formats::R8, formats::RGB565, formats::XRGB8888,