From patchwork Fri Apr 24 21:52:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 3520 Return-Path: Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3FF73603FD for ; Fri, 24 Apr 2020 23:50:04 +0200 (CEST) X-Originating-IP: 87.3.55.240 Received: from uno.homenet.telecomitalia.it (host240-55-dynamic.3-87-r.retail.telecomitalia.it [87.3.55.240]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id EB1D860004; Fri, 24 Apr 2020 21:50:02 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 24 Apr 2020 23:52:53 +0200 Message-Id: <20200424215304.558317-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200424215304.558317-1-jacopo@jmondi.org> References: <20200424215304.558317-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 02/13] libcamera: properties: Define pixel array properties 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, 24 Apr 2020 21:50:04 -0000 Add definition of pixel array related properties. Reviewed-by: Niklas Söderlund Signed-off-by: Jacopo Mondi --- src/libcamera/property_ids.yaml | 155 ++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml index ce627fa042ba..8f6797723a9d 100644 --- a/src/libcamera/property_ids.yaml +++ b/src/libcamera/property_ids.yaml @@ -386,4 +386,159 @@ controls: | | | | +--------------------+ + + - PixelArraySize: + type: float + size: [2] + description: | + The physical sizes of the pixel array (width and height), in + millimeters. + + - PixelArray: + type: int32_t + size: [2] + description: | + The camera sensor pixel array vertical and horizontal sizes, in pixels. + + The property describes a rectangle with its top-left corner in position + (0, 0) and width and height described by the first and second values + of this property. + + The PixelArray property defines the rectangle that includes all possible + rectangles defined by the ActiveAreas property, and describes the full + pixel array, including non-active pixels, black level calibration + pixels etc. + + - ActiveAreas: + type: int32_t + size: [4 x n] + description: | + The camera sensor active pixel area rectangles, represented as + rectangles contained in the one described by the PixelArray property. + + This property describes an arbitrary number of overlapping rectangles, + representing the active pixel portions of the camera sensor pixel array. + + Each rectangle is defined by its displacement from pixel (0, 0) of + the rectangle described by the PixelArray property, a width and an + height. + + Each rectangle described by this property represents the maximum image + size that the camera module can produce for a given image resolution. + + Example 1. + A sensor which only produces images in the 4:3 image resolution will + report a single ActiveArea rectangle, from which all other image formats + are obtained by either cropping the field-of-view and/or applying pixel + sub-sampling techniques such as pixel skipping or binning. + + PixelArray(0) + /-----------------/ + x1 x2 + (0,0)-> +-o------------o-+ / + y1 o +------------+ | | + | |////////////| | | + | |////////////| | | PixelArray(1) + | |////////////| | | + y2 o +------------+ | | + +----------------+ / + + The property reports a single rectangle + + ActiveArea = (x1, y1, (x2 - x1), (y2 - y1)) + + Example 2 + A camera sensor which can produce images in different native + resolutions, will report several overlapping rectangle, one for each + natively supported resolution, ordered from the tallest to the shortest + one. + + PixelArray(0) + /-----------------/ + x1 x2 x3 x4 + (0,0)-> +o---o------o---o+ / + y1 | +------+ | | + | |//////| | | + y2 o+---+------+---+| | + ||///|//////|///|| | PixelArray(1) + y3 o+---+------+---+| | + | |//////| | | + y4 | +------+ | | + +----+------+----+ / + + The property reports two rectangles + + PixelArray = ( (x2, y1, (x3 - x2), (y4 - 1), + (x1, y2, (x4 - x1), (y3 - y2)) + + The first rectangle describes the maximum field-of-view of all image + formats in the 4:3 resolutions, while the second one describes the + maximum field of view for all image formats in the 16:9 resolutions. + + - BayerFilterArrangement: + type: int32_t + description: | + The pixel array color filter displacement. + + This property describes the arrangement and readout sequence of the + three RGB color components of the sensor's Bayer Color Filter Array + (CFA). + + Color filters are usually displaced in line-alternating fashion on the + sensor pixel array. In example, one line might be composed of Red-Green + while the successive is composed of Blue-Green color information. + + The value of this property represents the arrangement of color filters + in the top-left 2x2 pixel square. + + For example, for a sensor with the following color filter displacement + + (0, 0) (max-col) + +---+ +--------------...---+ + |B|G|<---|B|G|B|G|B|G|B|...B|G| + |G|R|<---|G|R|G|R|G|R|G|...G|R| + +---+ |B|G|B|G|B|G|B|...B|G| + ... .. + ... .. + |G|R|G|R|G|R|G|...G|R| + |B|G|B|G|B|G|B|...B|G| (max-lines) + +--------------...---+ + + The filter arrangement is represented by the BGGR value, which + correspond to the pixel readout sequence in line interleaved mode. + + enum: + - name: BayerFilterRGGB + value: 0 + description: | + Color filter array displacement is Red-Green/Green-Blue + + - name: BayerFilterGRBG + value: 1 + description: | + Color filter array displacement is Green-Red/Blue-Green + + - name: BayerFilterGBRG + value: 2 + description: | + Color filter array displacement is Green-Blue/Red-Green + + - name: BayerFilterBGGR + value: 3 + description: | + Color filter array displacement is Blue-Green/Green-Red + + - name: BayerFilterNonStandard + value: 4 + description: | + The pixel array color filter does not use the standard Bayer RGB + color model + + - ISOSensitivityRange: + type: int32_t + size: [2] + description: | + The range of supported ISO sensitivities, as documented by the + ISO 12232:2006 (or later) standard. + ...