From patchwork Tue Jan 9 14:30:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19381 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 F2CBFBEFBE for ; Tue, 9 Jan 2024 14:29:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7D9C962B41; Tue, 9 Jan 2024 15:29:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1704810595; bh=8TQo8lpdICPjsU3+SEsfwtE8zjCLGTCtsKBBVFyxDXk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=ahIJH0L94LpzZWspJhgJYq43sCv3VaglYUqb5U46pMy7oUdoAtTMKqjMzg8Ch4ezp i+ArzJEjhns7tiFqMOrHuK1lcAyFKK9YZ+U/A/bnnReQWw1KXBLBA0mCQ3+w91+wOn Ztb2owkVAV5r3CGmxRCCFPFa2aNlTRC9dC8hrz6kyODbr0Z/FD8ElHiiMbCay7MNaq FzDvUuqQejqZd/aH23FmacyjFnp8yICeK7m8bQb7iba2ocpKsUUdcePmP5aHbktIL4 8mJptoEKyuN6Jw1HUsiFm94LI64xOcCCEJBHE88AJT6mft/9hjzVUmUj0bFsc1zAbW wbDBDwl6yTz9g== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F365861D7B for ; Tue, 9 Jan 2024 15:29:53 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="q+pbldbi"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B88A5552; Tue, 9 Jan 2024 15:28:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1704810530; bh=8TQo8lpdICPjsU3+SEsfwtE8zjCLGTCtsKBBVFyxDXk=; h=From:To:Cc:Subject:Date:From; b=q+pbldbiFmsgnTcB28u4c6eqkEtsrAQQTfzSpTSLtVgfdbY4OgpPyiESrDX0C9Zru lYj6RgvN9klvFoUdhxkJoV5ai2N+yz9+O7h3VQaQyh5BT+SqxLy+UueUMCoeaIj4Ab Ri1xiq+rsn2aKuhmQaiifEpKkF3IXiWrWoQ+YFL8= To: libcamera-devel@lists.libcamera.org Date: Tue, 9 Jan 2024 16:30:02 +0200 Message-ID: <20240109143002.21733-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] Documentation: camera-sensor-model: Support Sphinx < 2.0 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-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Cc: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The language argument to the code-block directive was mandatory in Sphinx before 2.0. Fix the few instances where no language is specified to support older versions of Sphinx. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- Documentation/camera-sensor-model.rst | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Documentation/camera-sensor-model.rst b/Documentation/camera-sensor-model.rst index 58bf70e1dc5a..b66c880a5e00 100644 --- a/Documentation/camera-sensor-model.rst +++ b/Documentation/camera-sensor-model.rst @@ -105,35 +105,34 @@ control: will be downscaled in its vertical and horizontal sizes by the specified factor. - .. code-block:: + .. code-block:: c :caption: Definition: The horizontal and vertical binning factors horizontal_binning = xBin; vertical_binning = yBin; - - skipping Skipping reduces the image resolution by skipping the read-out of a number of adjacent pixels. The skipping factor is specified by the 'increment' number (number of pixels to 'skip') in the vertical and horizontal directions and for even and odd rows and columns. - .. code-block:: + .. code-block:: c :caption: Definition: The horizontal and vertical skipping factors - horizontal_skipping = (xOddInc + xEvenInc) / 2 - vertical_skipping = (yOddInc + yEvenInc) / 2 + horizontal_skipping = (xOddInc + xEvenInc) / 2; + vertical_skipping = (yOddInc + yEvenInc) / 2; Different sensors perform the binning and skipping stages in different orders. For the sake of computing the final output image size the order of execution is not relevant. The overall down-scaling factor is obtained by combining the binning and skipping factors. - .. code-block:: + .. code-block:: c :caption: Definition: The total scaling factor (binning + sub-sampling) - total_horizontal_downscale = horizontal_binning + horizontal_skipping - total_vertical_downscale = vertical_binning + vertical_skipping + total_horizontal_downscale = horizontal_binning + horizontal_skipping; + total_vertical_downscale = vertical_binning + vertical_skipping; 4. The output size is used to specify any additional cropping on the sub-sampled @@ -159,16 +158,16 @@ configurations: the *pixel rate* of the data sent on the MIPI CSI-2 bus allows to compute the image stream frame rate. The equation is the well known: - .. code-block:: + .. code-block:: c - frame_duration = total_frame_size / pixel_rate - frame_rate = 1 / frame_duration + frame_duration = total_frame_size / pixel_rate; + frame_rate = 1 / frame_duration; where the *pixel_rate* parameter is the result of the sensor's configuration of the MIPI CSI-2 bus *(the following formula applies to MIPI CSI-2 when used on MIPI D-PHY physical protocol layer only)* - .. code-block:: + .. code-block:: c - pixel_rate = CSI-2_link_freq * 2 * nr_of_lanes / bits_per_sample + pixel_rate = csi_2_link_freq * 2 * nr_of_lanes / bits_per_sample;