From patchwork Wed Jan 21 09:07:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 25899 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 B6DB5BDCBF for ; Wed, 21 Jan 2026 09:06:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8131161FCC; Wed, 21 Jan 2026 10:06:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="QD/U79Lr"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5ED04615B2 for ; Wed, 21 Jan 2026 10:06:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/eBtSqyIvEcXcYsJHw8tUd5bM5ffodED4LL6fYZsWA4=; b=QD/U79LrpZxLfW39RA279UAszs d92x9A+e/5nwOF5Ba0oaCFJwb/j4kEtxIqccgzu7XLNrU99WSO7z7ZptTz0Tj6McgYyRbBKeL4hBP 173EEIgUtGhmUPWZNvg4Kk2m1iaQcPVjPCNkTpl9ahI1/2ehm/QsTEsn8NyuaQ8tx8mljSpkjFNEI 9asDtq8I5N8WMiom15CBzP1MfXxcRw+PGHWMDi9HCvAUzN6VX44wiHvWvxqDr1oH/Nx58ipkEzmPE JmaaNdZ9DIRP+q1lX4XPds9ek+rtYMM18PSzEQfOs4GVC2wv78KKNKy4+UTktr+kdCqJOiqq2HHhY vVHKDXbg==; Received: from [49.36.125.126] (helo=uajain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1viUAO-007xDQ-9U; Wed, 21 Jan 2026 10:06:20 +0100 From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Umang Jain Subject: [PATCH 0/3] virtual: colorspace validation fix Date: Wed, 21 Jan 2026 14:37:02 +0530 Message-ID: <20260121090705.274081-1-uajain@igalia.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Series to fix the colorspace setting for different frame generators in the virtual pipeline handler. This has been validated by studying the internal conversions made by libyuv for different frame generators. For MJPEGToNV12: libyuv validates for sYCC colorspace using JPEG header info For ARGB<>NV12: libyuv operates with BT.601 colorspace (ycbcr encoding and range is altered). The tricky part is to select color primaries for TestPatterns frame generators. I have used ColorSpace::Primaries::Rec709 as it is widely used/assumed in RGB domain. I don't have answer to why we still can't use the SMPTE color primary for those. Umang Jain (3): pipeline: virtual: image_frame_generator: Explicitly include libcamera headers pipeline: virtual: Implement colorspace() getter for frame generators pipeline: virtual: Rectify validation of colorspace .../pipeline/virtual/frame_generator.h | 3 +++ .../pipeline/virtual/image_frame_generator.cpp | 9 +++++++++ .../pipeline/virtual/image_frame_generator.h | 5 +++++ .../virtual/test_pattern_generator.cpp | 18 ++++++++++++++++++ .../pipeline/virtual/test_pattern_generator.h | 4 ++++ src/libcamera/pipeline/virtual/virtual.cpp | 8 ++++---- 6 files changed, 43 insertions(+), 4 deletions(-)