[{"id":20611,"web_url":"https://patchwork.libcamera.org/comment/20611/","msgid":"<04ecbd73-07d6-1a89-aef6-4790891c09de@ideasonboard.com>","date":"2021-10-28T13:34:17","subject":"Re: [libcamera-devel] [PATCH 1/6] ipu3: Use\n\tia_aiq_frame_use_preview as default mode for AIQ","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Han-Lin,\n\nThank you for the patch.\n\nOn 10/28/21 3:33 PM, Han-Lin Chen wrote:\n> The frame use mode is set according to Android Capture Intent in Intel\n> HAL's implememtation. The current default mode ia_aiq_frame_use_still is\n> only used with the single capture request. For preview use case, it has\n> hard time converging AE and AF smoothly. Change the default mode to\n> ia_aiq_frame_use_preview for better user experience.\n\n\nI believe the discussions and understanding I have around frame_use, is \nthat, it is something to be set to be from the applications's (or \nRequest's) side and passed on to the IPA. Is this the way frame_use is \nset the existing HAL implementation on chrome side? I guess I'll need to \ncheck for confirmation.\n\nAnyways, the patch looks fine to me so,\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n>\n> Signed-off-by: Han-Lin Chen <hanlinchen@chromium.com>\n> ---\n>   aiq/aiq_input_parameters.cpp | 10 +++++-----\n>   1 file changed, 5 insertions(+), 5 deletions(-)\n>\n> diff --git a/aiq/aiq_input_parameters.cpp b/aiq/aiq_input_parameters.cpp\n> index 36e2b07..bc87b31 100644\n> --- a/aiq/aiq_input_parameters.cpp\n> +++ b/aiq/aiq_input_parameters.cpp\n> @@ -132,7 +132,7 @@ void AiqInputParameters::setAeAwbAfDefaults()\n>   {\n>   \t/*Ae Params */\n>   \taeInputParams.num_exposures = NUM_EXPOSURES;\n> -\taeInputParams.frame_use = ia_aiq_frame_use_still;\n> +\taeInputParams.frame_use = ia_aiq_frame_use_preview;\n>   \taeInputParams.flash_mode = ia_aiq_flash_mode_off;\n>   \taeInputParams.operation_mode = ia_aiq_ae_operation_mode_automatic;\n>   \taeInputParams.metering_mode = ia_aiq_ae_metering_mode_evaluative;\n> @@ -153,7 +153,7 @@ void AiqInputParameters::setAeAwbAfDefaults()\n>   \taeInputParams.manual_convergence_time = -1;\n>   \n>   \t/* AWB Params */\n> -\tawbParams.frame_use = ia_aiq_frame_use_still;\n> +\tawbParams.frame_use = ia_aiq_frame_use_preview;\n>   \tawbParams.scene_mode = ia_aiq_awb_operation_mode_auto;\n>   \tawbParams.manual_convergence_time = -1.0;\n>   \tawbParams.manual_cct_range = nullptr;\n> @@ -161,7 +161,7 @@ void AiqInputParameters::setAeAwbAfDefaults()\n>   \n>   \t/* AF Params */\n>   \tafParams = {\n> -\t\tia_aiq_frame_use_still, 0, 1500,\n> +\t\tia_aiq_frame_use_preview, 0, 1500,\n>   \t\tia_aiq_af_operation_mode_auto,\n>   \t\tia_aiq_af_range_normal,\n>   \t\tia_aiq_af_metering_mode_auto,\n> @@ -172,11 +172,11 @@ void AiqInputParameters::setAeAwbAfDefaults()\n>   \t/* GBCE Params */\n>   \tgbceParams.gbce_level = ia_aiq_gbce_level_bypass;\n>   \tgbceParams.tone_map_level = ia_aiq_tone_map_level_default;\n> -\tgbceParams.frame_use = ia_aiq_frame_use_still;\n> +\tgbceParams.frame_use = ia_aiq_frame_use_preview;\n>   \tgbceParams.ev_shift = 0;\n>   \n>   \t/* SA Params */\n> -\tsaParams.frame_use = ia_aiq_frame_use_still;\n> +\tsaParams.frame_use = ia_aiq_frame_use_preview;\n>   }\n>   \n>   } /* namespace ipa::ipu3::aiq */","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 C0F23BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 28 Oct 2021 13:34:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1BB29600BA;\n\tThu, 28 Oct 2021 15:34:25 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BE61A600B5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Oct 2021 15:34:23 +0200 (CEST)","from [192.168.43.203] (unknown [157.33.50.95])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 637BE513;\n\tThu, 28 Oct 2021 15:34:21 +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=\"Ralt9AbN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1635428063;\n\tbh=z2q/YfcVlOL1yOKhWY0tv3QgLdS1yExHGl8zWvZP63s=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=Ralt9AbNcQwUK7RfZB2sf3Lr5C4ZJArGf69+GW1k9QrXsAMJ9P+TzD5Uc8AiJ9eM7\n\ta4iS0y2MLpz1ii7RgCzfV/48BQcLZxxS8CI8CiYv+oa5PXfTbqJF1zHq4iUTGA6l18\n\tt6MZmgVWBW3gDkzszChSWDALHS1O1URTckdS5Wb0=","To":"Han-Lin Chen <hanlinchen@chromium.org>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20211028100349.1098545-1-hanlinchen@chromium.org>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<04ecbd73-07d6-1a89-aef6-4790891c09de@ideasonboard.com>","Date":"Thu, 28 Oct 2021 19:04:17 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.10.2","MIME-Version":"1.0","In-Reply-To":"<20211028100349.1098545-1-hanlinchen@chromium.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH 1/6] ipu3: Use\n\tia_aiq_frame_use_preview as default mode for AIQ","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>","Cc":"Han-Lin Chen <hanlinchen@chromium.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20630,"web_url":"https://patchwork.libcamera.org/comment/20630/","msgid":"<CAJAuwM=VH=MDztgZphrbAZ=inW2pC+iJnqZpuD7JKgCf0zBMSg@mail.gmail.com>","date":"2021-10-29T09:14:07","subject":"Re: [libcamera-devel] [PATCH 1/6] ipu3: Use\n\tia_aiq_frame_use_preview as default mode for AIQ","submitter":{"id":98,"url":"https://patchwork.libcamera.org/api/people/98/","name":"Hanlin Chen","email":"hanlinchen@chromium.org"},"content":"Hi Umang, Thanks for the review.\n\nOn Thu, Oct 28, 2021 at 9:34 PM Umang Jain <umang.jain@ideasonboard.com> wrote:\n>\n> Hi Han-Lin,\n>\n> Thank you for the patch.\n>\n> On 10/28/21 3:33 PM, Han-Lin Chen wrote:\n> > The frame use mode is set according to Android Capture Intent in Intel\n> > HAL's implememtation. The current default mode ia_aiq_frame_use_still is\n> > only used with the single capture request. For preview use case, it has\n> > hard time converging AE and AF smoothly. Change the default mode to\n> > ia_aiq_frame_use_preview for better user experience.\n>\n>\n> I believe the discussions and understanding I have around frame_use, is\n> that, it is something to be set to be from the applications's (or\n> Request's) side and passed on to the IPA. Is this the way frame_use is\n> set the existing HAL implementation on chrome side? I guess I'll need to\n> check for confirmation.\n\nIt should reflect the ANDROID_CONTROL_CAPTURE_INTENT enum.\nIn theory, we will need to extend the IPA interface to get the\ninformation from the pipeline handler.\nIn real use cases, The application should set it to\nANDROID_CONTROL_CAPTURE_INTENT_PREVIEW for continuous preview frames,\nand\nonly set it to ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE when the\nuser takes a photo, and resume to preview quickly.\n\nI got to know the following by some experiments with Intel HAL. No\ndocumentation is found -.-.\nAF would be locked once the AIQ finds a focus and never rescan with\nia_aiq_frame_use_still mode.\nAE would have a strong haunting before converging.\n\n>\n> Anyways, the patch looks fine to me so,\n>\n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> >\n> > Signed-off-by: Han-Lin Chen <hanlinchen@chromium.com>\n> > ---\n> >   aiq/aiq_input_parameters.cpp | 10 +++++-----\n> >   1 file changed, 5 insertions(+), 5 deletions(-)\n> >\n> > diff --git a/aiq/aiq_input_parameters.cpp b/aiq/aiq_input_parameters.cpp\n> > index 36e2b07..bc87b31 100644\n> > --- a/aiq/aiq_input_parameters.cpp\n> > +++ b/aiq/aiq_input_parameters.cpp\n> > @@ -132,7 +132,7 @@ void AiqInputParameters::setAeAwbAfDefaults()\n> >   {\n> >       /*Ae Params */\n> >       aeInputParams.num_exposures = NUM_EXPOSURES;\n> > -     aeInputParams.frame_use = ia_aiq_frame_use_still;\n> > +     aeInputParams.frame_use = ia_aiq_frame_use_preview;\n> >       aeInputParams.flash_mode = ia_aiq_flash_mode_off;\n> >       aeInputParams.operation_mode = ia_aiq_ae_operation_mode_automatic;\n> >       aeInputParams.metering_mode = ia_aiq_ae_metering_mode_evaluative;\n> > @@ -153,7 +153,7 @@ void AiqInputParameters::setAeAwbAfDefaults()\n> >       aeInputParams.manual_convergence_time = -1;\n> >\n> >       /* AWB Params */\n> > -     awbParams.frame_use = ia_aiq_frame_use_still;\n> > +     awbParams.frame_use = ia_aiq_frame_use_preview;\n> >       awbParams.scene_mode = ia_aiq_awb_operation_mode_auto;\n> >       awbParams.manual_convergence_time = -1.0;\n> >       awbParams.manual_cct_range = nullptr;\n> > @@ -161,7 +161,7 @@ void AiqInputParameters::setAeAwbAfDefaults()\n> >\n> >       /* AF Params */\n> >       afParams = {\n> > -             ia_aiq_frame_use_still, 0, 1500,\n> > +             ia_aiq_frame_use_preview, 0, 1500,\n> >               ia_aiq_af_operation_mode_auto,\n> >               ia_aiq_af_range_normal,\n> >               ia_aiq_af_metering_mode_auto,\n> > @@ -172,11 +172,11 @@ void AiqInputParameters::setAeAwbAfDefaults()\n> >       /* GBCE Params */\n> >       gbceParams.gbce_level = ia_aiq_gbce_level_bypass;\n> >       gbceParams.tone_map_level = ia_aiq_tone_map_level_default;\n> > -     gbceParams.frame_use = ia_aiq_frame_use_still;\n> > +     gbceParams.frame_use = ia_aiq_frame_use_preview;\n> >       gbceParams.ev_shift = 0;\n> >\n> >       /* SA Params */\n> > -     saParams.frame_use = ia_aiq_frame_use_still;\n> > +     saParams.frame_use = ia_aiq_frame_use_preview;\n> >   }\n> >\n> >   } /* namespace ipa::ipu3::aiq */","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 607DCBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 29 Oct 2021 09:14:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D9B38600BB;\n\tFri, 29 Oct 2021 11:14:19 +0200 (CEST)","from mail-oi1-x235.google.com (mail-oi1-x235.google.com\n\t[IPv6:2607:f8b0:4864:20::235])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 347A3600B4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 29 Oct 2021 11:14:19 +0200 (CEST)","by mail-oi1-x235.google.com with SMTP id y128so12442558oie.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 29 Oct 2021 02:14:19 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"AXbMnG+1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=KwHahGurBQUl1+BYsKjpJQ2X2OTGqIKBiyGogigJSVo=;\n\tb=AXbMnG+1T2ZhguPocK6HvXhAlsDjwIORJ1lhKDxmKNjs++i2Pyx62aBxbRXQCI4DUT\n\tEmyYSzUx22x2+3/CGVycaWhFahGnhS0RA/O+95wxw1/GxkiGjQpVKAgFXFk2mhwJy6Ln\n\ttcP9CxcCORsOWno850Ef6EEAVRMnHbfdpaGi8=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=KwHahGurBQUl1+BYsKjpJQ2X2OTGqIKBiyGogigJSVo=;\n\tb=dHi+1EYRQnAyuftCUi94/2vuFCgAYm/5uzUhP/be7pgo+E0bEl+u4d89HChHTSwDBL\n\ttq22cIFD8ftKNuz9vmPsPB0cDNqIKeAk/KTu3txfQqhdTgv6/KSne2wz4rzWJBmajJgD\n\tnCAeiiIt1gwYdSWMS3v2iqjDkTXYb2jZPOYXtQIgp5mCDY9fmCSKPT+xX2T1XEpQu0eA\n\t51tfWRd/hHM7BKfzQg3rvVl//+UTqRYvDEVfDscGphxyJtRvjVTdPV/Tx3sZH/s/h4Jl\n\tUWkgH8SGYACT7BEiDrwBoZv2B421C+xwE92yHD+j/Z60xUNmFXF+k+VsF74fS8DSqKky\n\tYfsA==","X-Gm-Message-State":"AOAM532w/vFA00iQrA3kH80ZD5ZkFi01JZaEP+w39ROb5gnsehkCHNR8\n\tRwgY+CcqqovXrzMxd7khZrWB3ia7WEv8+q0NoblVGHWzMpG4zykJ","X-Google-Smtp-Source":"ABdhPJwhnww6+ZpDAQvZlpvbUKZonLq4ke8rf8QiVjAiplAhIhDcy6w8wOWHo+27Wq9H+e0b7v06oIFyLHkv68MpL5A=","X-Received":"by 2002:aca:31c7:: with SMTP id\n\tx190mr12688520oix.143.1635498857731; \n\tFri, 29 Oct 2021 02:14:17 -0700 (PDT)","MIME-Version":"1.0","References":"<20211028100349.1098545-1-hanlinchen@chromium.org>\n\t<04ecbd73-07d6-1a89-aef6-4790891c09de@ideasonboard.com>","In-Reply-To":"<04ecbd73-07d6-1a89-aef6-4790891c09de@ideasonboard.com>","From":"Hanlin Chen <hanlinchen@chromium.org>","Date":"Fri, 29 Oct 2021 17:14:07 +0800","Message-ID":"<CAJAuwM=VH=MDztgZphrbAZ=inW2pC+iJnqZpuD7JKgCf0zBMSg@mail.gmail.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 1/6] ipu3: Use\n\tia_aiq_frame_use_preview as default mode for AIQ","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]