From patchwork Wed Aug 13 17:02:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 24099 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 EE82DBDCC1 for ; Wed, 13 Aug 2025 17:02:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A09326924F; Wed, 13 Aug 2025 19:02:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="g71xyDo9"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6149F6923C for ; Wed, 13 Aug 2025 19:02:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1755104572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+UCK+Wkjpjj0IWGKmw1oVLEGvo4DAlTYrir+z1IFcqg=; b=g71xyDo9xRJfn0FeDSkMJR1MH+Ttq8/BLlpJlQ0S/icbY8GSst7yK6sWcQu3lomfSQRTv+ yKclI2jql7p1vpHPFg9v5GeJa565+rVYLdap19da6MDlNpq/rt/NyICGXKjqdTBpd5kUJM sYAe1HlaWbLAoNumzgehwedjmevZedA= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-f9AywyQaOOS5ps4PBEOhfg-1; Wed, 13 Aug 2025 13:02:48 -0400 X-MC-Unique: f9AywyQaOOS5ps4PBEOhfg-1 X-Mimecast-MFC-AGG-ID: f9AywyQaOOS5ps4PBEOhfg_1755104567 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2CCBE19560AD; Wed, 13 Aug 2025 17:02:47 +0000 (UTC) Received: from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.45.224.13]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 947611800447; Wed, 13 Aug 2025 17:02:44 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Kieran Bingham , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= , Laurent Pinchart Subject: [PATCH v3 0/1] Reduce statistics image area for GPU Date: Wed, 13 Aug 2025 19:02:39 +0200 Message-ID: <20250813170240.50173-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: PQ9D13e_1diQ9ewJ_-qwZQoCMS8TILYhn3_PBfgurCM_1755104567 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 set on top of GPU ISP patches reduces CPU time spent in processing statistics by about a half. Changes in v3: - Rectangle::croppedBy() dropped, already available methods used instead. - The cropping is applied also in CPU debayering for consistency. Changes in v2: - Safer implementation of Rectangle::croppedBy() as suggested by Kieran. - Test added for Rectangle::croppedBy(). - The comment about not passing x,y clarified. Milan Zamazal (1): libcamera: software_isp: Reduce statistics image area src/libcamera/software_isp/debayer_cpu.cpp | 9 +++++++-- src/libcamera/software_isp/debayer_egl.cpp | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-)