From patchwork Mon Jun 7 01:13:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12494 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 C4761C320B for ; Mon, 7 Jun 2021 01:14:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D30196892D; Mon, 7 Jun 2021 03:14:10 +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="XjpDt1VS"; dkim-atps=neutral Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6F51C68921 for ; Mon, 7 Jun 2021 03:14:09 +0200 (CEST) Received: by mail-pj1-x1032.google.com with SMTP id g24so8805426pji.4 for ; Sun, 06 Jun 2021 18:14:09 -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=Kp7vtkneKHWsTVr8H9RoZEqk8QShPlfAx9tM5R6qx14=; b=XjpDt1VSP397KivQ2auR1Y+ONNYCWqnfnyn+FrO4Uc9cJ5M44iZE2/X+vPxYN+v40d K15GILSWZnX7yBNSivT43zDYM0AFFXVyvy80RHt4bJbPAsfuuHZ7JPJDJg8H4MrV+j3x 8RT7UZ7VkC/18ERMiaItNeMsaGw4JitwinOEc= 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=Kp7vtkneKHWsTVr8H9RoZEqk8QShPlfAx9tM5R6qx14=; b=jbJ5ma8q2h94agvHO+UccDyH83zlHjTd3+g1EllRmx9zcJT9jxWKhhRdYJghSx0Cq0 Q95/jmoHAISEz1ewucaj9RXG0m1GDk6rJbV6uAU7I1d1a8hqP28PFgAUYdDuyZj2UZ0v aslS8lkX6NqFYNhspqbZOQ5HAl60Vxo1SOJvaRS2G9Fo3Qtw0inDA9JhD7MZ+WO2wi/d QWUN5StvXQb7bQOPxnMIFVL6MdcRG++JfWXCmAar6aLwoBPYXeN+XRYLjNCvWPYDGXxT 1dXCPntKlmZCoqpFi5gVUSZLuUe/tYO6Dm3g8u2w5aKS/ZAlt+DK1WUCS7i47gNaUZgX hacQ== X-Gm-Message-State: AOAM532LlHqcmDwDFXMWSXt8AKVUgJHtebkJsSOKj/po8XvGJ7Bma561 5P9rIuO+Y+hHYFaRePpLWIaYZD3bfI/TrA== X-Google-Smtp-Source: ABdhPJylX+kglg1sLUTP5U0Ma8PMMY6fiskjJTKEU/RL1ISin5C1VOcTh0vz1nt0khOn8FUsFdIKlQ== X-Received: by 2002:a17:902:d64c:b029:101:17cb:e63c with SMTP id y12-20020a170902d64cb029010117cbe63cmr15724352plh.3.1623028447420; Sun, 06 Jun 2021 18:14:07 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:6eb1:2d91:79ee:2043]) by smtp.gmail.com with ESMTPSA id h12sm7303655pgn.54.2021.06.06.18.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Jun 2021 18:14:06 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 7 Jun 2021 10:13:57 +0900 Message-Id: <20210607011402.55331-1-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v7 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 Reviewed-by: Laurent Pinchart --- 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 f62ade48..d92f29f5 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -622,4 +622,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: 256 + 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). + ...