From patchwork Mon Aug 29 10:04:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17222 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 C0091C3272 for ; Mon, 29 Aug 2022 10:04:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 62B1D61FC1; Mon, 29 Aug 2022 12:04:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1661767466; bh=2V4aE2bqv7in22qVAZyGlIPZ8PzMnehkpuKcLtlBwF0=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=zypwLiqkciYfzm1+jAKn2calY0JvsZQXCsdriti77Hmouz8bSqEzD44cDAGtDiFBZ OjnkojovN3rU7COORK9L2VDceHM8R+Tab+qCS5YLFJmjXTYMwkbuascqH7rpHr2sd6 MvxUNy61bgl7Z3Ry2bXts7sUT/3uNCzS/piqkV+D8tGuW10OZZuiAfP6mFvDizRlFo EjFc99kcvdT7Fb/9eqVQfS3wgjLI5brS4NL48xjSH4s8pIfcecBKgpaWr9kwXHweZk kJo1xEPAf5nBQKU6gCF2/bFRTWj4LRScWI/skjrws9FwM5/6ghRndRarpKch/j0NT3 GQFdfGmMbu7TA== 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 1161361FBB for ; Mon, 29 Aug 2022 12:04:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="S4uStCxZ"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9636B8BD for ; Mon, 29 Aug 2022 12:04:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1661767463; bh=2V4aE2bqv7in22qVAZyGlIPZ8PzMnehkpuKcLtlBwF0=; h=From:To:Subject:Date:From; b=S4uStCxZ3wqe5iVDRf5XHMOE9hd6aTZpRtxIfUYkffK95SJ3NLyTksfQlghBOIAfA mY3xMftXIWsnYIOhtzt9otVYQKYQnCh+uaDRonR3ftuL7wsjtOZGVTXk43SJ+dvwBs 0fY9XcZcONZn1Y3krkriYLkgLU3M0JjV6wkvZYs8= To: libcamera-devel@lists.libcamera.org Date: Mon, 29 Aug 2022 13:04:11 +0300 Message-Id: <20220829100414.28404-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] Misc color space plumbing improvements 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: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This small patch series improves color space plumbing in two areas. Patch 1/3 starts by adding support for color spaces to the uvcvideo pipeline handler, which turned out to be a one-liner. The next two patches improve color space support in qcam. Patch 2/3 first prepares the ViewFinder base class, and patch 3/3 then addresses the GL viewfinder. Only the Y'CbCr encoding and quantization range are taken into account so far, support for the transfer function and primary color chromaticities is left for later. Laurent Pinchart (3): pipeline: uvcvideo: Add color space support qcam: Pass color space to ViewFinder::setFormat() qcam: viewfinder_gl: Take color space into account for YUV rendering src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 5 ++ src/qcam/assets/shader/YUV_2_planes.frag | 27 ++++--- src/qcam/assets/shader/YUV_3_planes.frag | 23 +++--- src/qcam/assets/shader/YUV_packed.frag | 17 ++-- src/qcam/main_window.cpp | 6 +- src/qcam/viewfinder.h | 2 + src/qcam/viewfinder_gl.cpp | 82 +++++++++++++++++++- src/qcam/viewfinder_gl.h | 3 + src/qcam/viewfinder_qt.cpp | 5 +- src/qcam/viewfinder_qt.h | 1 + 10 files changed, 134 insertions(+), 37 deletions(-)