[{"id":20262,"web_url":"https://patchwork.libcamera.org/comment/20262/","msgid":"<163454810548.1018219.8517782735146206237@Monstersaurus>","date":"2021-10-18T09:08:25","subject":"Re: [libcamera-devel] [PATCH v3 3/3] ipu3: Apply shading adapter as\n\tpart of AIQ::run2a()","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Han-Lin,\n\nSorry for the delay, - as you might have seen there were some issues\ntesting the IPA on Friday.\n\nBut I have now tested this series, and will push it to master for the\nExternal Intel IPU3-IPA.\n\n--\nKieran\n\n\nQuoting Han-Lin Chen (2021-10-14 08:05:33)\n> Populate shading adapter input parameters and run it as a part of\n> run2a() to correct lens shading for the camera.\n> \n> Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n> ---\n>  aiq/aiq.cpp                  |  3 +++\n>  aiq/aiq_input_parameters.cpp | 12 ++++++++++++\n>  2 files changed, 15 insertions(+)\n> \n> diff --git a/aiq/aiq.cpp b/aiq/aiq.cpp\n> index 708e9d6..24c61cb 100644\n> --- a/aiq/aiq.cpp\n> +++ b/aiq/aiq.cpp\n> @@ -154,6 +154,9 @@ int AIQ::run2a(unsigned int frame, AiqInputParameters &params,\n>         params.paParams.exposure_params = results.ae()->exposures[0].exposure;\n>         parameterAdapterRun(params.paParams, results);\n>  \n> +       params.saParams.awb_results = results.awb();\n> +       shadingAdapterRun(params.saParams, results);\n> +\n>         afRun(params.afParams, results);\n>  \n>         return 0;\n> diff --git a/aiq/aiq_input_parameters.cpp b/aiq/aiq_input_parameters.cpp\n> index 8a53849..36e2b07 100644\n> --- a/aiq/aiq_input_parameters.cpp\n> +++ b/aiq/aiq_input_parameters.cpp\n> @@ -89,6 +89,15 @@ int AiqInputParameters::configure(const IPAConfigInfo &configInfo)\n>         /* Guess from hal-configs-nautilus/files/camera3_profiles.xml#263 */\n>         sensorDescriptor.coarse_integration_time_max_margin = 10;\n>  \n> +       sensorFrameParams.horizontal_crop_offset = 0;\n> +       sensorFrameParams.vertical_crop_offset = 0;\n> +       sensorFrameParams.cropped_image_width = configInfo.sensorInfo.analogCrop.width;\n> +       sensorFrameParams.cropped_image_height = configInfo.sensorInfo.analogCrop.height;\n> +       sensorFrameParams.horizontal_scaling_numerator = 1;\n> +       sensorFrameParams.horizontal_scaling_denominator = 1;\n> +       sensorFrameParams.vertical_scaling_numerator = 1;\n> +       sensorFrameParams.vertical_scaling_denominator = 1;\n> +\n>         return 0;\n>  }\n>  \n> @@ -165,6 +174,9 @@ void AiqInputParameters::setAeAwbAfDefaults()\n>         gbceParams.tone_map_level = ia_aiq_tone_map_level_default;\n>         gbceParams.frame_use = ia_aiq_frame_use_still;\n>         gbceParams.ev_shift = 0;\n> +\n> +       /* SA Params */\n> +       saParams.frame_use = ia_aiq_frame_use_still;\n>  }\n>  \n>  } /* namespace ipa::ipu3::aiq */\n> -- \n> 2.33.0.882.g93a45727a2-goog\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 181CAC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Oct 2021 09:08:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8D06D68F55;\n\tMon, 18 Oct 2021 11:08:29 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1551B604FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Oct 2021 11:08:28 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AC0AE18F1;\n\tMon, 18 Oct 2021 11:08:27 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"sAiO2G0H\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634548107;\n\tbh=r0dxawkmXFnUgCBj0aV4b14a/57Fs1yMPO6mlOOo+Rw=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=sAiO2G0HlddVGa0KRYLzHapbbizyZb667DhmJ8ocDg83fp/z3Na5yrhVTLM2lUs9w\n\tlbVQxWcVyGVHR8sJJCy/cSEvIWGDKcaT1PwcTXXTVN13Mrdn+QhWAymCnZ4PwmXsdk\n\tk0jpGYRP3xaa4UkJATKPL6XVcN7y6tJ8/H2rAIl8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211014070533.3720964-3-hanlinchen@chromium.org>","References":"<20211014070533.3720964-1-hanlinchen@chromium.org>\n\t<20211014070533.3720964-3-hanlinchen@chromium.org>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Han-Lin Chen <hanlinchen@chromium.org>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 18 Oct 2021 10:08:25 +0100","Message-ID":"<163454810548.1018219.8517782735146206237@Monstersaurus>","User-Agent":"alot/0.9.1","Subject":"Re: [libcamera-devel] [PATCH v3 3/3] ipu3: Apply shading adapter as\n\tpart of AIQ::run2a()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]