From patchwork Wed Mar 22 16:13:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18438 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 7A488C0F1B for ; Wed, 22 Mar 2023 16:13:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CC9686270D; Wed, 22 Mar 2023 17:13:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1679501594; bh=VeEbf9CkDtaalApbHzYZsmFGUroUhCtEnoZEETtWPRo=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rUdMLCWi7ut+OrkJeK3X1oG+I3hog3yUAsjk1MehNJObP93c/HiiWGFtJphgCuzkq p8n1duP2Q6Grwkn83Ty5RxAaRzxaUV/G7T3waP/WKkRMJKU6vVXkkM8VRoC7bn8ieg 7V8JbhoLCdx3QRlcR59Q0QTSufZVRsmmohb2KRLcc42toRWC00E9AoYi62N1TD2ih3 pl306f/5Ts0HiEfT7ImqLw0O2FhfHHz6nHJbYrIrEqkOPD+5oFLBxsR4mdf4m+d3ep uW9bEoP1MUN0r3JEe3Xvhq+ZD6oivmaEqN3dwCFIGP27vvJRB5rDkr3ZpV5dDZtAzc Rm1SxWOqV0TQA== Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6458061ECE for ; Wed, 22 Mar 2023 17:13:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="EwzC38fE"; dkim-atps=neutral Received: by mail-il1-x12f.google.com with SMTP id bc5so4402943ilb.9 for ; Wed, 22 Mar 2023 09:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1679501591; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+3fNWDtxPzB76/+PMMf6SEtU/kX5Nc/IMTqeFQ1cog8=; b=EwzC38fEaerV8g/v5rgeTqajNNlOTEXgwJ2dx1XJ+i48vVmR02mF1x+/NoH6yQyxPz CZyLYpAwDuhiU2mICnxChfGqbxVnKMyuSld7SusSQMejod53QEp28ye/Kg4xcBKESdSo f0VXJuP7aAQLlJkpP+6x5AdSOYMZnIKzwCfolWL6H0znfVgN/cKcECOf82QH+uaJJGPd wO4gDAyu+0r4K3mlRRi3DNmyZqPbKOiKhFR+rpUiiXAzQdJcFDrr9Mx2iVzpOB0XKhxJ fyEVdZkw2kAb8NJAvB5rmJLCl51sME1fhkIamAf6DupT9H5izO31gDB4jKaXTHft7F0T h1xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679501591; 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=+3fNWDtxPzB76/+PMMf6SEtU/kX5Nc/IMTqeFQ1cog8=; b=p/wb/Z1IwdLaUH2aObI7WLg6aNteMj2OrEe+F+D2XHEjwnfFxCUWj6KSTS6Fsqh74/ sfT//EHTbL2cDGZfl4HS3dN99rQMqNMi5DN2k6djmK2n2dolFioUlenCCnYOnlMffaXz Gf8P+eB3l/yGRD99GapG9idM5Q/WFqPUJVUweGavKBoPLIKzcJ1j0pEVuBIlzoyA3dwm fcD6qjPx25hFt43uiDcd70JHcK7nDOECJI37jwwM6uyHrqjlvbycWygaf02HhUK3gcc7 oTGRMzMN3RrZgSjr8adHyRuNy7zTMynp15VO669/ivfjenlM2NOib/cVbXmWN1Ge0Gj3 7ubw== X-Gm-Message-State: AO0yUKUkMjFftXQXqLvaezIXnvKN1Z08n1PvVhHiF9+YJ6PoAaGZ+n/m vGOBdbhqxWwIj/LT+pvMPMI6AaQy+Q1NQFxEDxZp6g== X-Google-Smtp-Source: AK7set8soK0dAF3OgqYNUAFmMmLGTTbHxK27yq3SE1QwvqdCQN8wk3NRv+Abo+OqjzsDoYYxEoAyng== X-Received: by 2002:a92:d346:0:b0:317:9768:fbb4 with SMTP id a6-20020a92d346000000b003179768fbb4mr5249487ilh.31.1679501590817; Wed, 22 Mar 2023 09:13:10 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id n24-20020a02a918000000b004050d92f6d4sm5100119jam.50.2023.03.22.09.13.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 09:13:10 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 22 Mar 2023 16:13:14 +0000 Message-Id: <20230322161317.18055-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 0/3] Raspberry Pi: Sensor limits 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: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, This small series makes a small change to how we handle sensor control limits, particularly gain and exposure. With this series, we introduce an explicit SensorLimits structure that stores the limits. The AGC algorithm has a new member function that accepts this structure, replacing the existing setMaxShutter() function. This allows the AGC to corretly handle limits of gain values which it currently does not do - specifically for the imx708 that has a minimum gain of 1.12x. Thanks, Naush Naushir Patuck (3): ipa: raspberrypi: Replace setMaxShutter with setSensorLimits in AGC ipa: raspberrypi: Populate SensorLimits ipa: raspberrypi: Ensure shutter speed and gain are clipped in the AGC .../raspberrypi/controller/agc_algorithm.h | 11 +++- src/ipa/raspberrypi/controller/rpi/agc.cpp | 53 +++++++++++---- src/ipa/raspberrypi/controller/rpi/agc.h | 7 +- src/ipa/raspberrypi/raspberrypi.cpp | 66 +++++++++++-------- 4 files changed, 92 insertions(+), 45 deletions(-)