summaryrefslogtreecommitdiffstats
path: root/tests/Camera2Tests/SmartCamera
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Camera2Tests/SmartCamera')
-rw-r--r--tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/CropFilter.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/CropFilter.java b/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/CropFilter.java
index 91fe21c..6c0f353 100644
--- a/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/CropFilter.java
+++ b/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/CropFilter.java
@@ -20,7 +20,6 @@ import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
-import android.util.FloatMath;
import androidx.media.filterfw.Filter;
import androidx.media.filterfw.FrameImage2D;
@@ -90,8 +89,8 @@ public class CropFilter extends Filter {
// Pull input frame
FrameImage2D inputImage = getConnectedInputPort("image").pullFrame().asFrameImage2D();
int[] inDims = inputImage.getDimensions();
- int[] croppedDims = { (int)FloatMath.ceil(mCropRect.xEdge().length() * inDims[0]),
- (int)FloatMath.ceil(mCropRect.yEdge().length() * inDims[1]) };
+ int[] croppedDims = { (int)Math.ceil(mCropRect.xEdge().length() * inDims[0]),
+ (int)Math.ceil(mCropRect.yEdge().length() * inDims[1]) };
int[] outDims = { getOutputWidth(croppedDims[0], croppedDims[1]),
getOutputHeight(croppedDims[0], croppedDims[1]) };
FrameImage2D outputImage = outPort.fetchAvailableFrame(outDims).asFrameImage2D();