From patchwork Thu Oct 7 07:21:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanlin Chen X-Patchwork-Id: 14069 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 C774CC323E for ; Thu, 7 Oct 2021 07:22:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 87A7D691BD; Thu, 7 Oct 2021 09:22:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="eT6muaGE"; dkim-atps=neutral Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0AA6569189 for ; Thu, 7 Oct 2021 09:22:17 +0200 (CEST) Received: by mail-pg1-x544.google.com with SMTP id h3so4840918pgb.7 for ; Thu, 07 Oct 2021 00:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JUPdGar9kUJMjHrK5iHzWnm1VLkae7BcpyAAR4GhvVc=; b=eT6muaGEq6ET4W+CdWQ/E+nfui4A5iv2V7987gyZfGPLIhCi66GVhhhVHVCKIxMCfS V7vaXwE6TZnVzdKHLUarX3CYrYwVSjWI8YtvxPh61NoEtrAKTTtoobZF1zJAvpJmlBdY /rqMlfI8WYt3kh6ylfj9gtsbJUojTekkXm4AA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JUPdGar9kUJMjHrK5iHzWnm1VLkae7BcpyAAR4GhvVc=; b=F+k1v3UbG5KNPa5T9nUO6TvFNvpS7P6a+LN42iWv3A1ljQgT75K1P7Cgrqef+KaIuw 0xPXSGL6w2BIbuRQccXnS0IL9F/QipOicvmO21flVb+AY9fSItghapqv5RU0ETHSY+5k jvcJEpnM4k/iy39Q5i38dSVxDzzlWZwjJQ0/RpJW8v2XOwRhlTxgk8EOxsqORrnlYu6W QeIGyXU2km6qUnzJSPWlccQsd0spWB+/Hdqh/2kRteE0XXsQhLvjlKcnT0fkBcpZsWum STUPEC8Yr74EJX7fKyFajsJX7r+LhaenMDMX85qCmv0g8oCDEdTGY5nFuwWU8Jq2yOXE w2FQ== X-Gm-Message-State: AOAM530Po2yqsbg2OuptoWCO+mxXLpVkcHdui+8BnOwzKmHTtC1jNzYn CPI2dg9XYobbPfQsC2N9DbBzy1TD/8l/ZHSUz04= X-Google-Smtp-Source: ABdhPJwjNVj7kuXDuvlR3Sm4cfHlrT18/OGJ2FYL5KFeq2PKWcjzNJUanvpFlboFOM48mP6qZt7iRA== X-Received: by 2002:a62:7904:0:b0:44c:ca08:1956 with SMTP id u4-20020a627904000000b0044cca081956mr250175pfc.47.1633591335327; Thu, 07 Oct 2021 00:22:15 -0700 (PDT) Received: from localhost ([2401:fa00:1:10:db0a:f55:d7cb:95ae]) by smtp.gmail.com with UTF8SMTPSA id t28sm8227975pfq.158.2021.10.07.00.22.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Oct 2021 00:22:15 -0700 (PDT) From: Han-Lin Chen To: libcamera-devel@lists.libcamera.org Date: Thu, 7 Oct 2021 15:21:47 +0800 Message-Id: <20211007072147.1289490-3-hanlinchen@chromium.org> X-Mailer: git-send-email 2.33.0.882.g93a45727a2-goog In-Reply-To: <20211007072147.1289490-1-hanlinchen@chromium.org> References: <20211007072147.1289490-1-hanlinchen@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/3] ipu3: Apply shading adapter as part of AIQ::run2a() 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" Apply shading adapter to correct lens shading for both camera. Signed-off-by: Han-Lin Chen Reviewed-by: Umang Jain --- aiq/aiq.cpp | 3 +++ aiq/aiq_input_parameters.cpp | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/aiq/aiq.cpp b/aiq/aiq.cpp index 708e9d6..24c61cb 100644 --- a/aiq/aiq.cpp +++ b/aiq/aiq.cpp @@ -154,6 +154,9 @@ int AIQ::run2a(unsigned int frame, AiqInputParameters ¶ms, params.paParams.exposure_params = results.ae()->exposures[0].exposure; parameterAdapterRun(params.paParams, results); + params.saParams.awb_results = results.awb(); + shadingAdapterRun(params.saParams, results); + afRun(params.afParams, results); return 0; diff --git a/aiq/aiq_input_parameters.cpp b/aiq/aiq_input_parameters.cpp index 8a53849..36e2b07 100644 --- a/aiq/aiq_input_parameters.cpp +++ b/aiq/aiq_input_parameters.cpp @@ -89,6 +89,15 @@ int AiqInputParameters::configure(const IPAConfigInfo &configInfo) /* Guess from hal-configs-nautilus/files/camera3_profiles.xml#263 */ sensorDescriptor.coarse_integration_time_max_margin = 10; + sensorFrameParams.horizontal_crop_offset = 0; + sensorFrameParams.vertical_crop_offset = 0; + sensorFrameParams.cropped_image_width = configInfo.sensorInfo.analogCrop.width; + sensorFrameParams.cropped_image_height = configInfo.sensorInfo.analogCrop.height; + sensorFrameParams.horizontal_scaling_numerator = 1; + sensorFrameParams.horizontal_scaling_denominator = 1; + sensorFrameParams.vertical_scaling_numerator = 1; + sensorFrameParams.vertical_scaling_denominator = 1; + return 0; } @@ -165,6 +174,9 @@ void AiqInputParameters::setAeAwbAfDefaults() gbceParams.tone_map_level = ia_aiq_tone_map_level_default; gbceParams.frame_use = ia_aiq_frame_use_still; gbceParams.ev_shift = 0; + + /* SA Params */ + saParams.frame_use = ia_aiq_frame_use_still; } } /* namespace ipa::ipu3::aiq */