From patchwork Wed Apr 21 04:23:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12018 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 ED9BBBDB16 for ; Wed, 21 Apr 2021 04:23:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B05A868843; Wed, 21 Apr 2021 06:23:58 +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="YZ44PQIe"; dkim-atps=neutral Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 52ED4602C8 for ; Wed, 21 Apr 2021 06:23:57 +0200 (CEST) Received: by mail-pl1-x629.google.com with SMTP id e9so3926039plj.2 for ; Tue, 20 Apr 2021 21:23:57 -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=m/eODOzB3ee2ue1j6Fr81wG3SrpHu+DMI0Z0DLkyzX4=; b=YZ44PQIe4xQgr6axz1/1/9YEU3ezDP+srQWyCWl3fjTy2aHhNiKDKRI6DSP+KJwEvG pQjS4IvAWnSFj+x1nCN2UFOH0l68n4UH+IgZ6UXH+OTR3aAWiAEQTNoZ+PgjCLP93sUf hVlHhRqKa2qC22yYsp0Nvsty7CZv0ZWUBdw9U= 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=m/eODOzB3ee2ue1j6Fr81wG3SrpHu+DMI0Z0DLkyzX4=; b=c9IPeiDUH09RNP54dvseE2I+vy8yevqXxc8j/Rkv2+0QOMb4razcaFGTuepc57FQ6E V55ofKqLB2jrFo1ytcERN/9QKtxHor1/7ZPI88OQlQtXc9o56Wkadx9I5ZhLoEkRn1a2 mDTH3MpmkzdIYrnsyadde5Mrfrxo/dPpfOiI1t1WrfjKNVkx9AZZRMlVBjeu4TWwpg+4 /P2NSJBRQE1ba4vk4Vb3pdmlBhPeEzlfaXg0JCE3RSAyEohtMXYazamOkjbox7F/NlM1 O9VuQC87JrGIsi09ieFE4AJovA+Y7TeiI8RfpJW/EJoDzPgvy2pGNqmzwePVFoOm/ote faLg== X-Gm-Message-State: AOAM5318zG9Hd+VC9X0c+FSi0QvxDNBLKAfBgXZLqA8LMtpvxK761lIc +ht5q7NIidjRp9DOpFuT1I94qdj7htnZRg== X-Google-Smtp-Source: ABdhPJy4xzcEtwpVEon0TOimvHZTSoSz2RorqVB5GpqqNbROwdoGMtjN0a32gx9FnlgyeZ36E48Xrw== X-Received: by 2002:a17:902:e34b:b029:ec:9a57:9cba with SMTP id p11-20020a170902e34bb02900ec9a579cbamr18377459plc.56.1618979035814; Tue, 20 Apr 2021 21:23:55 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7aaa:cbeb:5d87:4ab6]) by smtp.gmail.com with ESMTPSA id z18sm461316pfa.39.2021.04.20.21.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 21:23:55 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 21 Apr 2021 13:23:40 +0900 Message-Id: <20210421042346.312854-2-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.368.gbe11c130af-goog In-Reply-To: <20210421042346.312854-1-hiroh@chromium.org> References: <20210421042346.312854-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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 | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index b4771f9d..5de75eb0 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -608,4 +608,63 @@ 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. + + Mode of operation for the test pattern mode. + enum: + - name: TestPatternModeOff + value: 0 + description: | + No test pattern mode is used. The camera device returns 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 mode 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). + ...