From patchwork Fri Jul 28 12:27:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 18895 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 AFA17BDB13 for ; Fri, 28 Jul 2023 12:28:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 01E14627EC; Fri, 28 Jul 2023 14:28:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1690547286; bh=sd/LRH3lJNfR4eptlhBtsBNvcNZzFwqF1LLdSjeKW3A=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=GTxZoaWSyGFSST/ZtQO1oDbaNUTLsg5qC/tOH34qh41mojXGH/SWANb0ZSJ6l2fZT gqU7BKQXhwQlhK2Dp9hZlqjF9o4iXDUJNaLpi+hWdsq2KUEyPx6HcqOx2ah7kzUMm2 k8ZgiE04aG+zpKjh+70W74hijuLYBo4DOnTvKBCLkU3/LcnPMxxDEqZ3cRDQ1xOpHc zGO6eAvfTyxz5xp91HnoB9n4eglK2bz5C3shu1IbxodHV/T9nKpzWicWnuRsUodt8r F8ftIdIuwjLsyfthWN4qkEPsmFZn4/kOCjRwp6vsxQkkAZdt0oqK4wUx1hOaZehnlj y+06AsILMLUrw== Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 314D4627E6 for ; Fri, 28 Jul 2023 14:28:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="HilSOiEe"; dkim-atps=neutral Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3175f17a7baso2109508f8f.0 for ; Fri, 28 Jul 2023 05:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1690547283; x=1691152083; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=A75m3xru/SlMmJM7TYF1nHObui2Mu8u9y2INvxr1EI4=; b=HilSOiEe0j7fVIwlo60DEdeqnZaXYwPQCoXmu/zlpV78+paQ0vI3HozyYEs/eWFPbB 1lg31wz1hR45eAguK42YQFb3TxFs1tkBEI/7uXEEdm0mK6VChz2x2y/QHBGGZUSg+fbv 1OMZNyy9OGrz19ny9I6idaZkP7EtY0PotiP3DFKPlMspVt8+3DnkDctZx+wCyANrAkF7 jOly+3Xh7nOMjFx9iFPmaQgZP9C9+r2g74FbseCsuvn0+MD+A/mx2AhL+UmIwxUdEoac /uhoe3Iti60xcAKHUsz8mguYhopyaRYqR8CE2fG60UeASUqXJYlxRfpHgNhe9QhA5LnR ZROw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690547283; x=1691152083; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A75m3xru/SlMmJM7TYF1nHObui2Mu8u9y2INvxr1EI4=; b=S04Sbc8aBToxVLShoMIzH5qe0be56EDZbJqWOhEwHn3xWSgwlt/XKQQTakXYpabqc0 rdn43y2kBHQNbubvUvBTsArFX1HvMfEvfZSvc9HEUTt6pwySzbw2006HXYmCexbbgG5W Mhld5MiSgMdvDROU/OWR1lkEHj+dFh+VSV1nxaohmEyCyCPWkgzB9KGVahcKv6o5OqgE 5BmpxHBWVVsrfZYgB8TBdCzDfSupPD6SxhTET7OYgbSVKww/b1OxGL2qccLScq7WZYNn TQ1fsYodAPuNM4jYAFtUSIzMrZjdn/hgd+sd9ebTFMfkkQkChmwC4xmhNFdB2EbPJlhi 09aA== X-Gm-Message-State: ABy/qLZAXDsHdPOLQLVBdLeyXcd5GRle4xvVtWbcdZa/sg3E70wuPq+X YuRdb/Hs1NLPaVStQ/xq3W7yw12HQg4zkyOmKzU= X-Google-Smtp-Source: APBJJlGWN5mKYXdxlNDXDbXZTdqcEe9m8TGmuIQQCHmVxuVZUmWVqQeb1ApVqxXs4VRq5KrzbuVgdA== X-Received: by 2002:adf:dd50:0:b0:317:64f7:a4ff with SMTP id u16-20020adfdd50000000b0031764f7a4ffmr1327761wrm.66.1690547283473; Fri, 28 Jul 2023 05:28:03 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:2bce:64d6:1a5c:49a2]) by smtp.gmail.com with ESMTPSA id n1-20020a5d4c41000000b0031764e85b91sm4692175wrt.68.2023.07.28.05.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 05:28:03 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 28 Jul 2023 13:27:57 +0100 Message-Id: <20230728122758.2411-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/1] HDR controls 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: , X-Patchwork-Original-From: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi everyone Here is an initial patch for controls to allow applications to do HDR imaging. The aim here is to keep things reasonably simple and to avoid things that might get complicated or platform dependent. We have: HdrMode A control to request HDR images. Besides the "off" setting we have: * HdrModeMultiExposure - multiple exposures will be used to create HDR images, and * HdrModeSingleExposure - multiple frames at a single exposure will be used to create HDR images. HdrChannel This is metadata attached to the returned images to say which of the exposure "channels" (that is, long, short or medium) this image is from. (On the Pi we expect to want to drive the multiple exposures but not combine the images, as there is no hardware for that.) Mostly this is all for use with ISPs that are dealing with cameras without special HDR features, but I think it's worth considering how it would apply there too. 1. Some cameras might deliver long/medium/short frames automatically. If they're travelling through the pipeline independently then I think we label them correctly and expect the implementation of the HdrModeMultiExposure to handle them. There are clearly implementation dependent issues here, such as how those exposure values are determined and applied, and so forth. 2. A camera might deliver an HDR but un-tonemapped image. This might simply fall under the HdrModeSingleExposure category, but if not maybe there's an argument for an HdrModeTonemapOnly variant. If there aren't multiple exposures going throught the pipeline, then it doesn't really matter what the HdrChannel says. I'd probably go with "short" because it kind of does have that exposure, but minus all the noise. Or we could invent a new category, don't really mind. 3. If the camera delivers a ready-tonemapped HDR image... to the ISP, this will simply be ToneMapOff. Hopefully that makes some sense. Interested to hear what folks think! Thanks David David Plowman (1): libcamera: controls: Add controls for HDR src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+)