From patchwork Tue Sep 3 10:39:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21153 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 74B09BF415 for ; Tue, 3 Sep 2024 10:40:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5DD9C634E6; Tue, 3 Sep 2024 12:40:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="m0xsdydU"; dkim-atps=neutral Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B9DD4634CB for ; Tue, 3 Sep 2024 12:40:21 +0200 (CEST) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-42c79deb7c4so23402165e9.3 for ; Tue, 03 Sep 2024 03:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1725360021; x=1725964821; 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=mYUuAPvrT1GJ4nheyHSKfY/TJmEFlTKrmyJFj0Ccrsk=; b=m0xsdydUdMprZQbxYHy365FklHI42fsxrpZoliwOuz6cxKZgthH5TL1AW6VMp+y6pM dQGUix5LEmfX8ytxJ7N981NjhJRewVjEuGby8suUdGd0SW3FVveKpDCeE7sYREc5Jt+2 L799q89OKdb7zkS2Eybm0+BUJS+lWJiQVZ+KQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725360021; x=1725964821; 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=mYUuAPvrT1GJ4nheyHSKfY/TJmEFlTKrmyJFj0Ccrsk=; b=IaPJChdbAgOGgUt8iGKTJ34FlJiaq+ZfdOiQKTdlVtkyPqnsWpmOvUq+OcKJOWNVvE uujlQYbeMT9oe1rhydb/aZ50WuarTy5Lzd1RR4kP4rwQ5HN7sHybyqqK0BAbM6bf0KwS e4CZbL88NPSdn1lg9myBFxfEhtI5eB9tKAOpm53OrpveyJRUSnZMt7tW1Sls8jl0jHh+ agz43RnR6MNH/8FLiNaXhmS8D8OZXVdbL/lhcHL3GshRLeWwh4I6jApfcZC5XKB9aJdx b7j0nO6Xbb/M5sUgkjTX58fFKmbA6XicWSFZYQlAp625JQbl3MLtqUDk1ZZqs1fxQZuC DYzw== X-Gm-Message-State: AOJu0YzIe1TifLpxlRtrcSlCnLHZYtm7Zs9Gpe6EaDVVn3DZ8mibGKZu b2n6i4SrCOhp5kdJmEx4wVMlN+gMqLsTXu4tAShdPNsow/HuGQQ1Mfle9JTDebh+gsbMg46ctn8 hWQ== X-Google-Smtp-Source: AGHT+IE1LlXLguM/EBwhrmKWuChPiJIpLkH48kR890nOxj8mO5tUUmqnORFK6V62d6xIFa6guorXVA== X-Received: by 2002:a05:600c:1d16:b0:42b:892d:54c0 with SMTP id 5b1f17b1804b1-42c7b5a8db6mr64312815e9.12.1725360020914; Tue, 03 Sep 2024 03:40:20 -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 5b1f17b1804b1-42bb6deb239sm170546025e9.5.2024.09.03.03.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 03:40:20 -0700 (PDT) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH v4 0/3] Add Face Detection Controls Date: Tue, 3 Sep 2024 10:39:16 +0000 Message-ID: <20240903104018.3289112-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-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/1261374 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. v4: - Added support of FaceDetectModeFull and FaceDetectFaceIds - Fixed descriptions of control sizes. v3: Applied fixes according to Jacopo's comments. - Moved the new face detection controls from core to draft. - Amended new controls' descriptions. v2: - Squashed the fourth CL into the last patch, as it's a fix. - Fixed CLs based on checkstyle's suggestions. BR, Harvey Harvey Yang (1): libcamera: android: Add face detection control support Yudhistira Erlandinata (2): libcamera: Add rectangle two-point constructor libcamera: Add face detection controls include/libcamera/controls.h | 6 ++ include/libcamera/geometry.h | 2 + src/android/camera_capabilities.cpp | 45 +++++++++++++-- src/android/camera_device.cpp | 75 +++++++++++++++++++++++- src/libcamera/control_ids_draft.yaml | 85 ++++++++++++++++++++++++++++ src/libcamera/controls.cpp | 6 ++ src/libcamera/geometry.cpp | 14 +++++ 7 files changed, 227 insertions(+), 6 deletions(-)