From patchwork Mon Apr 28 08:44:16 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: 23269 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 07DD6C32A2 for ; Mon, 28 Apr 2025 08:44:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 077F268ADA; Mon, 28 Apr 2025 10:44:30 +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="q9N2/Bm3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 93E9668ACF for ; Mon, 28 Apr 2025 10:44:22 +0200 (CEST) Received: from pb-laptop.local (185.221.141.190.nat.pool.zt.hu [185.221.141.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9A8798FA; Mon, 28 Apr 2025 10:44:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1745829857; bh=7bTcM2mriVp85165ZMVr91wnqeD7M//VtRJQROS3rok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q9N2/Bm33/hKdXyruVMDevDKi8O+BxXWvTAWEnROcdX6gWIcPReeH/xlaOxfmPfNL yV0gmmReGmKZyqFXbmJwbJU0xTwd1y0Hgg0Kx2U5ds8JVvdnr7mFzzReldWNTozxf9 ko5mXskoXQXRVbetzxngw/kL/xKU+WmJvUKCk0iA= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham , Laurent Pinchart Subject: [PATCH v3 2/4] apps: cam: sdl_texture: Drop `&rect_` from `SDL_Update{NV, }Texture()` call Date: Mon, 28 Apr 2025 10:44:16 +0200 Message-ID: <20250428084418.1251085-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250428084418.1251085-1-barnabas.pocze@ideasonboard.com> References: <20250428084418.1251085-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_); }