From patchwork Tue May 6 10:58:23 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: 23335 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 2FDB5C3200 for ; Tue, 6 May 2025 10:58:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5C1E968B32; Tue, 6 May 2025 12:58:33 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="KVFI7m0n"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6EF6B68AD5 for ; Tue, 6 May 2025 12:58:31 +0200 (CEST) Received: from pb-laptop.local (185.221.141.56.nat.pool.zt.hu [185.221.141.56]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AD851129 for ; Tue, 6 May 2025 12:58:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1746529100; bh=a3sSqUImQcOzqh65ybjQoQFpefHtRdzhi8MQLvnhXis=; h=From:To:Subject:Date:From; b=KVFI7m0nJU50C02+Pg5xn2WLHZtVGfw7qyE0nCdC2RrOSmwHSi3QA/nucGkM/Equy 7bvRWLfIxWAf0sEvCc/2VNvQN81BU9/LnZFiFdLVouLlx85M39/2VqRi1VX5BXrRNd 94Z3dHKc2GV/DwWBnwBNzIxd4bYZrWO3mtcJFVTA= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v5 0/4] apps: cam: sdl_sink: Support more RGB and YUV formats Date: Tue, 6 May 2025 12:58:23 +0200 Message-ID: <20250506105827.506569-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" Add support for more RGB and YUV formats in the SDL sink. changes in v5: * conditionally use the platform-independent "X" variants of pixelformats as they first appeared in SDL 2.29.1 changes in v4: * separate format mapping from texture creation changes in v3: * move SDLTexture1Plane implementation from header * add copyright notice changes in v2: * support more formats, not just RGB888, BGR888 * don't specify area to be updated explicitly when calling `SDL_Update{NV,}Texture()` v4: https://patchwork.libcamera.org/cover/23301/ v3: https://patchwork.libcamera.org/cover/23267/ v2: https://patchwork.libcamera.org/cover/23262/ v1: https://patchwork.libcamera.org/cover/23196/ Barnabás Pőcze (4): apps: cam: sdl_texture: Take list of buffers in span apps: cam: sdl_texture: Drop `&rect_` from `SDL_Update{NV,}Texture()` call apps: cam: sdl_texture: Add `SDLTexture1Plane` apps: cam: sdl_sink: Support more single-plane formats src/apps/cam/meson.build | 1 + src/apps/cam/sdl_sink.cpp | 61 +++++++++++++++++++++++------ src/apps/cam/sdl_texture.h | 4 +- src/apps/cam/sdl_texture_1plane.cpp | 17 ++++++++ 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 | 14 +------ src/apps/cam/sdl_texture_yuv.h | 9 +---- 9 files changed, 92 insertions(+), 36 deletions(-) create mode 100644 src/apps/cam/sdl_texture_1plane.cpp create mode 100644 src/apps/cam/sdl_texture_1plane.h --- 2.49.0