mirror of
https://github.com/zxing/zxing.git
synced 2024-09-20 21:47:32 -07:00
Bug fix, use data height/width to check input size
git-svn-id: https://zxing.googlecode.com/svn/trunk@1120 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
87b6b0ec66
commit
5339ef7757
|
@ -38,8 +38,9 @@ public final class PlanarYUV420LuminanceSource extends AbstractPlanarYUVLuminanc
|
||||||
int width = getWidth();
|
int width = getWidth();
|
||||||
int height = getHeight();
|
int height = getHeight();
|
||||||
int dataWidth = getDataWidth();
|
int dataWidth = getDataWidth();
|
||||||
|
int dataHeight = getDataHeight();
|
||||||
byte[] yuv = getYUVData();
|
byte[] yuv = getYUVData();
|
||||||
int expectedYBytes = width * height;
|
int expectedYBytes = dataWidth * dataHeight;
|
||||||
int expectedUBytes = expectedYBytes >> 2;
|
int expectedUBytes = expectedYBytes >> 2;
|
||||||
int expectedVBytes = expectedYBytes >> 2;
|
int expectedVBytes = expectedYBytes >> 2;
|
||||||
int expectedBytes = expectedYBytes + expectedUBytes + expectedVBytes;
|
int expectedBytes = expectedYBytes + expectedUBytes + expectedVBytes;
|
||||||
|
|
Loading…
Reference in a new issue