[{"id":38304,"web_url":"https://patchwork.libcamera.org/comment/38304/","msgid":"<85h5r31yf7.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-02-26T12:28:44","subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Javier,\n\nthank you for the patch, tuning files are much needed.\n\nJavier Tia <floss@jetm.me> writes:\n\n> Add a sensor-specific tuning file for the OmniVision OV2740, commonly\n> found in Intel IPU6 laptops (ThinkPad X1 Carbon, XPS, Surface).\n>\n> The tuning enables all Simple IPA algorithms including AGC, AWB, black\n> level correction, and a color correction matrix calibrated for 6500K.\n> The CCM compensates for the green bias inherent in Bayer demosaicing\n> (the GRBG pattern has 2x green pixels vs red/blue).\n>\n> Without this file, libcamera falls back to uncalibrated.yaml which\n> produces a heavy green tint on the OV2740.\n\nI wonder what's the cause of the green tint really.  I'm not sure I\nunderstand the Bayer pattern argument: Software ISP uses the grey world\nwhite balance algorithm that basically takes a look at average colour\nchannel values; how many pixels represent each of the colours doesn't\nhave direct influence on the averages.  If there is a strong tint then\nsomething may be wrong.  Or it's perhaps a property of the sensor.  We\nknow the current processing has flaws and it's a priority to get them\nfixed.  Understanding the current problems would help.\n\nThere may be other variables like incorrect black level (which is\nauto-guessed when its value is not specified in the tuning file) or its\nincorrect handling.\n\n> Signed-off-by: Javier Tia <floss@jetm.me>\n> ---\n>  src/ipa/simple/data/meson.build |  1 +\n>  src/ipa/simple/data/ov2740.yaml | 22 ++++++++++++++++++++++\n>  2 files changed, 23 insertions(+)\n>  create mode 100644 src/ipa/simple/data/ov2740.yaml\n>\n> diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build\n> index 92795ee4..e3e4de74 100644\n> --- a/src/ipa/simple/data/meson.build\n> +++ b/src/ipa/simple/data/meson.build\n> @@ -1,6 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  conf_files = files([\n> +    'ov2740.yaml',\n>      'uncalibrated.yaml',\n>  ])\n>  \n> diff --git a/src/ipa/simple/data/ov2740.yaml b/src/ipa/simple/data/ov2740.yaml\n> new file mode 100644\n> index 00000000..b48d50ce\n> --- /dev/null\n> +++ b/src/ipa/simple/data/ov2740.yaml\n> @@ -0,0 +1,22 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +#\n> +# OmniVision OV2740 tuning for libcamera Simple/SoftISP pipeline.\n> +#\n> +# Tested on ThinkPad X1 Carbon Gen 10 (Alder Lake) with Intel IPU6 ISYS.\n> +# The CCM corrects the green bias inherent in Bayer demosaicing (2:1 green\n> +# to red/blue pixel ratio in the CFA). Values were iteratively calibrated\n> +# from captured frame measurements under 6500K lighting.\n> +%YAML 1.1\n> +---\n> +version: 1\n> +algorithms:\n> +  - BlackLevel:\n> +  - Awb:\n> +  - Ccm:\n> +      ccms:\n> +        - ct: 6500\n> +          ccm: [ 2.49, -0.91, -0.26,\n> +                -0.30,  1.20,  0.10,\n> +                 0.07, -0.80,  2.19 ]\n> +  - Adjust:\n> +  - Agc:","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 52AF3BE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Feb 2026 12:28:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7092E622E9;\n\tThu, 26 Feb 2026 13:28:52 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 958EA620FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Feb 2026 13:28:50 +0100 (CET)","from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n\t[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-410-MyceJP-YOlOywF59kU-sLQ-1; Thu, 26 Feb 2026 07:28:48 -0500","by mail-wm1-f72.google.com with SMTP id\n\t5b1f17b1804b1-4836e35292cso6440445e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Feb 2026 04:28:47 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb ([213.175.46.86])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-483bfb789fbsm56267045e9.1.2026.02.26.04.28.44\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Feb 2026 04:28:44 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"MliRTb5Q\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1772108929;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=roTJvXppOAYFEaO94VpQKbWCYZ+omqRa7lbJAOLHAWI=;\n\tb=MliRTb5Q18MpfSm0mun2Cgv1dEKYjPVwvEhQUHaxtiz0xvhipCyaAhN7SCRy6MCY39ugNw\n\tEJlJD4giGOvT4yiTq7S3cT7CI0bD9ruhQ0z9vCrqUtBn/j4lKd/XdD3CrAjBYDfp1EiQ5/\n\tGuSOV2Yc/ePuIBnhulDGhXgCVJ5MpXI=","X-MC-Unique":"MyceJP-YOlOywF59kU-sLQ-1","X-Mimecast-MFC-AGG-ID":"MyceJP-YOlOywF59kU-sLQ_1772108927","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1772108926; x=1772713726;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=roTJvXppOAYFEaO94VpQKbWCYZ+omqRa7lbJAOLHAWI=;\n\tb=C2dEnjZ53viypOVeV/amQNESnRJybP5t2aOvqeQ2w/b/xGjzacMjwkHWjQZR4oKY6i\n\tXoq1qLBBqOr04MxmCZYUYcbTrBdn1X6o3lu/EQgWFx/+abKuEgbbGkcv//s3svNvsnFN\n\tPykoAcDd/85ChOLSUvrB5jKEHueUk7jdqFUBb0OODxLbIKPvtt5Ivv3Zl1sXJJCuodia\n\toqGRVUWc6XIgY8ZAnHeJZ1yTeiEbu/LA9Rw7uD5zF7EMA0Z+2qRuwZY/xWRa20aRow68\n\tEyCJjOWM7qw3dVvtoYDMfI1wZyuYzQ0ETxQ3KrXIG4itkLs+wL+XpFLYFfC41uxayqbO\n\tgFjg==","X-Gm-Message-State":"AOJu0YzxGEwFVg9cECf6jt2LAckhrJI5wu8zm0n7feVMAvdiHhT5mKSs\n\tN+PIUh+wecQJT/uZlt73DW6zOE5mKybuSYoZ1wUE3Hp95fFQ8n+85roUhBoSY1DkzH1rGHuLB+K\n\t4O4wuwPabkeZ5csmF1iu8FmNmjkbtAI3HmQj0L4G1th+4H8HRN4/FTIEhJpJPkSv0smGyfP9DfP\n\tswrtew+Ethobe3E75GZoIyx1auylzsuQIm/NAcbVn/0A7IDdTHYVUlte6xRrs=","X-Gm-Gg":"ATEYQzzGK8wNPSwosx1YQOQGnAOVv9JR+e0KEwY7Y5PIzVZJRkM2blsL5yyzUEv8jRO\n\tYyD/5lB7VP/qzAr9WtfkHL34F2mdoSANbJGOrrRcTm1euUY+7ACAF2EYfCDy9iEWyTB06q4z12G\n\tYL73JHniW67gN6DVPpRMgiOyPcq2JLJETy+zRf4ym4RDFblN7HLzfC0xExEqLbUwmPCJftRlVnO\n\t4x9f7DGOAVecd2cEeaKdjZCGLw0Wvzi87UJG7o6blYBgdovtyfb2FclotO/KOenXv73Cxf47KT0\n\tOasGzxrisCLl7onQdWo0XXOcwG4l01j0vzYUyx2Wwymk1t1wQrSLJ2YQOEQzdbbRp7JVCdJVtSZ\n\tqpAhx5NKp9ionScLBcpDlJzAMb08G788iaW4Lqw==","X-Received":["by 2002:a05:600c:4505:b0:477:7b16:5fb1 with SMTP id\n\t5b1f17b1804b1-483a95a854amr335646515e9.7.1772108925976; \n\tThu, 26 Feb 2026 04:28:45 -0800 (PST)","by 2002:a05:600c:4505:b0:477:7b16:5fb1 with SMTP id\n\t5b1f17b1804b1-483a95a854amr335646165e9.7.1772108925485; \n\tThu, 26 Feb 2026 04:28:45 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Javier Tia <floss@jetm.me>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","In-Reply-To":"<20260225221859.600869-3-floss@jetm.me> (Javier Tia's message of\n\t\"Wed, 25 Feb 2026 16:18:59 -0600\")","References":"<20260225221859.600869-1-floss@jetm.me>\n\t<20260225221859.600869-3-floss@jetm.me>","Date":"Thu, 26 Feb 2026 13:28:44 +0100","Message-ID":"<85h5r31yf7.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"N6o-0b7N8MfjZRtQIzC_Ck_snjQPm-MHMAs9KfoXF9A_1772108927","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}},{"id":38306,"web_url":"https://patchwork.libcamera.org/comment/38306/","msgid":"<795d2659-a24c-4f6f-8a2d-520ab50b093b@collabora.com>","date":"2026-02-26T13:53:51","subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"Hi, very happy to see this!\n\nOn 26.02.26 13:28, Milan Zamazal wrote:\n> Hi Javier,\n>\n> thank you for the patch, tuning files are much needed.\n>\n> Javier Tia<floss@jetm.me> writes:\n>\n>> Add a sensor-specific tuning file for the OmniVision OV2740, commonly\n>> found in Intel IPU6 laptops (ThinkPad X1 Carbon, XPS, Surface).\n>>\n>> The tuning enables all Simple IPA algorithms including AGC, AWB, black\n>> level correction, and a color correction matrix calibrated for 6500K.\n>> The CCM compensates for the green bias inherent in Bayer demosaicing\n>> (the GRBG pattern has 2x green pixels vs red/blue).\n>>\n>> Without this file, libcamera falls back to uncalibrated.yaml which\n>> produces a heavy green tint on the OV2740.\n> I wonder what's the cause of the green tint really.  I'm not sure I\n> understand the Bayer pattern argument: Software ISP uses the grey world\n> white balance algorithm that basically takes a look at average colour\n> channel values; how many pixels represent each of the colours doesn't\n> have direct influence on the averages.  If there is a strong tint then\n> something may be wrong.  Or it's perhaps a property of the sensor.  We\n> know the current processing has flaws and it's a priority to get them\n> fixed.  Understanding the current problems would help.\n>\n> There may be other variables like incorrect black level (which is\n> auto-guessed when its value is not specified in the tuning file) or its\n> incorrect handling.\n\nJust a note regarding black level: this should be taken from the \nCameraSensorHelper if possible. There is already \nCameraSensorHelperOv2740, however it's missing a blackLevel_ value - it \nwould be great to add that as part of this series.\n\nRegards,\n\nRobert\n\n>> Signed-off-by: Javier Tia<floss@jetm.me>\n>> ---\n>>   src/ipa/simple/data/meson.build |  1 +\n>>   src/ipa/simple/data/ov2740.yaml | 22 ++++++++++++++++++++++\n>>   2 files changed, 23 insertions(+)\n>>   create mode 100644 src/ipa/simple/data/ov2740.yaml\n>>\n>> diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build\n>> index 92795ee4..e3e4de74 100644\n>> --- a/src/ipa/simple/data/meson.build\n>> +++ b/src/ipa/simple/data/meson.build\n>> @@ -1,6 +1,7 @@\n>>   # SPDX-License-Identifier: CC0-1.0\n>>   \n>>   conf_files = files([\n>> +    'ov2740.yaml',\n>>       'uncalibrated.yaml',\n>>   ])\n>>   \n>> diff --git a/src/ipa/simple/data/ov2740.yaml b/src/ipa/simple/data/ov2740.yaml\n>> new file mode 100644\n>> index 00000000..b48d50ce\n>> --- /dev/null\n>> +++ b/src/ipa/simple/data/ov2740.yaml\n>> @@ -0,0 +1,22 @@\n>> +# SPDX-License-Identifier: CC0-1.0\n>> +#\n>> +# OmniVision OV2740 tuning for libcamera Simple/SoftISP pipeline.\n>> +#\n>> +# Tested on ThinkPad X1 Carbon Gen 10 (Alder Lake) with Intel IPU6 ISYS.\n>> +# The CCM corrects the green bias inherent in Bayer demosaicing (2:1 green\n>> +# to red/blue pixel ratio in the CFA). Values were iteratively calibrated\n>> +# from captured frame measurements under 6500K lighting.\n>> +%YAML 1.1\n>> +---\n>> +version: 1\n>> +algorithms:\n>> +  - BlackLevel:\n>> +  - Awb:\n>> +  - Ccm:\n>> +      ccms:\n>> +        - ct: 6500\n>> +          ccm: [ 2.49, -0.91, -0.26,\n>> +                -0.30,  1.20,  0.10,\n>> +                 0.07, -0.80,  2.19 ]\n>> +  - Adjust:\n>> +  - Agc:","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 79CDDC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Feb 2026 13:54:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6EBC5622E5;\n\tThu, 26 Feb 2026 14:54:02 +0100 (CET)","from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com\n\t[136.143.188.12])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5788B620FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Feb 2026 14:54:00 +0100 (CET)","by mx.zohomail.com with SMTPS id 1772114034284666.7831027132271;\n\tThu, 26 Feb 2026 05:53:54 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"TJ+CVtny\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1772114036; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=PVqReSqiUv3QFRNypVM9t/NLsVwhk7z3RCMm2681eNqAz9WgdjHyp4xEZYGdokgv7g6Ak8LAv+YdyhC7IqhE9K12HvJT/byZPocUTudOobsSb3Zo6sHez+Cnp0YUSr641ckiZmrj51AQ2qInBb6JbwuVOYNb1bIY/ZILOe/XpyA=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1772114036;\n\th=Content-Type:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc;\n\tbh=DhDv3KFUYej9HypuHVoaarWEAJYkfpiCDoqz2a6KLZM=; \n\tb=Us1h7kYbhRGqtbeO8ufUHum5eskNLM+q6DtKYeIsaX8gZtaY97aWeOxjb8/94uJwdShkbwfCMB6cpyyBX3yGkfN7WmU6QdA1n9saBd6ZZLWK3HcNYM1LDbi4qtZG4ANEkpCIeNsiLOD+jeqSPIwp1CKGnc506wBlXuxYavSgyFU=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1772114036;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Content-Type:Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Message-Id:Reply-To:Cc;\n\tbh=DhDv3KFUYej9HypuHVoaarWEAJYkfpiCDoqz2a6KLZM=;\n\tb=TJ+CVtnyKv3bcgu6wFxNyqUjHtDxMf2fsTn6PO0jkm52JRWY4pH+kge7DkGUNRQg\n\tT1hmj2d720jUdePDYDGdLJ0C35FMFb6dp4pXP6llaZsSdqAsHhO8dNxq8lRhus1tE0c\n\t6pldu/aID3j9UFq0XUofUjq/D3qoqGKjdUvvMHZc=","Content-Type":"multipart/alternative;\n\tboundary=\"------------EM5zJV034X0ai7DFxTie9BbY\"","Message-ID":"<795d2659-a24c-4f6f-8a2d-520ab50b093b@collabora.com>","Date":"Thu, 26 Feb 2026 14:53:51 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","To":"libcamera-devel@lists.libcamera.org","References":"<20260225221859.600869-1-floss@jetm.me>\n\t<20260225221859.600869-3-floss@jetm.me>\n\t<85h5r31yf7.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<85h5r31yf7.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","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>"}},{"id":38307,"web_url":"https://patchwork.libcamera.org/comment/38307/","msgid":"<177212293028.3376561.6439690617504416422@ping.linuxembedded.co.uk>","date":"2026-02-26T16:22:10","subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2026-02-26 12:28:44)\n> Hi Javier,\n> \n> thank you for the patch, tuning files are much needed.\n> \n> Javier Tia <floss@jetm.me> writes:\n> \n> > Add a sensor-specific tuning file for the OmniVision OV2740, commonly\n> > found in Intel IPU6 laptops (ThinkPad X1 Carbon, XPS, Surface).\n> >\n> > The tuning enables all Simple IPA algorithms including AGC, AWB, black\n> > level correction, and a color correction matrix calibrated for 6500K.\n> > The CCM compensates for the green bias inherent in Bayer demosaicing\n> > (the GRBG pattern has 2x green pixels vs red/blue).\n> >\n> > Without this file, libcamera falls back to uncalibrated.yaml which\n> > produces a heavy green tint on the OV2740.\n> \n> I wonder what's the cause of the green tint really.  I'm not sure I\n> understand the Bayer pattern argument: Software ISP uses the grey world\n> white balance algorithm that basically takes a look at average colour\n> channel values; how many pixels represent each of the colours doesn't\n> have direct influence on the averages.  If there is a strong tint then\n> something may be wrong.  Or it's perhaps a property of the sensor.  We\n\nSomebody gave a talk about that quite recently:\n - https://video.fosdem.org/2026/ud2120/BQJPUP-libcamera-tuning.av1.webm\n\n\n> know the current processing has flaws and it's a priority to get them\n> fixed.  Understanding the current problems would help.\n> \n> There may be other variables like incorrect black level (which is\n> auto-guessed when its value is not specified in the tuning file) or its\n> incorrect handling.\n> \n> > Signed-off-by: Javier Tia <floss@jetm.me>\n> > ---\n> >  src/ipa/simple/data/meson.build |  1 +\n> >  src/ipa/simple/data/ov2740.yaml | 22 ++++++++++++++++++++++\n> >  2 files changed, 23 insertions(+)\n> >  create mode 100644 src/ipa/simple/data/ov2740.yaml\n> >\n> > diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build\n> > index 92795ee4..e3e4de74 100644\n> > --- a/src/ipa/simple/data/meson.build\n> > +++ b/src/ipa/simple/data/meson.build\n> > @@ -1,6 +1,7 @@\n> >  # SPDX-License-Identifier: CC0-1.0\n> >  \n> >  conf_files = files([\n> > +    'ov2740.yaml',\n> >      'uncalibrated.yaml',\n> >  ])\n> >  \n> > diff --git a/src/ipa/simple/data/ov2740.yaml b/src/ipa/simple/data/ov2740.yaml\n> > new file mode 100644\n> > index 00000000..b48d50ce\n> > --- /dev/null\n> > +++ b/src/ipa/simple/data/ov2740.yaml\n> > @@ -0,0 +1,22 @@\n> > +# SPDX-License-Identifier: CC0-1.0\n> > +#\n> > +# OmniVision OV2740 tuning for libcamera Simple/SoftISP pipeline.\n> > +#\n> > +# Tested on ThinkPad X1 Carbon Gen 10 (Alder Lake) with Intel IPU6 ISYS.\n> > +# The CCM corrects the green bias inherent in Bayer demosaicing (2:1 green\n> > +# to red/blue pixel ratio in the CFA). Values were iteratively calibrated\n> > +# from captured frame measurements under 6500K lighting.\n> > +%YAML 1.1\n> > +---\n> > +version: 1\n> > +algorithms:\n> > +  - BlackLevel:\n> > +  - Awb:\n> > +  - Ccm:\n> > +      ccms:\n> > +        - ct: 6500\n> > +          ccm: [ 2.49, -0.91, -0.26,\n> > +                -0.30,  1.20,  0.10,\n> > +                 0.07, -0.80,  2.19 ]\n\nIt's actually important that these add up to '1' in each row. Otherwise\nit's applying an artificial gain as well.\n\nThe talk at\nhttps://video.fosdem.org/2026/ud2120/BQJPUP-libcamera-tuning.av1.webm is\nprecisely about dealing with how we need to capture and determine these\nvalues correctly.\n\n--\nKieran\n\n\n> > +  - Adjust:\n> > +  - Agc:\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 CC5ECC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Feb 2026 16:22:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BCBA7622EE;\n\tThu, 26 Feb 2026 17:22:14 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F349620FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Feb 2026 17:22:13 +0100 (CET)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D44B7F52;\n\tThu, 26 Feb 2026 17:21:14 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"CRW1l4ka\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1772122874;\n\tbh=c28wfUIBkGs1gvDSTwtV/piDgHucEqJxluq+T4qFK20=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=CRW1l4kae2LQRxa8oOtDfQ5ccJ8ZBkPnixnWigknOqNY+WEW1Jx47EQ79g9gD07/t\n\tquLn2Y/FQHOYYMI0s0qj0xrl8GrII9vlgwGMoBG2Xkd1w/C4NKnZKWbL+dfy+CrnlY\n\tPwLY+bdpNfc5eW2glPZm5nWTmWhYl8QrsWDQ2hn8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<85h5r31yf7.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","References":"<20260225221859.600869-1-floss@jetm.me>\n\t<20260225221859.600869-3-floss@jetm.me>\n\t<85h5r31yf7.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","Subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Javier Tia <floss@jetm.me>, Milan Zamazal <mzamazal@redhat.com>","Date":"Thu, 26 Feb 2026 16:22:10 +0000","Message-ID":"<177212293028.3376561.6439690617504416422@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}},{"id":38309,"web_url":"https://patchwork.libcamera.org/comment/38309/","msgid":"<85jyvyuqop.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-02-27T15:55:18","subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n\n> Quoting Milan Zamazal (2026-02-26 12:28:44)\n>> Hi Javier,\n>> \n>\n>> thank you for the patch, tuning files are much needed.\n>> \n>> Javier Tia <floss@jetm.me> writes:\n>> \n>> > Add a sensor-specific tuning file for the OmniVision OV2740, commonly\n>> > found in Intel IPU6 laptops (ThinkPad X1 Carbon, XPS, Surface).\n>> >\n>> > The tuning enables all Simple IPA algorithms including AGC, AWB, black\n>> > level correction, and a color correction matrix calibrated for 6500K.\n>> > The CCM compensates for the green bias inherent in Bayer demosaicing\n>> > (the GRBG pattern has 2x green pixels vs red/blue).\n>> >\n>> > Without this file, libcamera falls back to uncalibrated.yaml which\n>> > produces a heavy green tint on the OV2740.\n>> \n>> I wonder what's the cause of the green tint really.  I'm not sure I\n>> understand the Bayer pattern argument: Software ISP uses the grey world\n>> white balance algorithm that basically takes a look at average colour\n>> channel values; how many pixels represent each of the colours doesn't\n>> have direct influence on the averages.  If there is a strong tint then\n>> something may be wrong.  Or it's perhaps a property of the sensor.  We\n>\n> Somebody gave a talk about that quite recently:\n>  - https://video.fosdem.org/2026/ud2120/BQJPUP-libcamera-tuning.av1.webm\n\nNice and very useful talk!\n\nAs for the green tint, it explains why it's present in images without\nadjustments.  But white balance should compensate for it, shouldn't it?\nSure, there would be other colour problems without the CCM, perhaps even\nsome greenish look, and the current software ISP white balance is also\nfar from perfect, but I wouldn't expect getting heavy green tint\nconsistently.  Maybe it is what it is but it still looks suspicious to\nme.\n\n>> know the current processing has flaws and it's a priority to get them\n>> fixed.  Understanding the current problems would help.\n>> \n>> There may be other variables like incorrect black level (which is\n>> auto-guessed when its value is not specified in the tuning file) or its\n>> incorrect handling.\n>> \n>> > Signed-off-by: Javier Tia <floss@jetm.me>\n>> > ---\n>> >  src/ipa/simple/data/meson.build |  1 +\n>> >  src/ipa/simple/data/ov2740.yaml | 22 ++++++++++++++++++++++\n>> >  2 files changed, 23 insertions(+)\n>> >  create mode 100644 src/ipa/simple/data/ov2740.yaml\n>> >\n>> > diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build\n>> > index 92795ee4..e3e4de74 100644\n>> > --- a/src/ipa/simple/data/meson.build\n>> > +++ b/src/ipa/simple/data/meson.build\n>> > @@ -1,6 +1,7 @@\n>> >  # SPDX-License-Identifier: CC0-1.0\n>> >  \n>> >  conf_files = files([\n>> > +    'ov2740.yaml',\n>> >      'uncalibrated.yaml',\n>> >  ])\n>> >  \n>> > diff --git a/src/ipa/simple/data/ov2740.yaml b/src/ipa/simple/data/ov2740.yaml\n>> > new file mode 100644\n>> > index 00000000..b48d50ce\n>> > --- /dev/null\n>> > +++ b/src/ipa/simple/data/ov2740.yaml\n>> > @@ -0,0 +1,22 @@\n>> > +# SPDX-License-Identifier: CC0-1.0\n>> > +#\n>> > +# OmniVision OV2740 tuning for libcamera Simple/SoftISP pipeline.\n>> > +#\n>> > +# Tested on ThinkPad X1 Carbon Gen 10 (Alder Lake) with Intel IPU6 ISYS.\n>> > +# The CCM corrects the green bias inherent in Bayer demosaicing (2:1 green\n>> > +# to red/blue pixel ratio in the CFA). Values were iteratively calibrated\n>> > +# from captured frame measurements under 6500K lighting.\n>> > +%YAML 1.1\n>> > +---\n>> > +version: 1\n>> > +algorithms:\n>> > +  - BlackLevel:\n>> > +  - Awb:\n>> > +  - Ccm:\n>> > +      ccms:\n>> > +        - ct: 6500\n>> > +          ccm: [ 2.49, -0.91, -0.26,\n>> > +                -0.30,  1.20,  0.10,\n>> > +                 0.07, -0.80,  2.19 ]\n>\n> It's actually important that these add up to '1' in each row. Otherwise\n> it's applying an artificial gain as well.\n>\n> The talk at\n> https://video.fosdem.org/2026/ud2120/BQJPUP-libcamera-tuning.av1.webm is\n> precisely about dealing with how we need to capture and determine these\n> values correctly.\n>\n> --\n> Kieran\n>\n>\n>> > +  - Adjust:\n>> > +  - Agc:\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 01FE9BE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Feb 2026 15:55:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 49C35622EE;\n\tFri, 27 Feb 2026 16:55:27 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F4FA622AD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Feb 2026 16:55:25 +0100 (CET)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-193-9ofIZHMhPXuXhr_jTEFx5A-1; Fri, 27 Feb 2026 10:55:22 -0500","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-48071615686so15844765e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Feb 2026 07:55:22 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-4399c76c49fsm8208481f8f.38.2026.02.27.07.55.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 27 Feb 2026 07:55:19 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"JOtNj+Hs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1772207724;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=pONsxmu+4Kq3YQJwt5j7IHk8g3FQF2598oEPzEV60Vo=;\n\tb=JOtNj+HsMgU+HX8g69g/1kqpDl/umGCy/0DVrBQbpv5SCPofb6uCq5m1Ul8DDFduft/U9e\n\tS2j71uTn7tJzxAo96qjBbkRfkYx4aUf7meOWSGY4RKrib47yLm5VgHFixFM8+vinPO1nZR\n\tywEPDDsmEm4fXFSHeV4bk60A/3XC4Sg=","X-MC-Unique":"9ofIZHMhPXuXhr_jTEFx5A-1","X-Mimecast-MFC-AGG-ID":"9ofIZHMhPXuXhr_jTEFx5A_1772207721","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1772207721; x=1772812521;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=pONsxmu+4Kq3YQJwt5j7IHk8g3FQF2598oEPzEV60Vo=;\n\tb=jPnOWXMnN7j/QK2oL4IuS3i4QiKv78yqZoYxmIyCSq3YErgmNM0MVkT8h6ph6hcl0w\n\tQNxJzihlBGRU52YenSHjE/Djgss50SnigvMo8WBrzzUGJ7wwOQhddXT1Wby4D5FTX6Oc\n\tEZPWLIRz5Y59/Ezm0ld/h538vIir3QwHSRZIQV2A7yPUn5hUq9AFhk4JBZcf0glUk7E+\n\tuiI2cD52/eirSmdCWGSJlqtr4/+6+Cg/uHjPlrJN30c1t+ydzCfw0V93CdCo76mJZp3B\n\t6RVkXqoemhBFVMDb9MPSGKVxszMmzLQZkUCx5SWj9nEXO4BnKkB2UPb45ax93Cs85MHt\n\t3Saw==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCXJgdjiAjXXXT5bQ4HMt5cVz8v2s0xmB6eXr0di8x4ccp6Td9rWRpT3CFmls8mT7dcCBFvSmw8F3Z9GmJG0HUQ=@lists.libcamera.org","X-Gm-Message-State":"AOJu0Yyt4xjuRbSuzzdVXzGLRzTffoiMZw+jKmnZKSLDDOeZmz37fOb9\n\tLntGvACAp+6M93IWaemyg+Nkj8Tr25HacA8TRZcdiZweLTNw/IJ258BLKDqrvm+JOc5Gm4OKf6l\n\tIhBtMseJZUWAZPJCY0F7ClHmX6/qCOjxOZWkGzj58t/+QpbuEQCUdYU5XAvQjGj3JMKRkemKSjk\n\tynslU64pbsXWkt40YTnlgrDUTUzz/Li9NcahFMMk2mfbhS20/KANoby/RQ4K8=","X-Gm-Gg":"ATEYQzzrta+LHMHkzMZySs3A76VNBkt2Z14H0j4xy+zIVVgbfe/jk5a9+LJcO4OIq6P\n\tSRPMzk95hEhGN/Jk+yw4fh3NFbiOIHgbi2ZIyTwStLM64gmEPKNsvqFg5SYD5h6SsvXKlD41xml\n\tduRiT3f85UK3UhfGjJ5IkRmVBaffjrwR9cc8OUSG1Rl6F2SVkpD51XTRsno2yU/SQ6bnfg981i7\n\t6W6elH90u95QaDn/MnB+bl7YASaF8LWdyCGmlsKBq9naA2h99xFZzK9lrPwy3Gow9M6zMwy94Q4\n\tKpiAHrgRCbbznZhxLeIl7Ozl5QNh7jIAZzvkwBoyJs7Lns4XC5Ff6FB+C4orP33gg97pWgjKxaD\n\teUvZ3v52eYBHOcPsoqM+4+U073lqnK2OrUDfto0mqjtBdLmpf8/8NguAgtjG0nJSJbELd5DsngE\n\tU=","X-Received":["by 2002:a05:600c:3106:b0:483:6a8d:b2f9 with SMTP id\n\t5b1f17b1804b1-483c9ba6165mr57305595e9.5.1772207720693; \n\tFri, 27 Feb 2026 07:55:20 -0800 (PST)","by 2002:a05:600c:3106:b0:483:6a8d:b2f9 with SMTP id\n\t5b1f17b1804b1-483c9ba6165mr57305105e9.5.1772207720155; \n\tFri, 27 Feb 2026 07:55:20 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Javier Tia <floss@jetm.me>,  libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","In-Reply-To":"<177212293028.3376561.6439690617504416422@ping.linuxembedded.co.uk>\n\t(Kieran Bingham's message of \"Thu, 26 Feb 2026 16:22:10 +0000\")","References":"<20260225221859.600869-1-floss@jetm.me>\n\t<20260225221859.600869-3-floss@jetm.me>\n\t<85h5r31yf7.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<177212293028.3376561.6439690617504416422@ping.linuxembedded.co.uk>","Date":"Fri, 27 Feb 2026 16:55:18 +0100","Message-ID":"<85jyvyuqop.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"7AUyZ5yKCS7TWXm-wtRRWC3G8YAIv0bcrG-ZnzOyeN0_1772207721","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}},{"id":38311,"web_url":"https://patchwork.libcamera.org/comment/38311/","msgid":"<85zf4tuc2o.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-02-27T21:10:55","subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Robert Mader <robert.mader@collabora.com> writes:\n\n> Hi, very happy to see this!\n>\n> On 26.02.26 13:28, Milan Zamazal wrote:\n>> Hi Javier,\n>>\n>> thank you for the patch, tuning files are much needed.\n>> Javier Tia<floss@jetm.me> writes:\n>>\n>>> Add a sensor-specific tuning file for the OmniVision OV2740, commonly found in Intel IPU6 laptops (ThinkPad X1 Carbon, XPS, Surface).\n>>> The tuning enables all Simple IPA algorithms including AGC, AWB, black level correction, and a color correction matrix calibrated for 6500K.  The CCM compensates for the green bias inherent in Bayer demosaicing (the GRBG pattern has 2x green pixels vs red/blue).\n>>> Without this file, libcamera falls back to uncalibrated.yaml which produces a heavy green tint on the OV2740.\n>> I wonder what's the cause of the green tint really.  I'm not sure I understand the Bayer pattern argument: Software ISP uses the grey world white balance algorithm that basically takes a look at average colour channel values; how many pixels represent each of the colours doesn't have direct influence on the averages.  If there is a strong tint then something may be wrong.  Or it's perhaps a property of the sensor.  We know the current processing has flaws and it's a priority to get them fixed.  Understanding the current problems would help.\n>> There may be other variables like incorrect black level (which is auto-guessed when its value is not specified in the tuning file) or its\n>> incorrect handling.\n>\n> Just a note regarding black level: this should be taken from the\n> CameraSensorHelper if possible. \n\nIndeed, thank you for the correction.\n\nNormally, the value should be specified in the sensor helper.  It can be\nspecified in the tuning file in the following cases:\n\n- A user wants to use a different black level.\n\n- There is a sensor without known gains but with a known black level.\n  Because a camera sensor helper cannot be defined without specifying\n  gains, the only way to specify the black level is using the tuning\n  file.\n\n> There is already CameraSensorHelperOv2740, however it's missing a\n> blackLevel_ value - it would be great to add that as part of this\n> series.\n>\n> Regards,\n>\n> Robert\n>\n>>> Signed-off-by: Javier Tia<floss@jetm.me> ---\n>>>   src/ipa/simple/data/meson.build | 1 + src/ipa/simple/data/ov2740.yaml | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/ipa/simple/data/ov2740.yaml\n>>> diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build index 92795ee4..e3e4de74 100644 --- a/src/ipa/simple/data/meson.build +++ b/src/ipa/simple/data/meson.build @@ -1,6 +1,7 @@ # SPDX-License-Identifier: CC0-1.0 conf_files = files([ + 'ov2740.yaml', 'uncalibrated.yaml', ]) diff --git a/src/ipa/simple/data/ov2740.yaml b/src/ipa/simple/data/ov2740.yaml new file mode 100644 index 00000000..b48d50ce --- /dev/null +++ b/src/ipa/simple/data/ov2740.yaml @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: CC0-1.0 +# +# OmniVision OV2740 tuning for libcamera Simple/SoftISP pipeline.  +# +# Tested on ThinkPad X1 Carbon Gen 10 (Alder Lake) with Intel IPU6 ISYS.  +# The CCM corrects the green bias inherent in Bayer demosaicing (2:1 green +# to red/blue pixel ratio in the CFA). Values were iteratively calibrated +# from captured frame measurements under 6500K lighting.  +%YAML 1.1 +--- +version: 1 +algorithms: + - BlackLevel: + - Awb: + - Ccm: + ccms: + - ct: 6500 + ccm: [ 2.49, -0.91, -0.26, + -0.30, 1.20, 0.10, + 0.07, -0.80, 2.19 ] + - Adjust: + - Agc:","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 A2CDDBE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Feb 2026 21:11:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EC95B6236C;\n\tFri, 27 Feb 2026 22:11:03 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 967CB622AD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Feb 2026 22:11:02 +0100 (CET)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-458-nG3P0ZWPNkSdlWMdrc2LDg-1; Fri, 27 Feb 2026 16:10:59 -0500","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-4836c819456so16658715e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Feb 2026 13:10:59 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-483bfcbd781sm133749185e9.8.2026.02.27.13.10.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 27 Feb 2026 13:10:56 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"UTSkjdkZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1772226661;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=clutSzxzxNUXxPmgC9T4o4AdkTmx1OnvAAdFa6vLUWo=;\n\tb=UTSkjdkZGStQwYKAi148xGxtCz2p5boi20j9DM5U8Oqx7K/BiDiK/Guk1bxJFovBDq3dgH\n\tk55Woch75Pv8h8Hl/wYTcxyRg/KNuNcXE5uKgSR8fpNRWwf4KOgl2KJCjSSVmC4rN3KEgY\n\tx1nMC9lqqhzmu6zG23UO+MwNkamNkYk=","X-MC-Unique":"nG3P0ZWPNkSdlWMdrc2LDg-1","X-Mimecast-MFC-AGG-ID":"nG3P0ZWPNkSdlWMdrc2LDg_1772226658","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1772226658; x=1772831458;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=clutSzxzxNUXxPmgC9T4o4AdkTmx1OnvAAdFa6vLUWo=;\n\tb=aNpm+5Kb7NqtAVC2PhsAbmHzKGY/GjZEHwXPM9InkFJ4ZrAj9RTTyBkPcisiVfZOzR\n\t5b7oGtiD9BG9PRx1GKPdCBo83TXq7cyR8APZY4k06PGFU24TBLGeo50z8N17MiSqVbYG\n\tx56z0xBt5WcDJ0OE5xhY5O9Q+xV4rGG3opvXswF4gHbE81JhJLLmibYkVdhATkBfNONJ\n\t1XYcBIrG/l/B2xVcHXUEX8PRUCrNPDB9tkWlrvJDeCYPiK+RG1qxo3LM9gQf3tmkyQli\n\tTM+C2MSMnJes7dP5DADAa7X1+xozFxJDeYr/Bn9/GcOxVsAyERAB95O2CetU/3netVzV\n\tZCtA==","X-Gm-Message-State":"AOJu0YzmTumVFRjhLbgTzQU9TFwlZQoo2UtqvbWDpXUeWZEMpOso+FbV\n\tVBWp8nSHohHNhYjIT/kCq6+iGucJH0WTjnBhDd9ifqmrvWvyX35R2rkLtng2hq4fK2k1OdQpc+C\n\t/WxOnMNGMGXWtQwTbC3jo/ISLJke4BnY8aO/6xZd1p7iTrrvkxaUrR3BX+bJPTZc7MgJDZnmXrm\n\tGA6hsk6InhY+QoKvmTEWENAu+GlDPIfOXGlLKw198SqkDoWDaw2wa2mwCO0zQ=","X-Gm-Gg":"ATEYQzxAI73GN97Nih6D/Q/cu/5/oMWxXqFmIQ8ufcTnUrVci+ZNMC1VUgM/rfZ1mnj\n\t7lu6HRHpUGDdrSFs0frv5GVYYrmEiqpoTfBpz+cUt+fjghPp4EMg+tDDxpW9gZEPEtAbnVPnfwA\n\tELl6630eZhedSHl94UPwZ9UUoYV7MCKFa7EtwtZVmhajLzNeCoqo74paxIVs5R6+SCMYhp/FPCq\n\tTmVsI4022fxGjEHvNTUQXka0yX4H1fpgYNwyY5fOZQgFP2Tfu4Rl9Dkyf6PHQwVyn12WlnWswWZ\n\tpBIBQ7vcLGDHHlqkvQk68ohz6ZPjRFf7KsV4P/46K2IH9qgfWxPqfciop3IV1Pbi3+IktdPbCGH\n\tqw9swRF02wheJz3Ms7lsX2pjEdbtIz1CxKIIXaKiz9LgmLglt/m6NETM+thPi1yGuDVRP0+/8zR\n\ts=","X-Received":["by 2002:a05:600c:a47:b0:475:da1a:53f9 with SMTP id\n\t5b1f17b1804b1-483c9be2ab1mr69540815e9.14.1772226657596; \n\tFri, 27 Feb 2026 13:10:57 -0800 (PST)","by 2002:a05:600c:a47:b0:475:da1a:53f9 with SMTP id\n\t5b1f17b1804b1-483c9be2ab1mr69540405e9.14.1772226657104; \n\tFri, 27 Feb 2026 13:10:57 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/2] ipa: simple: data: Add OV2740 tuning file","In-Reply-To":"<795d2659-a24c-4f6f-8a2d-520ab50b093b@collabora.com> (Robert\n\tMader's message of \"Thu, 26 Feb 2026 14:53:51 +0100\")","References":"<20260225221859.600869-1-floss@jetm.me>\n\t<20260225221859.600869-3-floss@jetm.me>\n\t<85h5r31yf7.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<795d2659-a24c-4f6f-8a2d-520ab50b093b@collabora.com>","Date":"Fri, 27 Feb 2026 22:10:55 +0100","Message-ID":"<85zf4tuc2o.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"-Kvmv0XGSBUakCJayovv5UfFhwgMuQJRZtoad645OyI_1772226658","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","Content-Transfer-Encoding":"quoted-printable","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>"}}]