From patchwork Tue Apr 28 08:11:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 3585 Return-Path: Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D95F603F7 for ; Tue, 28 Apr 2020 10:11:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="lz+Fk6yM"; dkim-atps=neutral Received: by mail-wr1-x443.google.com with SMTP id i10so23503307wrv.10 for ; Tue, 28 Apr 2020 01:11:59 -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; bh=9wpRjoniFwqVAnYQCY9XR949dMUm0LEwd23y6i7R1y8=; b=lz+Fk6yMC2cJawQNfETJEGuOVrO0T4QW+o4LfRACdcMSjoz+z2WwjiKxYGSg+ZP2zR 5hz+rtmbBYw9RJJ1Ldd4F+wtUU9IKqCBAUeeQF+FcXpOaUoCW/y3xbSzSaQyAZtL+AV7 wr1P7yDrQhbJLIllxhIzO+oWcBwexTeEJcRcIH8UGIulB5q5h1e6W1oby7RIwW1l/4Iw hTC0JmqCsBG0IaUkPs99W3r/CQSOmHzk9XebWwBW0pdZPymWhgIUjmM2ueUlfWpSjRKI FRv77PX9+7SWetYrVCiW7QoZexuDMZ7oWH+fa6FnUO/ektpgmIpw/jOW7Ke3cIdGBfry N0oQ== 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; bh=9wpRjoniFwqVAnYQCY9XR949dMUm0LEwd23y6i7R1y8=; b=rKRr1VD4GkjLxeP7E5LPkEK/Bfgbw578tQ1lrlhxZaH8cnfWuyJNgIUIa62Dqi3dqG TFM35OImE7kk0Jx7c3T8JLPvNVxhjBsAyKmq/9d1KkTWVtIVQ5WK0SKoyjsayLpfOWXP yAaoc8yFKCAdVawpJ0ao5c18b4++DZ6HjdU2s78xvi6x1WK2CqrcO3xhjE82yA7MJQjU CsmPclRJVULTpfaCBc901Rp5jSRzDyExnmFo6bMKkE8rV6nT/HeuhrK788pfHQhi6v1y sSZHTqQT21CtaffJ5DnoAjcCOuvbUApd0Ddy8wPX4OEZHvhm0yP54pLInEqwlhltZrN2 c6zA== X-Gm-Message-State: AGi0PuYtI41Bji7jjnNVwA6nyRWv3wI2P3WO80VmLPI14+aepB5o1q23 gifI08FHbaO/c9BjxcyKpC47v1yvlRSReA== X-Google-Smtp-Source: APiQypJO6EMqANr6qmqKQSRYq9e8L2d7Unc/jYsKL16rRWu6YeKAQCKcARFMJD4X+e7vWmAabA/0Dw== X-Received: by 2002:adf:b35c:: with SMTP id k28mr31905028wrd.61.1588061518581; Tue, 28 Apr 2020 01:11:58 -0700 (PDT) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id a20sm25668189wra.26.2020.04.28.01.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 01:11:58 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Tue, 28 Apr 2020 09:11:40 +0100 Message-Id: <20200428081140.5242-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH] libcamera: controls: Add sensor black levels reporting through metadata 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-List-Received-Date: Tue, 28 Apr 2020 08:11:59 -0000 From: David Plowman The black levels will be used when saving RAW data in DNG containers. Four values are reported, one for each channel, in the order R, Gr, Gb and B. The values are reported as being out of a 16-bit pixel range (a fully saturated pixel would be 65535), so may need subsequent re-scaling, depending on use. Signed-off-by: David Plowman Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- src/libcamera/control_ids.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index b419f8a7..77ebc3f9 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -230,4 +230,13 @@ controls: Specify a fixed saturation parameter. Normal saturation is given by the value 1.0; larger values produce more saturated colours; 0.0 produces a greyscale image. + + - SensorBlackLevels: + type: int32_t + description: | + Reports the sensor black levels used for processing a frame, in the + order R, Gr, Gb, B. These values are returned as numbers out of a 16-bit + pixel range (as if pixels ranged from 0 to 65535). The SensorBlackLevels + control can only be returned in metadata. + size: [4] ...