From patchwork Mon Aug 23 09:48:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13429 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 0B24BBD87C for ; Mon, 23 Aug 2021 09:48:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B03B0688A6; Mon, 23 Aug 2021 11:48:29 +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="NouPLg0g"; 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 9C5AD68893 for ; Mon, 23 Aug 2021 11:48:28 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 191162A5; Mon, 23 Aug 2021 11:48:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1629712108; bh=TBdp+o6eQGxSdHS8ni1qZ3t8FCanEs9PcsOC7AbI4ng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NouPLg0gPpgC16+61sMxJ29JtOirEAe6vk3gBmsiaPrrHaPWqN1VT4lNg2+DeynEQ KhEl7Fr+U5Td0UPk7J7aGVRfdagVnlOFVMrUJQlhj+wDTjvHu6a6GlR/yD6OOQ8sjN vRk9VsMYdItsjpjj2KRT6jLKzYpXBDtbDuV9YfWU= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Mon, 23 Aug 2021 18:48:06 +0900 Message-Id: <20210823094806.1434280-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210823094806.1434280-1-paul.elder@ideasonboard.com> References: <20210823094806.1434280-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 2/2] DNI: pipeline: ipu3: Set Sharpness control and control info 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 is to demonstrate reporting and setting Sharpness on ipu3. Signed-off-by: Paul Elder --- src/libcamera/pipeline/ipu3/ipu3.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index a98d7eff..e90659e3 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -50,6 +50,7 @@ static constexpr unsigned int IMGU_OUTPUT_HEIGHT_MARGIN = 32; static constexpr Size IPU3ViewfinderSize(1280, 720); static const ControlInfoMap::Map IPU3Controls = { + { &controls::Sharpness, ControlInfo(0.0f, 1.0f, 0.0f) }, { &controls::draft::PipelineDepth, ControlInfo(2, 3) }, }; @@ -1299,6 +1300,12 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer) cropRegion_ = request->controls().get(controls::ScalerCrop); request->metadata().set(controls::ScalerCrop, cropRegion_); + /* \todo Actually apply sharpness. */ + if (request->controls().contains(controls::Sharpness)) { + float val = request->controls().get(controls::Sharpness); + request->metadata().set(controls::Sharpness, val); + } + if (frameInfos_.tryComplete(info)) pipe()->completeRequest(request); }