From patchwork Thu May 6 07:54:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12200 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 90D46BDE7F for ; Thu, 6 May 2021 07:55:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5262E6891D; Thu, 6 May 2021 09:55:00 +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="Ol5jBS7x"; dkim-atps=neutral Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BB1766890E for ; Thu, 6 May 2021 09:54:58 +0200 (CEST) Received: by mail-pg1-x529.google.com with SMTP id m12so4143261pgr.9 for ; Thu, 06 May 2021 00:54:58 -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=Krzn6mw8SbjmKOeNdoZjZqHeYTQu5C67qgFMCmk9PL4=; b=Ol5jBS7xppgGSckNL5N1pCwJDpuBqht+fxmmzUmCiPjBHqzU2UEj5HSak62K37SYGA co6u5Ni0PykwDuUfSACFIs+KhCr1vwbsdwdjHpESOgl0P081OsFCD9N1lEI4rXwPR3mh 2o1VZ2zQMc6X3QddJMetVZlYWxexnWPTyQOpM= 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=Krzn6mw8SbjmKOeNdoZjZqHeYTQu5C67qgFMCmk9PL4=; b=uIZ7a/6Ed0svLvB3YB0xlsUfLmTdojJNxjiiRRfEyzkfRnzAbsEkufywr2aRg/T8jC /zWUBCOeXHykKl8fW5qFTfppZ42ujnTFsSgSWuCt2v3hmhbzVbjoSc/lXBqw+uKN/PbP S71yy4GdSZ2nVwsgFatYwRcK2YB8RVf1Dp8jZkULhPqvDOz9XpYAadnQ3K2YgX/7kX5i C5spCzUFjbP0Js62jQNQPMv/Ty+2+Wsj6cTpUaonUwY4N6+b6JLASeLZL0FQapWbjUiQ bUce7p9K192Q5025HkRE17qNs5IVGPNMNn5y64VCcBaAM1l6I7kD0sNLX6TbcyTyxCPC nLLQ== X-Gm-Message-State: AOAM531abzMHnf24FTeUBpPd2SEKTqekYNCo7pUg2xPl0GjzBtDkTpFH CSc+xD7WmNxzOh7yZsOZZILLSIiwxHowmg== X-Google-Smtp-Source: ABdhPJysu4rCUWUZesAVPisWJim9uuZ/pwTo9hYeEU/xuEf1StocanvMr5zYGcrEYulc62qJnS7o/w== X-Received: by 2002:a63:a547:: with SMTP id r7mr3000425pgu.7.1620287697178; Thu, 06 May 2021 00:54:57 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:ede4:ae0e:d4a4:c0d3]) by smtp.gmail.com with ESMTPSA id f201sm1355546pfa.133.2021.05.06.00.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 00:54:56 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 6 May 2021 16:54:44 +0900 Message-Id: <20210506075449.1761752-2-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog In-Reply-To: <20210506075449.1761752-1-hiroh@chromium.org> References: <20210506075449.1761752-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 1/6] 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). + ...