From patchwork Thu Aug 4 10:45:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 16961 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 CE42BBE173 for ; Thu, 4 Aug 2022 10:45:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 92AB363331; Thu, 4 Aug 2022 12:45:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659609956; bh=+XYWrQXBC1YNIdr5eRCe+J2mIAO8PoT4lguqeMhGZxc=; 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=OmLlAbN/taN2SjiaYWvz49QJBXnig7b2m8hLQmuE+DtEO3jQ/khILGYQ9Vtlfe4CM OnA23zxW8YWqdm5bQjCblOu4yJoe6Oywd0f2xdhNaL6PLEfd1HHReW37l7riCFxZwY j/Sx6uHoYCnohTm6zvzRHoHktmOicEv169UKVxC9mEtMWN6ue2JXUVve5SLcKaocDS miMwLm1aACfFQ4b5wTo1On/PFM1YQ8S1NvujNCPgZKit3TjNps5Pxx/dzok9vo551Y OFwDQw0U7cmN7kehoecQ3Ejen0BqIZ5xjMihCfk2g0qgUEXM0NDHI0IoJF2WJUh5v7 2PUARgrkEBA6A== Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 987406330D for ; Thu, 4 Aug 2022 12:45:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="B8YcjTNi"; dkim-atps=neutral Received: by mail-wr1-x42d.google.com with SMTP id q30so20346862wra.11 for ; Thu, 04 Aug 2022 03:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xlzw8YCSMK5F64SjR8GkML66gVdV8/mu1+tBgl+fyk0=; b=B8YcjTNihQqpXx4/Rdy8e/NzBaJGzYa2erD2I2qU2k3CXBmyHjfZ9x9ZIKpi9vl72E OOnpUCZtF8L6MH1V1WAQkkRdhTa8prD/urCEnafkoYJVCPdy/5LZnUuEXbvYjRQvO2Js z84QJ4DWx7CwpSHiQrtQgTn2V38+deQrVimIsgTodCSbNtv3dHUYE7fz2iJxuTJfLymB XDnFqG/UzYqItBuDCmbwBiS0Uw4Ub4QEN3gbt11QcRO9m9IPUbtGk85RIRe+Ejna8i/f wrSBGF4TVmIAMI5+sBQ35rKDCGNQu89HqYWtT3ioT2Ii+fci3ioSmre5CFZSAGz4dsi2 uNHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xlzw8YCSMK5F64SjR8GkML66gVdV8/mu1+tBgl+fyk0=; b=GLrk2VDhNNmC4KkMlqxkRGdo5YvvdPnsIqMenivMe8it7WkxzhnliZg6+dQ/9il3nC 9ZAc/Jdf9YNMOH1gGZmJmeTx9KnPuwe16nfJTvai4MoAY8NKuw+lsJd3Kf+0632fBYb1 mAs60hvzHaC7+IBpjUXUwz5I3cu/nLwY8zztREnuBLVvKRHidRVDi5pwFiOZgrw3qk3e y2WvBQKDzRWhqFAfJUKQ5ZXPhHWEtdIGOtMQjhOUCks2yGbA4T17JV4gw8PbluYQxWtb J1edQC8cvzdrBT+6Qz4CfeIjLPCw0Tw3WJjzXDJ0kBIW6DmQf5mCr/WFqEyFEp2M7bEb cHug== X-Gm-Message-State: ACgBeo0cWe+lrSTLO0rbZLpm1rOFAqFwk9m2Vkzuegak+z3GHRjKURMa OFPMqhr7H95Cx3GLvafWTaiFqf+U3Cnm+tM1 X-Google-Smtp-Source: AA6agR63yj3DEm9qx088iJqn+wJzYa7pcKpAuhtNgUzGS/UUaYPXXxpxhD7618OuTcWoiUMCr+yYeA== X-Received: by 2002:a5d:6102:0:b0:220:6382:eab1 with SMTP id v2-20020a5d6102000000b002206382eab1mr987738wrt.539.1659609955051; Thu, 04 Aug 2022 03:45:55 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id e27-20020adfa45b000000b0021e519eba9bsm829695wra.42.2022.08.04.03.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 03:45:54 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Aug 2022 11:45:49 +0100 Message-Id: <20220804104550.4600-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220804104550.4600-1-david.plowman@raspberrypi.com> References: <20220804104550.4600-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] libcamera: formats: Fix colour encoding for "R" raw greyscale formats 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: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" These are being used for raw monochrome sensors and so the colour encoding should be "raw". Signed-off-by: David Plowman --- src/libcamera/formats.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 283ecb3d..7b98fef2 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -531,7 +531,7 @@ const std::map pixelFormatInfo{ .multi = V4L2PixelFormat(), }, .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, .packed = false, .pixelsPerGroup = 1, .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }}, @@ -544,7 +544,7 @@ const std::map pixelFormatInfo{ .multi = V4L2PixelFormat(), }, .bitsPerPixel = 10, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, .packed = false, .pixelsPerGroup = 1, .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, @@ -557,7 +557,7 @@ const std::map pixelFormatInfo{ .multi = V4L2PixelFormat(), }, .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, .packed = false, .pixelsPerGroup = 1, .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, @@ -570,7 +570,7 @@ const std::map pixelFormatInfo{ .multi = V4L2PixelFormat(), }, .bitsPerPixel = 10, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, .packed = true, .pixelsPerGroup = 4, .planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }}, From patchwork Thu Aug 4 10:45:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 16962 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 A8F51BE173 for ; Thu, 4 Aug 2022 10:45:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6210463329; Thu, 4 Aug 2022 12:45:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659609958; bh=8TVRQSACYfmAjQJvvLgZt1+8mfS1qTQpkH9SddNi3rA=; 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=aUPrgzWdye+60J1YxivqzJr6dl/+iNH3ogT410r7DSsgGdfDW32CwoyaAXpP1aQdf WvUEnPc7sTXKtXP6bmKbT52TZvbfYiWUl6B6Qt0K+8Ntwevm9Lh66ILct6fJYYSIeR 62UETS9G+WiKRhpGDCRvOFBUp5mqJs9W9fSS5zV9rCN5TrpvoK4nYdyWG19O5jh5l2 ybdXVwyzlpXP/kMqjAvo1SP4fRVeM7dsy4bsC0x/ufEZP6qhAHcWTOB6yXyBjsFBKi hJImwYN/WT0xQ1f+FslVJnFUJ0s7lJvvWsOU/Ur14NY3GJWdWtzbYmtxjxD86hD6X/ YshOmyeWytH0g== Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5DC796332F for ; Thu, 4 Aug 2022 12:45:56 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="C8BfLDZw"; dkim-atps=neutral Received: by mail-wr1-x433.google.com with SMTP id z12so14663681wrs.9 for ; Thu, 04 Aug 2022 03:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mCadCaPYG6Zx7Zz8FATk1GdedB7aA30sm4oz5MW/VNE=; b=C8BfLDZwRFxJxwRn8oeKVcqNgPyrGLQ3hBnbuGxbNeSOv32pKC4ii12s2NystzxSFp HsPeHolvm/2dLeVUCyZpDA4TZM7AdHoGP1LhUYAFWmqIrVrhq/3KsZRUZcWRhZGjskEv lvgbN0ju6aqLg0aZ+nN9Wk+Xl7JPtHy1E6tSwjtdqfxtIX9HxmGHZfi1CswyCERxOwPj or425RY8dPJB7pRWMCYTtOOhV2L5m1PMfb9Gwf1pJkXg8YuUPLCXGWqkE5TyJKKOaUbT iub249ZgneppXH1sOGEe6Rdyyod+GK0z9uEMy5qQChI+x1EIkRRLRrOuLBFGFv9Ps2km dtTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mCadCaPYG6Zx7Zz8FATk1GdedB7aA30sm4oz5MW/VNE=; b=hYnPmkw05wcmlO4oycwr+DYBUdbidvFuKVtLXD+VnNcY43TJWx2NXGnXwGV2trMbO7 Xo6/TOga8OVOL9M7iocyaHPS19U3FMFbbNDDNo/6H9sP10Sl38PLtCoF+xbM3hxrteoW j3h/ws6TWduxfdl2+orTyspxLYh3dUsW1cXg/f8D7TTC0bcB/Ge7bGbdOx5Ep6jOotZ0 VFatNAYzUFjNEBXrlxrbP4V6qoQzliKglfIPz3QINFUlOmDLzwgOX5nJkz5HWYAAIH1l l06AeZ0LWuraodZ8a2/UF5o4X/sEEadmv3FKQzzV1lVaDZFZxGpd1QfCmwEqLseOeWJY HIBw== X-Gm-Message-State: ACgBeo0lGFIktCvhHJHCVScv0TFMK4G2qoEfilxDRm7q06wR8TK//0Tg mhlfWQ6fS9vj785Znw/RZdJwA2VhZUNehZkH X-Google-Smtp-Source: AA6agR7rlm/wSztKuWYR0Vluzewrzm5D3jg7WDOAmKI06TeEeF63aM5A99MmXIlIInjpyBKz3l6vdA== X-Received: by 2002:adf:db8e:0:b0:21e:3fff:6bae with SMTP id u14-20020adfdb8e000000b0021e3fff6baemr970182wri.184.1659609955818; Thu, 04 Aug 2022 03:45:55 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id e27-20020adfa45b000000b0021e519eba9bsm829695wra.42.2022.08.04.03.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 03:45:55 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Aug 2022 11:45:50 +0100 Message-Id: <20220804104550.4600-3-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220804104550.4600-1-david.plowman@raspberrypi.com> References: <20220804104550.4600-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] libcamera: Correct typos and omissions for packed 10-bit raw monochrome format 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: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" One typo is corrected, and this format is added to one further table where it was missing entirely. Signed-off-by: David Plowman Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/libcamera/formats.cpp | 2 +- src/libcamera/v4l2_pixelformat.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 7b98fef2..cc8f652a 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -564,7 +564,7 @@ const std::map pixelFormatInfo{ } }, { formats::R10_CSI2P, { .name = "R10_CSI2P", - .format = formats::R10, + .format = formats::R10_CSI2P, .v4l2Formats = { .single = V4L2PixelFormat(V4L2_PIX_FMT_Y10P), .multi = V4L2PixelFormat(), diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp index bdcdc3be..8d1fde5d 100644 --- a/src/libcamera/v4l2_pixelformat.cpp +++ b/src/libcamera/v4l2_pixelformat.cpp @@ -129,6 +129,8 @@ const std::map vpf2pf{ { formats::R10, "10-bit Greyscale" } }, { V4L2PixelFormat(V4L2_PIX_FMT_Y12), { formats::R12, "12-bit Greyscale" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_Y10P), + { formats::R10_CSI2P, "10-bit Greyscale Packed" } }, /* Bayer formats. */ { V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8),