From patchwork Fri Apr 25 10:47:01 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: 23263 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 166B5C32A2 for ; Fri, 25 Apr 2025 10:47:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D020D68AD8; Fri, 25 Apr 2025 12:47:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gnSsj8LO"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C041668ACB for ; Fri, 25 Apr 2025 12:47:07 +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 EE8A2124E for ; Fri, 25 Apr 2025 12:47:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1745578025; bh=YhNNqglt/zGP3v8gtTaQBRpgzFQHtZfic8dywdGJx/0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gnSsj8LOb9qmWLX3Pq6PhhXhBl0k78Ha+0RJPs5tqRAsDrWbshZ5vruR77q63mQrU f3ktpMw18lLse1e1r5E7b3i9+apKd1PK5F0Gaodif45fADj77HwFcSS42QfB63y4BP 1aQbvUETtnusyKHGx7AEspQQryh5tXBhcBC0t+Cc= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 2/4] apps: cam: sdl_texture: Drop `&rect_` from `SDL_Update{NV, }Texture()` call Date: Fri, 25 Apr 2025 12:47:01 +0200 Message-ID: <20250425104703.805170-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250425104703.805170-1-barnabas.pocze@ideasonboard.com> References: <20250425104703.805170-1-barnabas.pocze@ideasonboard.com> 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" If the entire texture is to be updated, there is no need to specify the target area explicitly. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/apps/cam/sdl_texture_yuv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/cam/sdl_texture_yuv.cpp b/src/apps/cam/sdl_texture_yuv.cpp index 80a5ec05d..7e2ce3f49 100644 --- a/src/apps/cam/sdl_texture_yuv.cpp +++ b/src/apps/cam/sdl_texture_yuv.cpp @@ -17,7 +17,7 @@ SDLTextureNV12::SDLTextureNV12(const SDL_Rect &rect, unsigned int stride) void SDLTextureNV12::update(libcamera::Span> data) { - SDL_UpdateNVTexture(ptr_, &rect_, data[0].data(), stride_, + SDL_UpdateNVTexture(ptr_, nullptr, data[0].data(), stride_, data[1].data(), stride_); } #endif @@ -29,5 +29,5 @@ SDLTextureYUYV::SDLTextureYUYV(const SDL_Rect &rect, unsigned int stride) void SDLTextureYUYV::update(libcamera::Span> data) { - SDL_UpdateTexture(ptr_, &rect_, data[0].data(), stride_); + SDL_UpdateTexture(ptr_, nullptr, data[0].data(), stride_); }