summaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-07-20 17:13:40 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-26 10:48:38 -0700
commit56ac95bbf80a8c3a428f0c1be3ce7154af048a06 (patch)
tree0ee9fe52e1935f7836bc60c326fb5df91c4cee51 /src/org
parent9f65ee95c61d70d6f7c34cd8bedea61ff1cdf2d1 (diff)
downloadandroid_packages_apps_Snap-56ac95bbf80a8c3a428f0c1be3ce7154af048a06.tar.gz
android_packages_apps_Snap-56ac95bbf80a8c3a428f0c1be3ce7154af048a06.tar.bz2
android_packages_apps_Snap-56ac95bbf80a8c3a428f0c1be3ce7154af048a06.zip
SnapdragonCamera: Update API call for clearsight lib upgrade.
Update processImage API call to coincide with lib upgrade. CRs-Fixed: 993611 Change-Id: Ie3be9b1a586dcc1e50da626f49349cab617ce27e
Diffstat (limited to 'src/org')
-rw-r--r--src/org/codeaurora/snapcam/filter/ClearSightNativeEngine.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/org/codeaurora/snapcam/filter/ClearSightNativeEngine.java b/src/org/codeaurora/snapcam/filter/ClearSightNativeEngine.java
index f2793c822..18e7671b9 100644
--- a/src/org/codeaurora/snapcam/filter/ClearSightNativeEngine.java
+++ b/src/org/codeaurora/snapcam/filter/ClearSightNativeEngine.java
@@ -35,6 +35,7 @@ import java.util.ArrayList;
import java.util.List;
import android.graphics.Rect;
+import android.hardware.camera2.CaptureResult;
import android.hardware.camera2.TotalCaptureResult;
import android.media.Image;
import android.media.Image.Plane;
@@ -256,13 +257,20 @@ public class ClearSightNativeEngine {
Log.d(TAG, "processImage - dst size - y: "
+ dstY.capacity() + " vu: " + dstVU.capacity());
+ int iso = mRefMonoResult.get(CaptureResult.SENSOR_SENSITIVITY);
+ long exposure = mRefMonoResult.get(CaptureResult.SENSOR_EXPOSURE_TIME);
+ // capture result stores exposure time in NS and we need MS.
+ exposure /= 100000;
+
+ Log.d(TAG, "processImage - iso: " + iso + " exposure ms: " + exposure);
boolean result = nativeClearSightProcess(numImages, srcColorY, srcColorVU,
metadataColor, mRefColorImage.getWidth(),
mRefColorImage.getHeight(),
colorPlanes[Y_PLANE].getRowStride(),
colorPlanes[VU_PLANE].getRowStride(), srcMonoY, metadataMono,
mRefMonoImage.getWidth(), mRefMonoImage.getHeight(),
- monoPlanes[Y_PLANE].getRowStride(), mOtpCalibData, dstY, dstVU,
+ monoPlanes[Y_PLANE].getRowStride(), mOtpCalibData,
+ (int)exposure, iso, dstY, dstVU,
colorPlanes[Y_PLANE].getRowStride(),
colorPlanes[VU_PLANE].getRowStride(), roiRect);
@@ -287,8 +295,8 @@ public class ClearSightNativeEngine {
int[][] metadataColor, int srcColorWidth, int srcColorHeight,
int srcColorStrideY, int srcColorStrideVU, ByteBuffer[] srcMonoY,
int[][] metadataMono, int srcMonoWidth, int srcMonoHeight,
- int srcMonoStrideY, byte[] otp, ByteBuffer dstY, ByteBuffer dstVU,
- int dstStrideY, int dstStrideVU, int[] roiRect);
+ int srcMonoStrideY, byte[] otp, int exposureMs, int iso,
+ ByteBuffer dstY, ByteBuffer dstVU, int dstStrideY, int dstStrideVU, int[] roiRect);
private class SourceImage {
ByteBuffer mY;