summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/imageprocessor/FrameProcessor.java
diff options
context:
space:
mode:
authorJack Yoo <jyoo@codeaurora.org>2016-05-10 14:11:19 -0700
committerJack Yoo <jyoo@codeaurora.org>2016-06-08 14:22:28 -0700
commit53cd3dd1a139d495fe25d06d439bd8fd0ea1d683 (patch)
tree9f5a48e869e2e7318cfd6e7da5e72a7438963b58 /src/com/android/camera/imageprocessor/FrameProcessor.java
parentcea7d5bfe6694009d7d4fa97e8bedaca8aff3e32 (diff)
downloadandroid_packages_apps_Snap-53cd3dd1a139d495fe25d06d439bd8fd0ea1d683.tar.gz
android_packages_apps_Snap-53cd3dd1a139d495fe25d06d439bd8fd0ea1d683.tar.bz2
android_packages_apps_Snap-53cd3dd1a139d495fe25d06d439bd8fd0ea1d683.zip
SnapdragonCamera: Sharpshooter post filter
Adding Sharpshooter post process filter Change-Id: I8f3c1962db437e7dfbe2973f806a3f9a26480eb7 CRs-Fixed: 1023183
Diffstat (limited to 'src/com/android/camera/imageprocessor/FrameProcessor.java')
-rw-r--r--src/com/android/camera/imageprocessor/FrameProcessor.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/camera/imageprocessor/FrameProcessor.java b/src/com/android/camera/imageprocessor/FrameProcessor.java
index 951479de9..6a2091158 100644
--- a/src/com/android/camera/imageprocessor/FrameProcessor.java
+++ b/src/com/android/camera/imageprocessor/FrameProcessor.java
@@ -128,7 +128,7 @@ public class FrameProcessor {
}
}
- private void createAllocation(int width, int height) {
+ private void createAllocation(int width, int height, int stridePad) {
Type.Builder yuvTypeBuilder = new Type.Builder(mRs, Element.YUV(mRs));
yuvTypeBuilder.setX(width);
yuvTypeBuilder.setY(height);
@@ -141,6 +141,8 @@ public class FrameProcessor {
mRsRotator.set_gOut(mProcessAllocation);
mRsRotator.set_width(width);
mRsRotator.set_height(height);
+ mRsRotator.set_pad(stridePad);
+ mRsRotator.set_gFlip(!mModule.isBackCamera());
mRsYuvToRGB.set_gIn(mProcessAllocation);
mRsYuvToRGB.set_width(height);
mRsYuvToRGB.set_height(width);
@@ -266,6 +268,7 @@ public class FrameProcessor {
int ySize;
int stride;
int height;
+ int width;
public ProcessingTask() {
}
@@ -288,6 +291,7 @@ public class FrameProcessor {
ByteBuffer bVU = image.getPlanes()[2].getBuffer();
if(yvuBytes == null) {
stride = image.getPlanes()[0].getRowStride();
+ width = mSize.getWidth();
height = mSize.getHeight();
ySize = stride * mSize.getHeight();
yvuBytes = new byte[ySize*3/2];
@@ -314,7 +318,7 @@ public class FrameProcessor {
return;
}
if(mInputAllocation == null) {
- createAllocation(stride, height);
+ createAllocation(stride, height, stride-width);
}
mInputAllocation.copyFrom(yvuBytes);
mRsRotator.forEach_rotate90andMerge(mInputAllocation);