summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/imageprocessor/filter
diff options
context:
space:
mode:
authormingwax <mingwax@codeaurora.org>2017-03-27 13:48:32 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-24 02:19:23 -0700
commit5d35734b41ca5a21e74ee8d10a217dc77257c17c (patch)
treeb23fbb6be4e5b2f23a05f2e42ccaf2ec1032b626 /src/com/android/camera/imageprocessor/filter
parenta27f5779a51b581e60bd36b4af4ce5e32a005a3c (diff)
downloadandroid_packages_apps_Snap-5d35734b41ca5a21e74ee8d10a217dc77257c17c.tar.gz
android_packages_apps_Snap-5d35734b41ca5a21e74ee8d10a217dc77257c17c.tar.bz2
android_packages_apps_Snap-5d35734b41ca5a21e74ee8d10a217dc77257c17c.zip
SnapdragonCamera: add method nativeConfigureStillmore
(1) Add the method nativeConfigureStillMore, and can set the parameter: brColor态brIntensity态smoothingIntensity. (2) Add custom properties to control some of the parameters of stillmore. CRs-Fixed: 2013253 Change-Id: I62871f7d27f8f8c16514378bd06e945099c677e5
Diffstat (limited to 'src/com/android/camera/imageprocessor/filter')
-rw-r--r--src/com/android/camera/imageprocessor/filter/StillmoreFilter.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/camera/imageprocessor/filter/StillmoreFilter.java b/src/com/android/camera/imageprocessor/filter/StillmoreFilter.java
index 2f483bfdc..34784faa0 100644
--- a/src/com/android/camera/imageprocessor/filter/StillmoreFilter.java
+++ b/src/com/android/camera/imageprocessor/filter/StillmoreFilter.java
@@ -38,13 +38,14 @@ import android.util.Log;
import android.util.Range;
import com.android.camera.CaptureModule;
+import com.android.camera.util.PersistUtil;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
public class StillmoreFilter implements ImageFilter{
- public static final int NUM_REQUIRED_IMAGE = 5;
+ public static final int NUM_REQUIRED_IMAGE = PersistUtil.getStillmoreNumRequiredImages();
private int mWidth;
private int mHeight;
private int mStrideY;
@@ -99,6 +100,13 @@ public class StillmoreFilter implements ImageFilter{
Log("width: "+mWidth+" height: "+mHeight+" strideY: "+mStrideY+" strideVU: "+mStrideVU);
nativeInit(mWidth, mHeight, mStrideY, mStrideVU,
0, 0, mWidth, mHeight, NUM_REQUIRED_IMAGE);
+ float brColor = PersistUtil.getStillmoreBrColor();
+ float brIntensity = PersistUtil.getStillmoreBrIntensity();
+ float smoothingintensity = PersistUtil.getStillmoreSmoothingIntensity();
+ nativeConfigureStillMore(brColor, brIntensity, smoothingintensity);
+ Log("ConfigureStillmore brColor: " + brColor + " brIntensity: " +
+ brIntensity + " smoothingintensity: " + smoothingintensity +
+ " NUM_REQUIRED_IMAGE: " + NUM_REQUIRED_IMAGE);
}
@Override
@@ -156,6 +164,8 @@ public class StillmoreFilter implements ImageFilter{
return mIsSupported;
}
+ private native int nativeConfigureStillMore(float brColor, float brIntensity,
+ float smoothingintensity);
private native int nativeInit(int width, int height, int yStride, int vuStride,
int roiX, int roiY, int roiW, int roiH, int numImages);
private native int nativeDeinit();