From patchwork Fri Apr 9 04:32:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11875 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 C1676BD16B for ; Fri, 9 Apr 2021 04:32:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 785556879E; Fri, 9 Apr 2021 06:32:19 +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="EMksSMuv"; dkim-atps=neutral Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4906F687F6 for ; Fri, 9 Apr 2021 06:32:17 +0200 (CEST) Received: by mail-pf1-x433.google.com with SMTP id y16so3396734pfc.5 for ; Thu, 08 Apr 2021 21:32:17 -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=q5RFrfd6VVochhtE8B6hQ1ngTLphNO+zgetVv/vHVoo=; b=EMksSMuv+cxxP1HsNh7E5a4XHI0jTHFs+J66UEMrwRlUewCgJYz0WK11x+VC6+o5b4 VbFRbhtNEhOVVXiT14DiAvG7/c15HwgoFMEqDfHYxDwrwyleexxa6Wo8Dwdg7B32Nyky mvHYZaOLyPIah0vQgTbkuCV9C4hpW0sRJ1VS4= 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=q5RFrfd6VVochhtE8B6hQ1ngTLphNO+zgetVv/vHVoo=; b=RPsNbGhylOX10Q7lKv17f0velm86ljSNlYufuDfFdHJBnqNVjldzoojzdqh0EMhrLy ollIZlVPvPNfU/QFZ1tYFCbVHJ0tYpzYRfVVNaUg/xZajcgj3QMt/4tJcVBk/eOa3LMH jTZD+b9b52aNvA1Azam4doPPOgZqJuQ8HVjOE/xNno1spGd5DUQ9DD6H+W7dSJP7ke7P y/brkYbeUMD9vXkdbnn0Hc1qhzTmg7J/8mFjxgxsSyeM/0HEP1DRizG9K9Mbxz0myjQ9 X85UhlkRdPZ283Z2Sc/JdMDvpIu/7frP0c7adSXPLUG4NoiD/b3sLWcFdxSZsorJKG/V MT3w== X-Gm-Message-State: AOAM531JZYOe5AoJ8wXLHwjvuzc6hJwu0Z+I6vVvIpS5O7Zu+0ITMDQb m4iItzpGVOuRTvnZeXC+AE3t9OdR4xIB5w== X-Google-Smtp-Source: ABdhPJyJIB/QEeZyHhXjgPpMzZEl/VUM+crdmi7I9O/bUg0zsUehHawrAzMYaEkXvc1Gg/cedWvYYw== X-Received: by 2002:a62:1949:0:b029:241:be9d:c708 with SMTP id 70-20020a6219490000b0290241be9dc708mr10377552pfz.37.1617942735440; Thu, 08 Apr 2021 21:32:15 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7567:510e:1b47:ce92]) by smtp.gmail.com with ESMTPSA id il6sm737275pjb.56.2021.04.08.21.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 21:32:15 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Fri, 9 Apr 2021 13:32:04 +0900 Message-Id: <20210409043208.1823330-2-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.295.g9ea45b61b8-goog In-Reply-To: <20210409043208.1823330-1-hiroh@chromium.org> References: <20210409043208.1823330-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 1/5] 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..be2f710a 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. + - SensorTestPatternMode: + type: int32_t + draft: true + description: | + Control to select the sensor test pattern mode. Currently identical to + ANDROID_SENSOR_TEST_PATTERN_MODE. + + Mode of operation for the test pattern mode. + enum: + - name: SensorTestPatternModeOff + value: 0 + description: | + No test pattern mode is used. The camera device returns from the + image sensor. + - name: SensorTestPatternModeSolidColor + value: 1 + description: | + Each pixel in [R, G_even, G_odd, B] is replaced by its respective + color channel. + - name: SensorTestPatternModeColorBars + 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: SensorTestPatternModeColorBarsFadeToGray + value: 3 + description: | + The test pattern is similar to SensorTestPatternModeColorBars, + 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: SensorTestPatternModePn9 + 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: SensorTestPatternModeCustom1 + 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). + ...