From patchwork Wed May 19 07:59:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12315 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 3E4FFC31FF for ; Wed, 19 May 2021 07:59:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A032A6891F; Wed, 19 May 2021 09:59:49 +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="NzZyyiwH"; dkim-atps=neutral Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A0BE68911 for ; Wed, 19 May 2021 09:59:49 +0200 (CEST) Received: by mail-pg1-x52f.google.com with SMTP id m124so8859746pgm.13 for ; Wed, 19 May 2021 00:59:48 -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:mime-version :content-transfer-encoding; bh=rZY8DWTjixH7//Sjj6F+LoSU9ppcv0QEp9yeRAYlczY=; b=NzZyyiwHllr6iqaqRVdGbme/8Uwiijm/s/EzRxhmd1WATu1H1aQUnXKmL3H/tia8Dm JJh93JdOE5W42HUjAPM1TLyHvcA13uzNmtY13MHs/Z+reqncXjicMM4oqedxs4EZ5qTL ieAxMETbP16i8V63wVn0fi8770C0SiEm6XAkI= 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=rZY8DWTjixH7//Sjj6F+LoSU9ppcv0QEp9yeRAYlczY=; b=tnBkf97y8DtU4SVabNcq+eqTJLs/qddHY8c2PN4fC3WyQB57eyF862pM+I75snRfNM OzqNO8KuDon3isi3lMs+mivPNjRpeU3cWBVlbNMO/UmVQSqrdhIgTfR4DSNb+HoaJn+n OtXRcOf6PdQhigewlQoYvUfqC+3GhGB5ytGZfyrwEwjOE7XiW0B2JtaFyh0yv7AtIobU zgC/61vu3DbucbexqMu5bjKoxesxhZwheU8MwQNeuS39K6NfugGoiyDOtJscPFVhbxZ2 aEwAllf/uvfx5SP65J4FrLm2qvIHDIx6PTqKoZ8D5/6Nnoao03TNy+Oa//WueX1bKl32 +FiA== X-Gm-Message-State: AOAM5300+J87Q54uXZXPJFK6yKDrOzIWH1JUFd71Cn8BD6zn5svPEGk6 +khpL99VQchCFHXXqnx0NDzM9oJ9iSrbYw== X-Google-Smtp-Source: ABdhPJx7sajd7E7ixvd3MySbysuaMF6iP+odHKHH4xxz+Fpb/PsF1Ll4THbBjspy32OeMIxzVqFDUQ== X-Received: by 2002:a63:6784:: with SMTP id b126mr9553085pgc.209.1621411187258; Wed, 19 May 2021 00:59:47 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:3948:91a2:b8ec:1976]) by smtp.gmail.com with ESMTPSA id 80sm1160847pfw.200.2021.05.19.00.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 00:59:46 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 19 May 2021 16:59:36 +0900 Message-Id: <20210519075941.1337388-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.751.gd2f1c929bd-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 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 88d81ac4..b1fe1dc6 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -615,4 +615,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). + ...