From 3a639682b7c856ae004e7e3c840ec3c773436903 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Mon, 11 May 2020 10:24:54 -0700 Subject: [PATCH] Camera: Update documentation for rolling shutter skew Existing definition was inconsistent, so update it to be consistent and match what implementations have actually done. Test: Builds Bug: 150331548 Change-Id: Ied8e78a36685f3f6416e431307970db3b6191497 --- .../hardware/camera2/CaptureResult.java | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index ae04693b4ccfe..b54696741e2fc 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -3949,14 +3949,24 @@ public class CaptureResult extends CameraMetadata> { new Key("android.sensor.testPatternMode", int.class); /** - *

Duration between the start of first row exposure - * and the start of last row exposure.

- *

This is the exposure time skew between the first and last - * row exposure start times. The first row and the last row are - * the first and last rows inside of the + *

Duration between the start of exposure for the first row of the image sensor, + * and the start of exposure for one past the last row of the image sensor.

+ *

This is the exposure time skew between the first and (last+1) row exposure start times. The + * first row and the last row are the first and last rows inside of the * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.

- *

For typical camera sensors that use rolling shutters, this is also equivalent - * to the frame readout time.

+ *

For typical camera sensors that use rolling shutters, this is also equivalent to the frame + * readout time.

+ *

If the image sensor is operating in a binned or cropped mode due to the current output + * target resolutions, it's possible this skew is reported to be larger than the exposure + * time, for example, since it is based on the full array even if a partial array is read + * out. Be sure to scale the number to cover the section of the sensor actually being used + * for the outputs you care about. So if your output covers N rows of the active array of + * height H, scale this value by N/H to get the total skew for that viewport.

+ *

Note: Prior to Android 11, this field was described as measuring duration from + * first to last row of the image sensor, which is not equal to the frame readout time for a + * rolling shutter sensor. Implementations generally reported the latter value, so to resolve + * the inconsistency, the description has been updated to range from (first, last+1) row + * exposure start, instead.

*

Units: Nanoseconds

*

Range of valid values:
* >= 0 and <