From patchwork Fri Aug 23 14:29:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21002 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 1553FBDE17 for ; Fri, 23 Aug 2024 14:32:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 19367633D5; Fri, 23 Aug 2024 16:32:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jSC/7nmO"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D0CA63393 for ; Fri, 23 Aug 2024 16:32:09 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-429da8b5feaso21268225e9.2 for ; Fri, 23 Aug 2024 07:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724423529; x=1725028329; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=A3fjfKM7iM4PTRCTK9gtf/INEyy6PvKFQeDHjtlV++0=; b=jSC/7nmOxyDwZpt3N4yLwALb+vOEOkuAs5tDdIT6mys+xwCmM7P1vq5joVOleTfugw nI+lolN9+dj8jevXDcxXYwBa6JpEC4i9nGBqr9eqYWT/a8f0XSP+mC9QCLSGG+Pf53Mh uVhSOKbZCAiawAfj+WPAF3RDG0KVbyixB8O48= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724423529; x=1725028329; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A3fjfKM7iM4PTRCTK9gtf/INEyy6PvKFQeDHjtlV++0=; b=rVWtQ5j/S1YUIq6fhU+7o5SQPhO4+ovju34BaTiiFt5dAVO24XiEZ15aPE19HjZ0aw jIWk7F7NZ8fTD7b1lm17LZKsYRn0+VFnKj7aPh0t+kngjPg5RQQWDN/TuwEGqeAOKarE 1yWoiW8hClMM3vbD9VegAWdWmnimsYA6kRXbSz/98WrENk2gkBbUvw9UTv30Cz8K5orF 6wktVlGnTAKZp2irfEnuUVMDQ+23RHZQmxuFNcwJDI60WXwZrkr9eopoYRoa0GLHEeDn GVfTNimhCFrNThgTEimsYXMq4agpg8V8Qk/ErSZ++wdjk4yd4AnWty2TW5vLQc1o3ogK AfvQ== X-Gm-Message-State: AOJu0Yy0lR6rPDg75GKXi9Sh9uL2G8TgabBkdHcGd4HP3bEScWJZbPB3 vl60PR/CiAw6c0ai1Dy1zNbvLwQ6DtdVqriR2Mhbk9ZsB9xMPWSJNbEB7OPNLyTdoi/lmadgDVD Xzg== X-Google-Smtp-Source: AGHT+IFUOQqgi5ZENf9l89pRiu7C1GL2e8n9f2U3n1gvqOFyqv5bFqSyNsza0d1/NJ66VzLSv5aMOQ== X-Received: by 2002:adf:f001:0:b0:371:7c68:7cd7 with SMTP id ffacd0b85a97d-373118e33d2mr1916328f8f.56.1724423528406; Fri, 23 Aug 2024 07:32:08 -0700 (PDT) Received: from chenghaoyang-germany.c.googlers.com.com (161.126.77.34.bc.googleusercontent.com. [34.77.126.161]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb66sm4300627f8f.84.2024.08.23.07.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 07:32:08 -0700 (PDT) From: Harvey Yang X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH v2 0/3] Add Face Detection Controls Date: Fri, 23 Aug 2024 14:29:07 +0000 Message-ID: <20240823143205.2668765-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog 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" Hi folks, This series of patches adds face detection controls in the control ids, the corresponding usages, and a c'tor of libcamera::Rectangle to construct it easiler with face detection results. It passed gitlab pipeline checks: https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1256394 This is one of the series cherry-picked from cros mtkisp7 branch. The corresponding CLs in cros are: https://chromium-review.googlesource.com/c/chromiumos/third_party/libcamera/+/4741266 https://chromium-review.googlesource.com/c/chromiumos/third_party/libcamera/+/4741267 https://chromium-review.googlesource.com/c/chromiumos/third_party/libcamera/+/5669229 https://chromium-review.googlesource.com/c/chromiumos/third_party/libcamera/+/5669232 The usages in pipeline handler mtkisp7 will be added later. The checkstyle's suggestion on the second patch is ignored, as it changes the style of previous code. v2: - Squashed the fourth CL into the last patch, as it's a fix. - Fixed CLs based on checkstyle's suggestions. BR, Harvey Yudhistira Erlandinata (3): libcamera: Add rectangle two-point constructor libcamera: Add face detection controls libcamera: android: Add face detection control support include/libcamera/controls.h | 6 +++ include/libcamera/geometry.h | 10 +++++ src/android/camera_capabilities.cpp | 41 ++++++++++++++++-- src/android/camera_device.cpp | 64 +++++++++++++++++++++++++++-- src/libcamera/control_ids_core.yaml | 42 +++++++++++++++++++ src/libcamera/controls.cpp | 6 +++ src/libcamera/geometry.cpp | 11 ++++- 7 files changed, 171 insertions(+), 9 deletions(-)