From patchwork Wed Mar 10 17:23:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 11545 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 418E1BD80C for ; Wed, 10 Mar 2021 17:23:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8F41068AA2; Wed, 10 Mar 2021 18:23:54 +0100 (CET) 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="T3H8ZZ4y"; dkim-atps=neutral Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 971BA60106 for ; Wed, 10 Mar 2021 18:23:52 +0100 (CET) Received: by mail-wm1-x331.google.com with SMTP id e23so7609974wmh.3 for ; Wed, 10 Mar 2021 09:23:52 -0800 (PST) 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=bydgEXtLCzOe8x3zjvjFERbC7QB3eDmj5/UewGe032Y=; b=T3H8ZZ4yahSO7dp9BwoxnKPheXO4CrW+PkTw463arZIVAJHJ8P7k0ejws2xd839qR0 oWmdu7EzFPSrZHxYpYZ76TLCzEFybAqsJTbxw6dI30qGL5+Wu1ELj5UJeC9vXoGtPD9d vb8ooNx6UIPACV3Oc7GatY/S1d2PQ5KsMSy44vmpoqMtxRC41yLgnwQiBc2SpgvQbo64 G1jkMsAfFPVxxA5mr9FEMyAPRGUyz07vCSsomWori0+nnUZRESFmyl6wq6Eo1mkSIeJu PJqPngZLV8VUk4q5KidvkB+zeXUzKLT5ht4eq7dnlhniZusaJ+HsW0SE7c/+YE1eJ17w 1paw== 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=bydgEXtLCzOe8x3zjvjFERbC7QB3eDmj5/UewGe032Y=; b=g03E4H8EEDUlYkR52T4K++ERop6kroYHT04adI0DT8mc5c+1gRXk3vJn1Eqn5p4v8S rovECMpXNt3Yg5Bq/kACpZ0SzLLNHE2+xlHrvGtcTUjFuLGFz4EC1umkwCiSFio2opAQ /6Vn0lTlXcMSDh/G+CMD2bPmSpHHzYoPDjGUrQTUf4sguEk/w/8tB3MLfG5u202UfWM8 D4QbP4SR3JplIB7vO/ZubJujzShh8Y/u9QPB5tWmwbQ5k3Y5pw3kzR23QvyQPXLddXGL es8J+dSSbWhUn8GB8Ayn/rkJiHv9FVrx4G/VpMV+fgVzFZU5d9D/TjpH5PpigITXVMHa gu2Q== X-Gm-Message-State: AOAM530FnHuD4s18a91DqFyRfEsixmIM8qja972POGKbO5vfTkJ3hPLB sSWM++LfgLRsoaT0I7f4Jk6/p5XGpccaPw== X-Google-Smtp-Source: ABdhPJynGgCAgdtetSiclwtnomvAh+aRBjaCVShotXkMbznbkRxUdIbBzz0gc9lqP0gea470eKJ+tQ== X-Received: by 2002:a1c:ed13:: with SMTP id l19mr4283092wmh.83.1615397031955; Wed, 10 Mar 2021 09:23:51 -0800 (PST) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id i17sm18701599wrp.77.2021.03.10.09.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 09:23:51 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Wed, 10 Mar 2021 17:23:47 +0000 Message-Id: <20210310172348.4312-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 0/1] Raspberry Pi generalised embedded data parsing 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 I'm just submitting this patch for comments in the first instance (mostly from Naush, I guess, but everyone is welcome!). It's part of our plan for more flexible handling of metadata from the sensor. (The background is that we have some interesting sensors coming up that give us other forms of embedded data, not just register dumps, and we need to be able to deal with those!) The plan is to give our CamHelpers a Prepare() and a Process() method, just like all our algorithms. As usual, Prepare() runs just before the ISP starts, Process() just after. A version of Prepare() is provided that has basically just sucked that little bit of register-dump-parsing functionality out of the IPA file (raspberrypi.cpp). Process() does nothing by default. There aren't actually many changes, but some observations on what I've done: * I've not updated various CamHelper comments yet, that can wait! * I've made the Prepare() method responsible for reading the delayed control values if we can't use the metadata to get the exposure/gain. I wonder if perhaps that is better left in the IPA. Prepare() might indicate via a return value whether it found them in the embedded data or not. * The parser object is completely hidden behind the helper now, so the distinction between them is rather blurring. Maybe they could be combined, but that can happen in a later patch. Thanks! David David Plowman (1): ipa: raspberrypi: Use CamHelpers to generalise embedded data parsing src/ipa/raspberrypi/cam_helper.cpp | 49 ++++++++++++++++ src/ipa/raspberrypi/cam_helper.hpp | 14 ++++- src/ipa/raspberrypi/raspberrypi.cpp | 88 ++++++++--------------------- 3 files changed, 84 insertions(+), 67 deletions(-)