From patchwork Fri May 28 03:05:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12463 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 07FE1C3205 for ; Fri, 28 May 2021 03:05:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 743296891D; Fri, 28 May 2021 05:05:40 +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="SLq0yNlE"; dkim-atps=neutral Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AAC80602A8 for ; Fri, 28 May 2021 05:05:38 +0200 (CEST) Received: by mail-pf1-x434.google.com with SMTP id g18so2174766pfr.2 for ; Thu, 27 May 2021 20:05:38 -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=EmEFi71fdx/pdk21B+JDFadcOckyLnEZiA1WEAjXxS8=; b=SLq0yNlEd7xcj1Yq7ruIXJprrsLJTg1pt00/ZBh42FuuTeN+XHLR2pblw5XFguGC1n LNfCJ3HazpJNgilNxF/Kv39DbFGTfzign7EGrRgdXy06xiJyVZ2vEMY//v+ngJBhJ/re yuuTCJbbFPRYz/HofeTfWpwAycEAu2pIT175o= 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=EmEFi71fdx/pdk21B+JDFadcOckyLnEZiA1WEAjXxS8=; b=lTiePNrbYgKHnXrOcVz4eD1+HQSEVDe5fp0EylIy38hNA429OYD9aJ2EqmrN/2CCAF k/NK747T7pPmDyaUFaFH2CIbLTKJd1l8xMO/ScjcjajPnWEh0xi9FDwTD9qEKJyd/OjB Ih/GETT8MKtTbJLGIAq3jvuE5V7fmFj5N2D2qPOgpcfABTWRH2XJvgOFbFv1esE17Twa I2tLiBs4vtpKc5RD2rC5bvIR6y88FtqWfAILtY45YZ3tQoJxKe5Ods2/Hx6VRjUH36KM YcehhuTo3qVgugzTdbO5CPWCVCbL0WVW2/FArR2Yv+GfkGucc+YgYaj5RndxckDlMTr0 QkYw== X-Gm-Message-State: AOAM530WsOfOcSMskfNG8XIiZ8gj3CBzJ+vyM4MsKHiUVkoM5D+zeseN C04IdtE1qcpq9UVHvJSGGehYTPWkKsrC3g== X-Google-Smtp-Source: ABdhPJwOPiPPlKFYbvCKUVIe34Qmgug6p1+tPtO68rqULr4Gk5sqCtxHyvF8JVaqjwxgYQmGxi05wQ== X-Received: by 2002:a62:3242:0:b029:2d5:5913:7fd with SMTP id y63-20020a6232420000b02902d5591307fdmr1710951pfy.30.1622171136615; Thu, 27 May 2021 20:05:36 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:caec:ab3b:ea16:3d01]) by smtp.gmail.com with ESMTPSA id l20sm2892051pjq.38.2021.05.27.20.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 20:05:36 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Fri, 28 May 2021 12:05:26 +0900 Message-Id: <20210528030531.189492-1-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 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 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). + ...