mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 00:55:07 +03:00
The terms "shutter" and "shutter speed" are used through libcamera to mean "exposure time". This is confusing, both due to "speed" being used as "time" while it should be the inverse (i.e. a maximum speed should correspond to the minimum time), and due to "shutter speed" and "exposure time" being used in different places with the same meaning. To improve clarity of the code base and the documentation, use "exposure time" consistently to replace "shutter speed". This rename highlighted another vocabulary issue in libcamera. The ExposureModeHelper::splitExposure() function used to document that it splits "exposure time into shutter time and gain". It has been reworded to "split exposure into exposure time and gain". That is not entirely satisfactory, as "exposure" has a defined meaning in photography (see https://en.wikipedia.org/wiki/Exposure_(photography)) that is not expressed as a duration. This issue if left to be addressed separately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
59 lines
1.8 KiB
C
59 lines
1.8 KiB
C
/* SPDX-License-Identifier: BSD-2-Clause */
|
|
/*
|
|
* Copyright (C) 2019-2020, Raspberry Pi Ltd
|
|
*
|
|
* description of a particular operating mode of a sensor
|
|
*/
|
|
#pragma once
|
|
|
|
#include <libcamera/transform.h>
|
|
|
|
#include <libcamera/base/utils.h>
|
|
|
|
/*
|
|
* Description of a "camera mode", holding enough information for control
|
|
* algorithms to adapt their behaviour to the different modes of the camera,
|
|
* including binning, scaling, cropping etc.
|
|
*/
|
|
|
|
struct CameraMode {
|
|
/* bit depth of the raw camera output */
|
|
uint32_t bitdepth;
|
|
/* size in pixels of frames in this mode */
|
|
uint16_t width;
|
|
uint16_t height;
|
|
/* size of full resolution uncropped frame ("sensor frame") */
|
|
uint16_t sensorWidth;
|
|
uint16_t sensorHeight;
|
|
/* binning factor (1 = no binning, 2 = 2-pixel binning etc.) */
|
|
uint8_t binX;
|
|
uint8_t binY;
|
|
/* location of top left pixel in the sensor frame */
|
|
uint16_t cropX;
|
|
uint16_t cropY;
|
|
/* scaling factor (so if uncropped, width*scaleX is sensorWidth) */
|
|
double scaleX;
|
|
double scaleY;
|
|
/* scaling of the noise compared to the native sensor mode */
|
|
double noiseFactor;
|
|
/* minimum and maximum line time and frame durations */
|
|
libcamera::utils::Duration minLineLength;
|
|
libcamera::utils::Duration maxLineLength;
|
|
libcamera::utils::Duration minFrameDuration;
|
|
libcamera::utils::Duration maxFrameDuration;
|
|
/* any camera transform *not* reflected already in the camera tuning */
|
|
libcamera::Transform transform;
|
|
/* minimum and maximum frame lengths in units of lines */
|
|
uint32_t minFrameLength;
|
|
uint32_t maxFrameLength;
|
|
/* sensitivity of this mode */
|
|
double sensitivity;
|
|
/* pixel clock rate */
|
|
uint64_t pixelRate;
|
|
/* Mode specific exposure time limits */
|
|
libcamera::utils::Duration minExposureTime;
|
|
libcamera::utils::Duration maxExposureTime;
|
|
/* Mode specific analogue gain limits */
|
|
double minAnalogueGain;
|
|
double maxAnalogueGain;
|
|
};
|