From patchwork Tue Mar 22 02:41:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kate Hsuan X-Patchwork-Id: 15493 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 786E4C0F1B for ; Tue, 22 Mar 2022 02:42:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 22665604D4; Tue, 22 Mar 2022 03:42:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1647916937; bh=h4BHMgiI5B28amHJMMXvmLOVOH702jWuC8HBaN6O15k=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EFHPxrA9BNtk4zsdi2TcDgFq49qlWsty6aLOKoJtlKln3CopXFgqrfvDOpS5ZiKog G5uH3/4t1MXf8eiYvG56DpJCFHwziKXUwCaZvnwBvft781aHBpQJWTuV5w6PPnTtHu 08m1dofy3V8aSgayO9xn1Zyn6uCYZtRkGehgctLX8qLTTP15T1tiFmcjMJEn4ONUmp cqZ3eZ2TEquBgZxjnfmE3cC2rNpgQDY/mBAErneVOHyTBIYQvthM+7AGswCe2bvSRG pPx7h3r3hmOsq1w0gHw9aedQmxExQKmtlAucMWsa6mJpojrIs4TFk3bwvAfmPt666g BVzesuRBCrZ2Q== 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 44FE5604C7 for ; Tue, 22 Mar 2022 03:42:15 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="G9QdJ84K"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647916934; 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: in-reply-to:in-reply-to:references:references; bh=qcb+NA1kw5u7J4J9utP+Unh3CF4y0UiuQDQMbDT1H4s=; b=G9QdJ84Kwhrv9b1dbDIPYoAGdUWfLQR1YbsZobo6q0uyQqVVplXMODJSb4ldXLbR9io2wK 6FAJdJgvIbiRT+7Clofb7pqLqSuoP7pHmRZMSE2LsLjI0FFJoseKs2QGeKq995rRZ+GwuS SfrXTiL5NYWZEQCxH/D/5EUWC0w6Nt0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-453-Pppxhb0tP-u67_TGKvh1hw-1; Mon, 21 Mar 2022 22:42:13 -0400 X-MC-Unique: Pppxhb0tP-u67_TGKvh1hw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ED57A1011597 for ; Tue, 22 Mar 2022 02:42:12 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.39.192.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D052C26E9D; Tue, 22 Mar 2022 02:42:10 +0000 (UTC) To: libcamera devel Date: Tue, 22 Mar 2022 10:41:52 +0800 Message-Id: <20220322024155.6528-2-hpa@redhat.com> In-Reply-To: <20220322024155.6528-1-hpa@redhat.com> References: <20220322024155.6528-1-hpa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hpa@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [libcamera-devel] [PATCH 1/4] ipa: ipu3: af: Introduce AWB and AE lock when AF scanning 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: , X-Patchwork-Original-From: Kate Hsuan via libcamera-devel From: Kate Hsuan Reply-To: Kate Hsuan Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The floating AWB and AE results significantly impact the AF performance since the focus value is determined by the image contrast. This lock is used to suspend the AWB and AE during AF scanning. Signed-off-by: Kate Hsuan --- src/ipa/ipu3/algorithms/af.cpp | 3 +++ src/ipa/ipu3/ipa_context.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp index 0170a372..40a8ddae 100644 --- a/src/ipa/ipu3/algorithms/af.cpp +++ b/src/ipa/ipu3/algorithms/af.cpp @@ -170,6 +170,9 @@ int Af::configure(IPAContext &context, const IPAConfigInfo &configInfo) grid.block_height_log2 = kAfMinGridBlockHeight; grid.height_per_slice = kAfDefaultHeightPerSlice; + /* Initial AE and AWB lock */ + context.configuration.af.requireAeAwbLock = false; + /* x_start and y start are default to BDS center */ grid.x_start = (configInfo.bdsOutputSize.width / 2) - (((grid.width << grid.block_width_log2) / 2)); diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h index 6b7a512e..8cc64c3e 100644 --- a/src/ipa/ipu3/ipa_context.h +++ b/src/ipa/ipu3/ipa_context.h @@ -27,6 +27,7 @@ struct IPASessionConfiguration { struct { ipu3_uapi_grid_config afGrid; + bool requireAeAwbLock; } af; struct {