From patchwork Thu Jun 10 08:25:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12545 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 C5B0CBD78E for ; Thu, 10 Jun 2021 08:25:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2358C6892F; Thu, 10 Jun 2021 10:25:47 +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="mjIFKA5t"; dkim-atps=neutral Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 770F6602C5 for ; Thu, 10 Jun 2021 10:25:46 +0200 (CEST) Received: by mail-pl1-x634.google.com with SMTP id 69so595150plc.5 for ; Thu, 10 Jun 2021 01:25:46 -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=mjIFKA5tl5yMYk48QwoSc0BCWBHh05UurqyVwIt8EpvmSBm+SfTopr3Dcjyo7cZund f4NAC+J/wwX3WMfaMmjiW1BjhMuoxXX/1kxSDiq1C6bhWiOhRZEqyO3lBP00xXUctAb6 5gV0fBFS8mpPSLUBNCLGkTohl02Fk65Izk29E= 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=sd9ZWxaOaIUEv3wmR3NbTeSkmj/mPCN9YyHhz2LTJAL/gs6tLj8LXOo39yPo0VmI+a t0IAsi2V94t5scZYR8sCK1azMcVrzKS+n5eY1bJtdpD7eTt3VCigvZVFbUu/cE66I7Fe C7hTJOv5xGjicakPZB2MScn3J8CPik4t6XC0QTuVvKeHqUpfaJTFmAUexXLryUpMEE2q Lk7xJm+Bfcl6zgnMRy9XCxnHGMbvV1OLrQAva5czwwMJI7tJGAJ59bln4twvlXqV64x/ omoCLC9XVR+kgN4yo2jHZets6b0sSTonnIDeBmUtgNAWA/d/8XDY93UbYNE97ZZRPk2a vJyA== X-Gm-Message-State: AOAM532C4BZ3biUn3IyaKzfO/pqmnqynzq3WhROObjmCLi8LCxFjtTSk tzTYqhtcedy65M9pVhYn3DgEeDaFjwt07Q== X-Google-Smtp-Source: ABdhPJzs381kdWohINj9jtvLVYmaqrHNk4ZabF6IQL+A+uKPWSO1zupySStn1OsuYr4Ae/BCe5DdEQ== X-Received: by 2002:a17:903:2289:b029:109:8cf1:7d9a with SMTP id b9-20020a1709032289b02901098cf17d9amr3809543plh.53.1623313544763; Thu, 10 Jun 2021 01:25:44 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:98e0:b356:1c8a:25d4]) by smtp.gmail.com with ESMTPSA id x3sm2087011pgx.8.2021.06.10.01.25.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:25:44 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 10 Jun 2021 17:25:34 +0900 Message-Id: <20210610082539.529739-1-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 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). + ...