From patchwork Fri Apr 3 14:53:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 3375 Return-Path: Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4168062D64 for ; Fri, 3 Apr 2020 16:53:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Rj49iBe2"; dkim-atps=neutral Received: by mail-wm1-x341.google.com with SMTP id t8so7435251wmi.2 for ; Fri, 03 Apr 2020 07:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2Y/cvyHB3yCOEjWu2+FR5pgwdPYPAyACZPa/xctDsQU=; b=Rj49iBe2144+FJOr7XJegccJeM+Zc4USJNISlndbUzSjjrRl04uXoyHA/OqqAOnV/Y Ab1Ub55kUwC8BjXeo8YbGZdQ+fCrNlDaYM+FKC4xfkY5AN+Ci4wXMvgSTeud8jIylp6c P0sLRmvvEc9hXE1lGs++a9X9lGhf1HCpTW+gFtSaCwNvvWNPbe+UeQMOHkEk1XJ19Pkr 543QNlLeArDivHdo+Px/7iq4G+IF7wNS7/nZNhZbsl4xX6PzTx+46oHUyGKujWQ4Rebt FtVfl9ul2CJphRfPRqIY9RodWItNY3z6zOTQeX2/ZdVZUz4ZpG8garFfbNlzT+uoyI20 PXHQ== 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; bh=2Y/cvyHB3yCOEjWu2+FR5pgwdPYPAyACZPa/xctDsQU=; b=oHjHID/6bm6+4IcsEknMrgSmhTDEaMualcrLbpGWRfhq+F2lJuRuMNisJOZ4m6bhuQ YbOAdPsPHDxs7dsKSywZ5GtJ2wndN5cHb72T5OVnxAsm3xuKnSQpRzt84vGMEq+SWUnS z6OJOSWcqPSh28ssm2uWHuabwkkUmovLTut//6hxUoJ0uZQdm3grDPfr7xYZPJFn3E+y pOQ0rHQj6nETI4oewc5Rf7aq+DM6Za3rB+Ms+YHMlYUXVJKDA435P6iIgd+fNH4sKbTP RxEHwjEx99jVJ98jf0V7RSsmcrX275yxokpWi8XNhljsFZCKSkTZbna6Wc2Zax+R6W0y 9IYw== X-Gm-Message-State: AGi0PuZD27fVMvjVwsLYacqeC2DXv1GG+2aNPG2JTR4QbtaMLJcb33xo FSGf3LOBOTYoepeX1BXLnmKUkDLuV5tVSQ== X-Google-Smtp-Source: APiQypIwrxtQgCdldHJkrRh9tTgzvGOXZNGf+ytqPPA4OojXsxV7cTnaXvozgiU//GqZNn2mUvmThA== X-Received: by 2002:a7b:c144:: with SMTP id z4mr9645495wmi.128.1585925611818; Fri, 03 Apr 2020 07:53:31 -0700 (PDT) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id u5sm13559469wrp.81.2020.04.03.07.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 07:53:31 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 3 Apr 2020 15:53:05 +0100 Message-Id: <20200403145305.10288-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200403145305.10288-1-naush@raspberrypi.com> References: <20200403145305.10288-1-naush@raspberrypi.com> Subject: [libcamera-devel] [PATCH v3 5/5] libcamera: controls: Add AWB related controls 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: , X-List-Received-Date: Fri, 03 Apr 2020 14:53:32 -0000 AwbMode is a new enum type to specify operating mode of the AWB algorithm. All modes may not be supported by all platforms. ColourGains is a new float array type used to specify manual red and blue (in that order) colour channel gains when AWB is disabled. ColourTemperature is a new control to return the current estimate of the colour temperature. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- src/libcamera/control_ids.yaml | 55 +++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 50f9e07b..d2e1820a 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -162,7 +162,60 @@ controls: description: | Enable or disable the AWB. - \sa ManualGain + \sa ColourGains + + # AwbMode needs further attention: + # - Auto-generate max enum value. + # - Better handling of custom types. + - AwbMode: + type: int32_t + description: | + Specify the range of illumants to use for the AWB algorithm. The modes + supported are platform specific, and not all modes may be supported. + enum: + - name: AwbAuto + value: 0 + description: Search over the whole CT range. + - name: AwbIncandescent + value: 1 + description: Incandescent AWB lamp mode. + - name: AwbTungsten + value: 2 + description: Tungsten AWB lamp mode. + - name: AwbFluorescent + value: 3 + description: Fluorescent AWB lamp mode. + - name: AwbIndoor + value: 4 + description: Indoor AWB lighting mode. + - name: AwbDaylight + value: 5 + description: Daylight AWB lighting mode. + - name: AwbCloudy + value: 6 + description: Cloudy AWB lighting mode. + - name: AwbCustom + value: 7 + description: Custom AWB mode. + - name: AwbModeMax + value: 7 + description: Maximum allowed value (place any new values above here). + + - ColourGains: + type: float + description: | + Pair of gain values for the Red and Blue colour channels, in that + order. ColourGains can only be applied in a Request when the AWB is + disabled. + + \sa AwbEnable + size: [2] + + # ColourTemperature can only be returned in Metadata + - ColourTemperature: + type: float + description: Report the current estimate of the colour temperature for + this frame. - Saturation: type: int32_t