From patchwork Mon Jul 20 11:10:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 27387 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 A229AC328C for ; Mon, 20 Jul 2026 11:51:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 015B867E2D; Mon, 20 Jul 2026 13:51:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="W0xiBsfU"; dkim-atps=neutral Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8772066122 for ; Mon, 20 Jul 2026 13:51:48 +0200 (CEST) Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-47f785467faso515599f8f.2 for ; Mon, 20 Jul 2026 04:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1784548308; x=1785153108; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=lkUsUTck8f3VLY2iSPQTJ7cTpLuGJVhVK4AubtJfrAc=; b=W0xiBsfUIzfvw6iV8xRMRs1iW0hpxlZ7QqkNDJL+6DbYnFDy35nUCSCYnRH2AWQ8UI 7v+ywjb0IIL/f0Ylwq04Vz70l4vs99JCgliOwl0QBgf6EacrvGQTvDbLCx1i2e4O5Uca qmQr97c/jb6IvbmTbjrvPIauLjmVwzjPI19y8KECTq+omUzg3wR/sKmBXMSvPlLFJE1G dEZsviJk6quaInAYcNgEZdvPqniRjXoCfzb5zXrGMIBsEmvNVuvduoKq3QDI9HjF4An3 +inbFzgajkSons41rqGAYCzEIjz+XhJpRwg+NcOo4/GlFuRvp7YWP8luhPCIFRtwJMN3 j/Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784548308; x=1785153108; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lkUsUTck8f3VLY2iSPQTJ7cTpLuGJVhVK4AubtJfrAc=; b=km4VwxtaHdbTLlhakfXx4siKx/GvWCmrhEBahYmg1OF4nZ2apVZu+xc0vc7dBK1yrY DCiNGx4/rAfkhM1BQNgxx1HCK4vjKGg4/K2JFaznegBCg+FAyM77WcOk4gByrEoc/hKk SfZxli85PMG9jrhDran+kidKKnyO4qjSi5h/ZXv+al10+ts+rNS01LfYMAcxchg31t++ pnNJhTVseSlmOeGwxB6xCi90f+d4982tUbClWqpVZRCgXM8+KM6ZeA8KdnVnxJwhPcfD dfPIq4CLp5HbHO3Es+zxWBRKmTS07xuAKj6/5nFn45uXJkYGRKKfflzDxa/jJ5KMtEWc 4OBg== X-Gm-Message-State: AOJu0YzWFoQSdU+yS+zzZeTh2KMPu3hNZyDBIqI5NdDwjHu75+1QXsWn UfX+p5+5phPfdgHy6hqPvQgtL3H//uqvYGsiMJwuW3tWZxk+DKR+0lyjrY0nSYUAkaJYHD7rbeD /ai1Y X-Gm-Gg: AR+sD102lvM3nkx6mNggIYxVYynqXvWCvgJz1IbyaS2EpfYy5dNt3zuYPLhaoGrmchH cR7KiOtiRJRRMeEVf4ppw+IXYFxc9RJtzJKk7BgF+Jm28wyjdvDKjMFEJN4E42MKoZGzKVS8o3o 1Sj4kJ1UMykdItO5+MlBxKZTZl/SsOgedopqBMnZevmBKnDGL8txdLutl/h6NLAoN2Ltb6OuxgT aQOwisTor9XX8Hv5qm8kwA7B2x7N2QfMFYxWc5yNvf892ovZFyAo+EOh8pWgZkX9NCujKjoAcuo fh9EDmoHXOh3C5ZNL9wXDWACuDsluKLs42lYqwggA5UP0oKEHg4eTUcc7k4Uhr+rORcZKyy3jUU E7lMMvvqM6KusnFl3aVNl5DFp2qwCSa3fhWgyf8Y+Mp+vDuulAKFE8mWqnWLTUzGvMWtbVFzGTb dR7h4jXab3AgfJDXJGN2dShpw8MNtyEscOoJfnIcVlzx9YAvCD9LulgQvNlzs6GCSf+Fq4xwyeD AxedvkX+1uDsAt7LXgKyg== X-Received: by 2002:a5d:5e8d:0:b0:47d:fc33:e6bc with SMTP id ffacd0b85a97d-47f623310ffmr15978042f8f.47.1784548308005; Mon, 20 Jul 2026 04:51:48 -0700 (PDT) Received: from davidp-pi5.pitowers.org ([2a00:1098:3142:1f:4706:89ee:c47e:1087]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63ec7c69sm31270120f8f.17.2026.07.20.04.51.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 04:51:47 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [PATCH v2 0/1] Make Gstreamer prefer non-raw caps Date: Mon, 20 Jul 2026 12:10:06 +0100 Message-ID: <20260720115144.4392-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.47.3 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" Hi Here's a version 2 which incorporates some suggestions from Nicolas which I agree makes things a bit clearer. 1. Raw monochrome formats are identified by being video/x-raw with 1 component, matching the existing bare_structure_from_format function in this file. 2. The comparison is rearranged to use a sorted list, as some other components do. This keeps all the logic in one place and makes it easier to understand. Actually, on point 1 above I do have some misgivings. Treating video/x-raw with 1 component as "monochrome raw" seems a bit controversial as we can't distinguish "raw" greyscale from "processed" greyscale. I wonder a little bit if bare_structure_from_format should categorise the greyscale formats as video/x-bayer but with a format set to something like "mono"? Is that possible? That feels like it's a bit above my pay grade at this point, but in any case could be something for a subsequent commit. Thanks David David Plowman (1): gstreamer: Prefer non-raw (i.e. non-Bayer) formats in caps negotiation src/gstreamer/gstlibcamera-utils.cpp | 125 ++++++++++++++++++++------- src/gstreamer/gstlibcamera-utils.h | 2 +- src/gstreamer/gstlibcamerasrc.cpp | 3 +- 3 files changed, 97 insertions(+), 33 deletions(-)