Lines Matching refs:Sensor
30 #include "Sensor.h"
37 const unsigned int Sensor::kResolution[2] = {640, 480};
39 const nsecs_t Sensor::kExposureTimeRange[2] =
41 const nsecs_t Sensor::kFrameDurationRange[2] =
43 const nsecs_t Sensor::kMinVerticalBlank = 10000L;
45 const uint8_t Sensor::kColorFilterArrangement =
49 const uint32_t Sensor::kMaxRawValue = 4000;
50 const uint32_t Sensor::kBlackLevel = 1000;
52 // Sensor sensitivity
53 const float Sensor::kSaturationVoltage = 0.520f;
54 const uint32_t Sensor::kSaturationElectrons = 2000;
55 const float Sensor::kVoltsPerLuxSecond = 0.100f;
57 const float Sensor::kElectronsPerLuxSecond =
58 Sensor::kSaturationElectrons / Sensor::kSaturationVoltage
59 * Sensor::kVoltsPerLuxSecond;
61 const float Sensor::kBaseGainFactor = (float)Sensor::kMaxRawValue /
62 Sensor::kSaturationElectrons;
64 const float Sensor::kReadNoiseStddevBeforeGain = 1.177; // in electrons
65 const float Sensor::kReadNoiseStddevAfterGain = 2.100; // in digital counts
66 const float Sensor::kReadNoiseVarBeforeGain =
67 Sensor::kReadNoiseStddevBeforeGain *
68 Sensor::kReadNoiseStddevBeforeGain;
69 const float Sensor::kReadNoiseVarAfterGain =
70 Sensor::kReadNoiseStddevAfterGain *
71 Sensor::kReadNoiseStddevAfterGain;
77 const nsecs_t Sensor::kRowReadoutTime =
78 Sensor::kFrameDurationRange[0] / Sensor::kResolution[1];
80 const int32_t Sensor::kSensitivityRange[2] = {100, 1600};
81 const uint32_t Sensor::kDefaultSensitivity = 100;
102 Sensor::Sensor():
117 Sensor::~Sensor() {
121 status_t Sensor::startUp() {
126 res = run("EmulatedFakeCamera2::Sensor",
130 ALOGE("Unable to start up sensor capture thread: %d", res);
135 status_t Sensor::shutDown() {
141 ALOGE("Unable to shut down sensor capture thread: %d", res);
146 Scene &Sensor::getScene() {
150 void Sensor::setExposureTime(uint64_t ns) {
156 void Sensor::setFrameDuration(uint64_t ns) {
162 void Sensor::setSensitivity(uint32_t gain) {
168 void Sensor::setDestinationBuffers(Buffers *buffers) {
173 void Sensor::setFrameNumber(uint32_t frameNumber) {
178 bool Sensor::waitForVSync(nsecs_t reltime) {
191 bool Sensor::waitForNewFrame(nsecs_t reltime,
201 ALOGE("Error waiting for sensor readout signal: %d", res);
213 Sensor::SensorListener::~SensorListener() {
216 void Sensor::setSensorListener(SensorListener *listener) {
221 status_t Sensor::readyToRun() {
222 ALOGV("Starting up sensor thread");
229 bool Sensor::threadLoop() {
231 * Sensor capture operation main loop.
258 ALOGVV("Sensor VSync");
279 ALOGVV("Sensor starting readout");
289 ALOGVV("Sensor readout complete");
321 ALOGVV("Sensor capturing buffer %d: stream %d,"
365 ALOGVV("Sensor vertical blanking interval");
385 void Sensor::captureRaw(uint8_t *img, uint32_t gain, uint32_t stride) {
423 ALOGVV("Raw sensor image captured");
426 void Sensor::captureRGBA(uint8_t *img, uint32_t gain, uint32_t stride) {
453 ALOGVV("RGBA sensor image captured");
456 void Sensor::captureRGB(uint8_t *img, uint32_t gain, uint32_t stride) {
482 ALOGVV("RGB sensor image captured");
485 void Sensor::captureNV21(uint8_t *img, uint32_t gain, uint32_t stride) {
490 // In fixed-point math, saturation point of sensor after gain
537 ALOGVV("NV21 sensor image captured");