From patchwork Fri Jul 3 18:02:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 11642597 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90C536C1 for ; Fri, 3 Jul 2020 18:02:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68A2121D79 for ; Fri, 3 Jul 2020 18:02:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LUnUydZJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68A2121D79 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=LXCSmOwUguB8rMLAt2T/ZmKogME6T6BqGicpKnUzvWs=; b=LUnUydZJgQUFA1aQksOByvu5CD HkL3RMhAYDgqgqFQvahZdwKUuNNkn8PwHGWmSVQ+CUaDn3/1job+78wyd3iw06xYGQ6t7Hix38c79 ufCXIPUZKWASUENLOE7z9eLpZ5oaBFFzuL3PkuU4E1J25Qjhr/U8liBWqmd/13nuCxnIDq3/pGBFY bWMy44Bmi1YvNt5gyN7pWozlvR3spEYe/1GJ9Wz5KIyXwqZLwBun44TvGPDoRrSx8Zog1HfGuqUU+ KivMG7OGY+Sic74RPSDuW+YScvYBPZ6sSe33p1sNck7uLTcxd4qsrDW8ycuyr6Y78ThT9RUwFkTzv iOg7bk0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrQ1W-0003HO-9T; Fri, 03 Jul 2020 18:02:54 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrQ1T-0003EL-5C for linux-rockchip@lists.infradead.org; Fri, 03 Jul 2020 18:02:52 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dafna) with ESMTPSA id 46F042A639D From: Dafna Hirschfeld To: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com Subject: [PATCH v4l-utils v5 0/4] v4l2-ctl: add support to the CSC API Date: Fri, 3 Jul 2020 20:02:35 +0200 Message-Id: <20200703180239.25841-1-dafna.hirschfeld@collabora.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200703_140251_315291_7F14F42E X-CRM114-Status: GOOD ( 11.83 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [46.235.227.227 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mchehab@kernel.org, dafna.hirschfeld@collabora.com, dafna3@gmail.com, tfiga@chromium.org, hverkuil@xs4all.nl, linux-rockchip@lists.infradead.org, helen.koike@collabora.com, sakari.ailus@linux.intel.com, kernel@collabora.com, ezequiel@collabora.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org This patchset is the userspace support for the CSC API RFC v5: https://patchwork.kernel.org/project/linux-media/list/?series=312673 Patches Summary: ================ patch 1 - allows userspace to set the colorspace, quantization, {ycbcr/hsv}_enc and xfer_func fields in the command 'v4l2-ctl --set-fmt-video ..' it also adds the new enumeration flags to the compliance tests. patch 2 - adds the new enumeration flags V4L2_FMT_FLAG_CSC* to the function that prints the string description of the flags. The array fmtdesc_def is replaced by a macro FMTDESC_DEF(enc_type) since the flags V4L2_FMT_FLAG_CSC_YCBCR_ENC,V4L2_FMT_FLAG_CSC_HSV_ENC, have identical value and the string should change according to whether the pixelformat is HSV or not. patches 4, 3 - are similar to patches 1, 2 but for subdevices. So patch 3 adds support for the CSC API for subdevices and patch 4 adds the new enumeration flags V4L2_SUBDEV_MBUS_CODE_CSC* to the framework that prints the related string description Testing: ======= I added a python script to run all possible combinations of CSC settings on vivid: https://gitlab.collabora.com/dafna/v4l-utils/-/blob/rfc-v5-jul-3-abend/contrib/test/vivid_test_csc.py NOTE that the scripts might run for long time (1-2) hours since it iterates all possible combinations of csc conversions in vivid. The commands to run the script: git clone --single-branch --branch rfc-v5-jul-3-abend https://gitlab.collabora.com/dafna/v4l-utils.git # cd v4l-utils/contrib/test/ modprobe vivid python3 vivid_test_csc.py Also added test for rkisp1: https://gitlab.collabora.com/dafna/v4l-utils/-/blob/rfc-v5-jul-3-abend/contrib/test/rkisp1-unit-tests.sh To run the test: git clone --single-branch --branch rfc-v5-jul-3-abend https://gitlab.collabora.com/dafna/v4l-utils.git # cd v4l-utils/contrib/test/ ./rkisp1-unit-tests.sh changes since v4: - adding support to CSC of the colorspace and xfer_func fields in video devices and subdevices. Dafna Hirschfeld (4): v4l2-ctl: vidcap: Add support for the CSC API v4l2: common: add the flags V4L2_FMT_FLAG_CSC* to the list that maps flags to str v4l2-ctl: subdev: Add support for the CSC API in the subdevices v4l2-ctl: subdev: Add the flags to the list of supported mbus formats utils/common/v4l2-info.cpp | 47 +++++++++++++++++---- utils/common/v4l2-info.h | 6 ++- utils/v4l2-compliance/v4l2-test-formats.cpp | 4 +- utils/v4l2-ctl/v4l2-ctl-subdev.cpp | 26 +++++++++--- utils/v4l2-ctl/v4l2-ctl-vidcap.cpp | 39 +++++++++++++++-- utils/v4l2-ctl/v4l2-ctl.cpp | 16 +++++-- 6 files changed, 114 insertions(+), 24 deletions(-)