aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTimothy Knight <tknight@google.com>2014-08-19 17:32:37 -0700
committerTimothy Knight <tknight@google.com>2014-08-19 17:32:37 -0700
commit55e4ad4c2baa60330509b625871667f8108b5018 (patch)
treeb8c41b7539b965410af91524c43ea456df566923 /apps
parentb65882a6b704e5f6429746beb1660cfe1f43ab0a (diff)
downloadpdk-55e4ad4c2baa60330509b625871667f8108b5018.tar.gz
CameraITS: More verbose logging about captured images
Change-Id: I1716c655771f796cc287827e0826f39ff454a4b3
Diffstat (limited to 'apps')
-rw-r--r--apps/CameraITS/service/src/com/android/camera2/its/ItsUtils.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/CameraITS/service/src/com/android/camera2/its/ItsUtils.java b/apps/CameraITS/service/src/com/android/camera2/its/ItsUtils.java
index 2193736..e5c6345 100644
--- a/apps/CameraITS/service/src/com/android/camera2/its/ItsUtils.java
+++ b/apps/CameraITS/service/src/com/android/camera2/its/ItsUtils.java
@@ -122,7 +122,6 @@ public class ItsUtils {
int format = image.getFormat();
int width = image.getWidth();
int height = image.getHeight();
- int rowStride, pixelStride;
byte[] data = null;
// Read image data
@@ -142,19 +141,21 @@ public class ItsUtils {
return data;
} else if (format == ImageFormat.YUV_420_888 || format == ImageFormat.RAW_SENSOR
|| format == ImageFormat.RAW10) {
- Logt.i(TAG, String.format("Reading image, format %d", format));
int offset = 0;
data = new byte[width * height * ImageFormat.getBitsPerPixel(format) / 8];
byte[] rowData = new byte[planes[0].getRowStride()];
for (int i = 0; i < planes.length; i++) {
ByteBuffer buffer = planes[i].getBuffer();
- rowStride = planes[i].getRowStride();
- pixelStride = planes[i].getPixelStride();
+ int rowStride = planes[i].getRowStride();
+ int pixelStride = planes[i].getPixelStride();
+ int bytesPerPixel = ImageFormat.getBitsPerPixel(format) / 8;
+ Logt.i(TAG, String.format(
+ "Reading image: fmt %d, plane %d, w %d, h %d, rowStride %d, pixStride %d",
+ format, i, width, height, rowStride, pixelStride));
// For multi-planar yuv images, assuming yuv420 with 2x2 chroma subsampling.
int w = (i == 0) ? width : width / 2;
int h = (i == 0) ? height : height / 2;
for (int row = 0; row < h; row++) {
- int bytesPerPixel = ImageFormat.getBitsPerPixel(format) / 8;
if (pixelStride == bytesPerPixel) {
// Special case: optimized read of the entire row
int length = w * bytesPerPixel;