summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/camera/panorama/Mosaic.java22
-rw-r--r--src/com/android/camera/panorama/MosaicFrameProcessor.java5
2 files changed, 27 insertions, 0 deletions
diff --git a/src/com/android/camera/panorama/Mosaic.java b/src/com/android/camera/panorama/Mosaic.java
index b586aad..9ad2c64 100644
--- a/src/com/android/camera/panorama/Mosaic.java
+++ b/src/com/android/camera/panorama/Mosaic.java
@@ -68,6 +68,21 @@ public class Mosaic {
public static final int BLENDTYPE_HORIZONTAL =3;
/**
+ * This strip type will use the default thin strips where the strips are
+ * spaced according to the image capture rate.
+ */
+ public static final int STRIPTYPE_THIN = 0;
+
+ /**
+ * This strip type will use wider strips for blending. The strip separation
+ * is controlled by a threshold on the native side. Since the strips are
+ * wider, there is an additional cross-fade blending step to make the seam
+ * boundaries smoother. Since this mode uses lesser image frames, it is
+ * computationally more efficient than the thin strip mode.
+ */
+ public static final int STRIPTYPE_WIDE = 1;
+
+ /**
* Return flags returned by createMosaic() are one of the following.
*/
public static final int MOSAIC_RET_OK = 1;
@@ -128,6 +143,13 @@ public class Mosaic {
public native void setBlendingType(int type);
/**
+ * Set the type of strips to use for blending.
+ * @param type the blending strip type to use {STRIPTYPE_THIN,
+ * STRIPTYPE_WIDE}.
+ */
+ public native void setStripType(int type);
+
+ /**
* Tell the native layer to create the final mosaic after all the input frame
* data have been collected.
* The case of generating high-resolution mosaic may take dozens of seconds to finish.
diff --git a/src/com/android/camera/panorama/MosaicFrameProcessor.java b/src/com/android/camera/panorama/MosaicFrameProcessor.java
index dde4a22..54fc7b8 100644
--- a/src/com/android/camera/panorama/MosaicFrameProcessor.java
+++ b/src/com/android/camera/panorama/MosaicFrameProcessor.java
@@ -84,6 +84,7 @@ public class MosaicFrameProcessor {
public void initialize() {
setupMosaicer(mPreviewWidth, mPreviewHeight, mPreviewBufferSize);
+ setStripType(Mosaic.STRIPTYPE_WIDE);
reset();
}
@@ -92,6 +93,10 @@ public class MosaicFrameProcessor {
mMosaicer.freeMosaicMemory();
}
+ public void setStripType(int type) {
+ mMosaicer.setStripType(type);
+ }
+
private void setupMosaicer(int previewWidth, int previewHeight, int bufSize) {
Log.v(TAG, "setupMosaicer w, h=" + previewWidth + ',' + previewHeight + ',' + bufSize);
mMosaicer.allocateMosaicMemory(previewWidth, previewHeight);