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,