From patchwork Fri Jun 18 22:04:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 12657 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 D0DAAC3218 for ; Fri, 18 Jun 2021 22:04:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 005FE68947; Sat, 19 Jun 2021 00:04:36 +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="gEh7Edi5"; dkim-atps=neutral Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B16E46050C for ; Sat, 19 Jun 2021 00:04:33 +0200 (CEST) Received: by mail-wm1-x330.google.com with SMTP id f16-20020a05600c1550b02901b00c1be4abso9551167wmg.2 for ; Fri, 18 Jun 2021 15:04:33 -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=hjGmaF2knE0w6Yr1G0VwmIfp/gCusKiVrS4Fn8WW0PA=; b=gEh7Edi5Rdu+gyWylhZL4uJ+6o8esB5K8y8FBPOOvSNOrbryuAGcsjiq2rwb1HuMQe QRPtHLmjiKBrBJiPBK1iEmaZMfHZR6KcZCRuA+MXhd5kQSsemN4+ZSZhABH2/M5BZ35F UFyiGwyjV1h5rKrSrCujaSGmJKMTruCtkQscZc07ZSudgJyPQucQHUxRVgXeoF+cyZJz hstB1nyysq4AOTXZoC7fAVZHps9WmBSuxNYV6L6h6HPWszyPkEsZW2vb12sCnLl6sKqo BGvQPUuq8GvdFzb5y2VzStwMsAYh2aC5sFNQUwlz2jIjLGio7+ssfLNnBkhIA+GerTwV 4vAg== 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=hjGmaF2knE0w6Yr1G0VwmIfp/gCusKiVrS4Fn8WW0PA=; b=mdfL3ea3Q4l0NgZKFrubi4ZuCVHzTt8vr89mb4UJejRYGFL2qZM3W2r5zXV2twFUpN RDJjDWq1BtYPvbwHf0i2tI6FxrKEWaRU0CMXjE0PzkSZC+DD8GxqEINSXaODdaXl823H nITIvOzaXiTm9R98R9aM8j/Ug8jiRcLlgyU3PfpmkxU9G/qQEVcpiCoPXqLgSLj56N83 HDashir+qQqGBp5KCwp8fqfZZvyrp0FsBS6vidqYZ0zFWhjofqc2IMDa77BRvcIdxOwl B8tYNOB58r+Wie4ZcSWrtt8y+rXeBGpyv/dOhKI9wynD/XaOvZuujA06vjLXeQGS7h8v 5/Pg== X-Gm-Message-State: AOAM531X2W3v4gffMuWYe0EEl4lYdMULJgPltpnk7XNRnUmNeD6RH++F Nd9/BuxJhd5/W1X+xSeeIBm1BuJaVjjOXvQG X-Google-Smtp-Source: ABdhPJwj11ZEI1dVfCj24Q7qqQtkk8T/jelpsMtqSr72TLth4Nffb6i7aMeVL/Ts2KwEFO6m0kyNrA== X-Received: by 2002:a05:600c:2284:: with SMTP id 4mr13800971wmf.148.1624053872408; Fri, 18 Jun 2021 15:04:32 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id z6sm6966322wrl.15.2021.06.18.15.04.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 15:04:32 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jun 2021 23:04:27 +0100 Message-Id: <20210618220430.31457-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/3] Support monochrome raw sensors 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 again Here's a v3 set which addresses Kieran's comments, so thanks for those! Otherwise everything is functionally the same as before. To answer Kieran's other questions: * Yes, a monochrome raw sensor is very different to a monochrome non-raw sensor! No black levels, vignetting to worry about on those, among other things. * On the question of warning about missing AWB results only for monochrome sensors. Yes, that's a reasonable thought, though at the moment I don't think the IPA side of the world even knows if a sensor is monochrome. We'd have to pass that somehow, maybe in the IPACameraSesnsorInfo? That's perhaps a slightly longer discussion, I'm not entirely sure I want to open that right now... * We need to be very nice to Dave, but then the plan would be to start upstreaming new drivers, as we've been doing previously. There are a couple more I'd like to get going too. Some of them would need a "Y12P" format, which seems to be missing from the kernel, currently. * The tuning I've given for the OV9281 is for an Innomaker module, or maybe not, I'm not sure what it is. But it actually makes surprisingly little difference as there is no colour shading, AWB or colour matrices to worry about. Thanks David David Plowman (3): libcamera: Add support for monochrome sensors libcamera: ipa: raspberrypi: Demote warnings about lack of AWB results libcamera: ipa: raspberrypi: Add support for ov9281 sensor include/libcamera/internal/bayer_format.h | 3 +- src/ipa/raspberrypi/cam_helper_mov9281.cpp | 65 +++++++++++++++ src/ipa/raspberrypi/controller/rpi/agc.cpp | 2 +- src/ipa/raspberrypi/controller/rpi/alsc.cpp | 4 +- src/ipa/raspberrypi/data/meson.build | 1 + src/ipa/raspberrypi/data/mov9281.json | 92 +++++++++++++++++++++ src/ipa/raspberrypi/meson.build | 1 + src/libcamera/bayer_format.cpp | 14 +++- src/libcamera/camera_sensor.cpp | 3 + src/libcamera/property_ids.yaml | 4 + 10 files changed, 183 insertions(+), 6 deletions(-) create mode 100644 src/ipa/raspberrypi/cam_helper_mov9281.cpp create mode 100644 src/ipa/raspberrypi/data/mov9281.json