From patchwork Wed Apr 28 07:36:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12124 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 7C824BDE44 for ; Wed, 28 Apr 2021 07:36:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3C3B6688C3; Wed, 28 Apr 2021 09:36:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OZw6vtKB"; dkim-atps=neutral Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 252F3688C0 for ; Wed, 28 Apr 2021 09:36:26 +0200 (CEST) Received: by mail-pl1-x635.google.com with SMTP id s20so16480966plr.13 for ; Wed, 28 Apr 2021 00:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JAA9SPbVs6+tfAE+HktRBVUwgn3i3AHc7hb4F5a4GD0=; b=OZw6vtKB1HPQ4q4FPQWBiGyw1Ky/xehOeKJzRrjlkrSUgxBfxbJ7NSGMj1Zo4zfjRS Cdr2b7UwKMJeHVzSgTsDRQXG4QMXHn0iOyu0ii2n9jAhBVYbVvX/oQofRi3xW4ZAcg3A sVKzCxMaCkxSpc+t+NOw80XW36kkaPIRB1DA4= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=JAA9SPbVs6+tfAE+HktRBVUwgn3i3AHc7hb4F5a4GD0=; b=bQ7ToUyA+hdeABVH6+/01UzT2kEnSLzQoO44iDnF16ZEewq/eCfSZNFE0JEXNJmj2T Z0EJ37K0iLI2sq9qsSVlAjUqz1zMvdWUThUQfm80stKQiE1fmYOT1AOenTNO4BoG/f6E kovCbn1OiP8MF2I71pWYLbLuQSS766An4q3yHKAbuREVKRaG/VEjnv/cl/88lanKmxKW WXEKGhE8W3o9nZQuVqdnmSCtr+i6Zz5+cSi07ojLuiFMx4JCDHaIpqihhDH3Mu0xK/oi vKLeMYXvSsMVeLqttDZgq1+7bOlw+Dew+2KiHSvU9smAtz5kjyyd2rDdcUhydGUi9CsU GemA== X-Gm-Message-State: AOAM531n7GNYfOVFo2hiPiMKPq1wr2JKAjtFxy5G9k85YWhwWyXCpNw3 RCHErpShRVFFRGdAvUBuQ/mhzy1IqSrmSg== X-Google-Smtp-Source: ABdhPJy+5YvxCaEQdJkuAmQ6i74DibSTEnAMXhl1QQ3kLiIPE7wnYliuXEgCmq/JhYz44XJbYngqhg== X-Received: by 2002:a17:902:b60d:b029:e6:7a9:7f4 with SMTP id b13-20020a170902b60db02900e607a907f4mr28427195pls.3.1619595384347; Wed, 28 Apr 2021 00:36:24 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:489:a5f4:117:7d51]) by smtp.gmail.com with ESMTPSA id m11sm1661265pgs.4.2021.04.28.00.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 00:36:23 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 28 Apr 2021 16:36:11 +0900 Message-Id: <20210428073617.373422-2-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog In-Reply-To: <20210428073617.373422-1-hiroh@chromium.org> References: <20210428073617.373422-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 1/7] libcamera: controls: Add sensor test pattern mode 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" The control is used to report available sensor test pattern modes and also specify the mode to sensor. Signed-off-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- src/libcamera/control_ids.yaml | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index b4771f9d..cc472863 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -608,4 +608,62 @@ controls: detection, additional format conversions etc) count as an additional pipeline stage. + - TestPatternMode: + type: int32_t + draft: true + description: | + Control to select the test pattern mode. Currently identical to + ANDROID_SENSOR_TEST_PATTERN_MODE. + enum: + - name: TestPatternModeOff + value: 0 + description: | + No test pattern mode is used. The camera device returns frames from + the image sensor. + - name: TestPatternModeSolidColor + value: 1 + description: | + Each pixel in [R, G_even, G_odd, B] is replaced by its respective + color channel provided in test pattern data. + \todo Add control for test pattern data. + - name: TestPatternModeColorBars + value: 2 + description: | + All pixel data is replaced with an 8-bar color pattern. The vertical + bars (left-to-right) are as follows; white, yellow, cyan, green, + magenta, red, blue and black. Each bar should take up 1/8 of the + sensor pixel array width. When this is not possible, the bar size + should be rounded down to the nearest integer and the pattern can + repeat on the right side. Each bar's height must always take up the + full sensor pixel array height. + - name: TestPatternModeColorBarsFadeToGray + value: 3 + description: | + The test pattern is similar to TestPatternModeColorBars, + except that each bar should start at its specified color at the top + and fade to gray at the bottom. Furthermore each bar is further + subdevided into a left and right half. The left half should have a + smooth gradient, and the right half should have a quantized + gradient. In particular, the right half's should consist of blocks + of the same color for 1/16th active sensor pixel array width. The + least significant bits in the quantized gradient should be copied + from the most significant bits of the smooth gradient. The height of + each bar should always be a multiple of 128. When this is not the + case, the pattern should repeat at the bottom of the image. + - name: TestPatternModePn9 + value: 4 + description: | + All pixel data is replaced by a pseudo-random sequence generated + from a PN9 512-bit sequence (typically implemented in hardware with + a linear feedback shift register). The generator should be reset at + the beginning of each frame, and thus each subsequent raw frame with + this test pattern should be exactly the same as the last. + - name: TestPatternModeCustom1 + value: 5 + description: | + The first custom test pattern. All custom patterns that are + available only on this camera device are at least this numeric + value. All of the custom test patterns will be static (that is the + raw image must not vary from frame to frame). + ...