From patchwork Sat Jul 4 09:59:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 8618 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 87EA4BD790 for ; Sat, 4 Jul 2020 09:59:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0A00F60D5E; Sat, 4 Jul 2020 11:59:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="LcZNImxP"; dkim-atps=neutral Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DA6FC603AA for ; Sat, 4 Jul 2020 11:59:23 +0200 (CEST) Received: by mail-wr1-x431.google.com with SMTP id s10so35228626wrw.12 for ; Sat, 04 Jul 2020 02:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t/jg3u1qLKWoDzVkKUxobezBagvnV1mnmSp/xPiPXYk=; b=LcZNImxPoUmRJHnd1V0485L5G4JmokR0F027AlFj2MIVJiezHxYjbhh8gDD9ZG9Jml LW2I8IfVYU8/Rfwgi28/VyIrVry8Re2rqB8BG1mbQD8EtcN/aJ9q3hSs1Wia1wI3pjeQ o5aKUd7Q5U11fmjIVqcNhRarGkhXe8mGPgeGlYZcFP/NttooJGPJjol7C5OJ6ZwbZNuH q/BVHNbgSNkfjPlcn39sracEg095Lcxvi7vdn33m1yXhVN3PhkSA1Mi9djqQajPF3JER sQKjF18SAyUNIxH5wDqdLjHexoUra0GeGP1twytPj8PruEwf+/lx5inINCs6yck83xmU DdVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t/jg3u1qLKWoDzVkKUxobezBagvnV1mnmSp/xPiPXYk=; b=uiYjcvyCyx/6naVaQlnTzXS67i4k2/GmnsTKvro2uijuXCxJAVDnUkfU1ngaWJ0PYw FAKvnAyQTlXpdUQ60mMPRjmThLcbaRG82n6ElwKkU8Y6RDH8xoZqWmA0SNMdzvotZs/Y fH7fz0oORc+FLpIZybbpvqf0tJ9lQsMuII6UCl10DDkRSXYFGhW9lUFgVSq+j4i4qeNk 1maMaJPy5OruUzqdkeSDlchOXIMzfxL0aN1rXxT8mmxZP5STOCODoU/uWUcfqQVEPkP4 ecydrlU42aY2ZVlh6ObvnRM5+CQ/m6DdoBfqzjCNzzb5buEUHnBKIiAJ/TPN3TteunMA M16A== X-Gm-Message-State: AOAM532hXccxEDN3xj4EZhtm0V8yeHE6eh8Se6AFmG4M4gzGlA3JJioh NHNFZp6J8XSwwuT+xVnC5jlAj4NFTR8= X-Google-Smtp-Source: ABdhPJx33FgfKSwiUjsRc8ijGINE78XmlzptFDK+PokbbaqdGFvk6EJGn8UR/ie974uHj1i1QeacSA== X-Received: by 2002:a5d:6786:: with SMTP id v6mr39690560wru.258.1593856763053; Sat, 04 Jul 2020 02:59:23 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id z10sm11477681wrm.21.2020.07.04.02.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 02:59:22 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Sat, 4 Jul 2020 10:59:11 +0100 Message-Id: <20200704095914.17344-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] ColourCorrectionMatrixControl 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" Hi everyone This patch set adds the ColourCorrectionMatrix control, though its use is for now mainly to get hold of the Colour Correction Matrix (CCM) used by the imaging pipeline in the libcamera metadata. There are 3 commits: 1. The basic ColourCorrectionMatrix control. 2. The implementation for the Raspberry Pi platform. 3. Use of the new metadata to produce better colours in the DNG files saved by qcam. Tools like dcraw (with -w) and RawTherapee should produce reasonable looking images by default. In the 3rd patch I use a little matrix arithmetic. I thought I might be able to use Qt for this, but it appears not to have a proper 3x3 matrix class (that finds determinants and inverts them) so I ended up rolling my own. It's only a very small amount of code but does anyone have a better suggestion? Thanks and best regards David David Plowman (3): libcamera: Add ColourCorrectionMatrix control libcamera: raspberrypi: Add ColourCorrectionMatrix control libcamera: qcam: Improve colour information in DNG files include/libcamera/ipa/raspberrypi.h | 1 + src/ipa/raspberrypi/raspberrypi.cpp | 9 +++ src/libcamera/control_ids.yaml | 12 ++++ src/qcam/dng_writer.cpp | 93 +++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+)