summaryrefslogtreecommitdiff
path: root/src/qcam/format_converter.cpp
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-12-06 14:49:17 +0900
committerJacopo Mondi <jacopo@jmondi.org>2021-12-06 17:41:46 +0100
commite1b70e764fdeaaf423ec22776100be40e59bb0c3 (patch)
tree36d0d48bba2076b65efb27d7965373fe3958b2b0 /src/qcam/format_converter.cpp
parent5148c0aa7e5957628c4fe6b8b9bca9e923e608ce (diff)
libcamera: camera_sensor: Enable to set a test pattern mode
This adds a function to set a camera sensor driver a test pattern mode. CameraSensor initializes the test pattern mode by Off. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/qcam/format_converter.cpp')
0 files changed, 0 insertions, 0 deletions
03 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (C) 2019, Raspberry Pi Ltd
 *
 * agc.h - AGC/AEC control algorithm
 */
#pragma once

#include <vector>
#include <mutex>

#include <libcamera/base/utils.h>

#include "../agc_algorithm.h"
#include "../agc_status.h"
#include "../pwl.h"

/* This is our implementation of AGC. */

/*
 * This is the number actually set up by the firmware, not the maximum possible
 * number (which is 16).
 */

constexpr unsigned int AgcStatsSize = 15;

namespace RPiController {

struct AgcMeteringMode {
	double weights[AgcStatsSize];
	int read(const libcamera::YamlObject &params);
};

struct AgcExposureMode {
	std::vector<libcamera::utils::Duration> shutter;
	std::vector<double> gain;
	int read(const libcamera::YamlObject &params);
};

struct AgcConstraint {
	enum class Bound { LOWER = 0, UPPER = 1 };
	Bound bound;
	double qLo;
	double qHi;
	Pwl yTarget;
	int read(const libcamera::YamlObject &params);
};

typedef std::vector<AgcConstraint> AgcConstraintMode;

struct AgcConfig {
	int read(const libcamera::YamlObject &params);