Whoops, fixed long-standing bug in the benchmark. Never noticed before because we...
authordswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 26 Jun 2009 21:18:58 +0000 (21:18 +0000)
committerdswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 26 Jun 2009 21:18:58 +0000 (21:18 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1001 59b500cc-1b3d-0410-9834-0bbf25fbcc57

androidtest/src/com/google/zxing/client/androidtest/RGBLuminanceSource.java

index f89ad87..0be7052 100644 (file)
@@ -49,7 +49,7 @@ public final class RGBLuminanceSource extends LuminanceSource {
     // up front, which is the same as the Y channel of the YUVLuminanceSource in the real app.
     luminances = new byte[width * height];
     for (int y = 0; y < height; y++) {
-      int offset = y * height;
+      int offset = y * width;
       for (int x = 0; x < width; x++) {
         int pixel = pixels[offset + x];
         int r = (pixel >> 16) & 0xff;