summaryrefslogtreecommitdiff
path: root/camera
diff options
context:
space:
mode:
authorSam Hasinoff <hasinoff@google.com>2015-06-29 15:30:57 -0700
committerSam Hasinoff <hasinoff@google.com>2015-07-06 13:07:59 -0700
commitc2094e520c74227750b23d89ec2bd557deef1743 (patch)
tree6f38c2e8d073b6ee3ca279eb6631f1bf567c6ee6 /camera
parent15c885c961587c4e868a9cf6ef3054042e2975f8 (diff)
downloadshamu-c2094e520c74227750b23d89ec2bd557deef1743.tar.gz
Improve raw noise model for N6.
Replace the current raw noise model, calibrated using Android's dng_noise_model.py script, with an improved noise model, using an updated version of that script. The new raw noise model has a different parameterization in terms of ISO: - The formula for 'S' scales with ISO. While shot noise should be zero for a completely dark signal, we still include an offset here to help compensate for black level variations with ISO. - The new formula for 'O' scales with ISO^2, not ISO. This form is required because 'O' corresponds to the *variance* due to read noise. The new formula also treats analog and digital gain separately. While pre-ADC read noise is affected by both types of gain, post-ADC read noise is affected *only* by digital gain. Bug: 16273313 Change-Id: Iec5c7854c1d529b97567235cda9a8041b0ec0914
Diffstat (limited to 'camera')
-rw-r--r--camera/QCamera2/HAL3/QCamera3HWI.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 7df3b9a4..940ab3ce 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -5247,8 +5247,8 @@ int32_t QCamera3HardwareInterface::getScalarFormat(int32_t format)
*==========================================================================*/
double QCamera3HardwareInterface::computeNoiseModelEntryS(int32_t sens) {
- double s = 3.738032e-06 * sens + 3.651935e-04;
- return s < 0.0 ? 0.0 : s;
+ double s = 4.290559e-06 * sens + 4.370087e-05;
+ return s < 0.0 ? 0.0 : s;
}
/*===========================================================================
@@ -5264,8 +5264,10 @@ double QCamera3HardwareInterface::computeNoiseModelEntryS(int32_t sens) {
*==========================================================================*/
double QCamera3HardwareInterface::computeNoiseModelEntryO(int32_t sens) {
- double o = 4.499952e-07 * sens + -2.968624e-04;
- return o < 0.0 ? 0.0 : o;
+ double digital_gain = sens / 320.0;
+ digital_gain = digital_gain < 1.0 ? 1.0 : digital_gain;
+ double o = 6.011498e-11 * sens * sens + 2.173219e-06 * digital_gain * digital_gain;
+ return o < 0.0 ? 0.0 : o;
}
/*===========================================================================