From patchwork Mon Apr 21 15:51:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 23196 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 2A7EEBE08B for ; Mon, 21 Apr 2025 15:51:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BCF7A68AD0; Mon, 21 Apr 2025 17:51:15 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="KriiuwKN"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D2BE68AC3 for ; Mon, 21 Apr 2025 17:51:13 +0200 (CEST) Received: from pb-laptop.local (185.221.143.16.nat.pool.zt.hu [185.221.143.16]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AFD156D5 for ; Mon, 21 Apr 2025 17:49:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1745250546; bh=cxkDUu7Yp3yktTAtiDrtAFnsmroYEUfgx3CBxyH6qX4=; h=From:To:Subject:Date:From; b=KriiuwKNv/Q89JZRoyYXha6srAK8OV71uG6eI0fcPS6f2xwqEJji9woxv9SohMPYW I+2kpsBqirsu5vYIXoMToorZUPN0d/i3eaZCtfAzH+drZ75Ozox4e+kJfdAK4UIaCq tO3074DrA7HEWyY85WYHMucT8fpySjqkjcdAbb+c= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 0/5] apps: cam: Support {RGB,BGR}888 format Date: Mon, 21 Apr 2025 17:51:04 +0200 Message-ID: <20250421155109.175930-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.49.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" This patch series adds support for the following formats in the SDL sink: * RGB888 -> SDL_PIXELFORMAT_RGB24 * BGR888 -> SDL_PIXELFORMAT_BGR24 This is done by introducing a "generic" texture object that implements update by calling `SDL_UpdateTexture()`, so this can be used for single plane formats. This is then used for YUYV, RGB888, and BGR888. Barnabás Pőcze (5): apps: cam: sdl_texture: Take list of buffers in span apps: cam: sdl_texture: Add single plane generic texture apps: cam: sdl_sink: Use `SDLTexture1Plane` for `YUYV` apps: cam: sdl_texture: Remove `SDLTextureYUYV` apps: cam: sdl_sink: Support `{RGB,BGR}888` src/apps/cam/sdl_sink.cpp | 9 ++++++++- src/apps/cam/sdl_texture.h | 4 ++-- src/apps/cam/sdl_texture_1plane.h | 18 ++++++++++++++++++ src/apps/cam/sdl_texture_mjpg.cpp | 2 +- src/apps/cam/sdl_texture_mjpg.h | 2 +- src/apps/cam/sdl_texture_yuv.cpp | 12 +----------- src/apps/cam/sdl_texture_yuv.h | 9 +-------- 7 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 src/apps/cam/sdl_texture_1plane.h --- 2.49.0