summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-08-03 18:10:38 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-27 11:35:24 -0700
commit7d9eb158ed637e5cc8fc446fa1266f07ffb04ba9 (patch)
treeffa6d1b7a6e30f352ba0bbdcb59ea4f9c383c33c /src/com/android/camera/CaptureModule.java
parent85556b5ab4a2df081d781e72f50fd2bfa112a1e3 (diff)
downloadandroid_packages_apps_Snap-7d9eb158ed637e5cc8fc446fa1266f07ffb04ba9.tar.gz
android_packages_apps_Snap-7d9eb158ed637e5cc8fc446fa1266f07ffb04ba9.tar.bz2
android_packages_apps_Snap-7d9eb158ed637e5cc8fc446fa1266f07ffb04ba9.zip
SnapdragonCamera: support lower resolutions for Clearsight
Support different resolutions when capturing in Clearsight mode. Also downscale the mono image to 2MP resolution when bayer size is greater than 2MP. If bayer size is less than 2MP, mono size will match with bayer. CRs-Fixed: 1058843 Change-Id: I8f9ddd81dd640b4efc316dd9ff05c26f339396a5
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rw-r--r--src/com/android/camera/CaptureModule.java19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 0ae9c5ef1..a8df9feb1 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -176,6 +176,9 @@ public class CaptureModule implements CameraModule, PhotoController,
public static CaptureRequest.Key<int[]> JpegCropRectKey =
new CaptureRequest.Key<>("org.codeaurora.qcamera3.jpeg_encode_crop.rect",
int[].class);
+ public static CaptureRequest.Key<int[]> JpegRoiRectKey =
+ new CaptureRequest.Key<>("org.codeaurora.qcamera3.jpeg_encode_crop.roi",
+ int[].class);
public static CameraCharacteristics.Key<Byte> MetaDataMonoOnlyKey =
new CameraCharacteristics.Key<>("org.codeaurora.qcamera3.sensor_meta_data.is_mono_only",
Byte.class);
@@ -1285,7 +1288,7 @@ public class CaptureModule implements CameraModule, PhotoController,
if (isClearSightOn()) {
if(i == getMainCameraId()) {
- ClearSightImageProcessor.getInstance().init(mPictureSize.getWidth(),
+ ClearSightImageProcessor.getInstance().init(map, mPictureSize.getWidth(),
mPictureSize.getHeight(), mActivity, mOnMediaSavedListener);
ClearSightImageProcessor.getInstance().setCallback(this);
}
@@ -3341,20 +3344,6 @@ public class CaptureModule implements CameraModule, PhotoController,
return mUI.getTrackingFocusRenderer();
}
- /**
- * Compares two {@code Size}s based on their areas.
- */
- static class CompareSizesByArea implements Comparator<Size> {
-
- @Override
- public int compare(Size lhs, Size rhs) {
- // We cast here to ensure the multiplications won't overflow
- return Long.signum((long) lhs.getWidth() * lhs.getHeight() -
- (long) rhs.getWidth() * rhs.getHeight());
- }
-
- }
-
private class MyCameraHandler extends Handler {
public MyCameraHandler(Looper looper) {