Remove deviation from PDF417 spec and faulty unit test (thanks Anders)

git-svn-id: https://zxing.googlecode.com/svn/trunk@2241 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2012-03-30 10:58:24 +00:00
parent 73345ae493
commit 94cae7f083
6 changed files with 4 additions and 12 deletions

View file

@ -6,6 +6,7 @@ Aitor Almeida (University of Deusto)
Alasdair Mackintosh (Google)
Alex Dupre
Alexander Martin (Haase & Martin GmbH)
Anders Borg
Andreas Pillath
Andrew Walbran (Google)
Andrey Sitnik

View file

@ -260,10 +260,6 @@ final class DecodedBitStreamParser {
subMode = Mode.PUNCT_SHIFT;
} else if (subModeCh == MODE_SHIFT_TO_BYTE_COMPACTION_MODE) {
result.append((char) byteCompactionData[i]);
// the pdf417 specs say we have to return to the last latched
// sub-mode. But I checked different encoder implementations and
// all of them return to alpha sub-mode after Shift-to-Byte
subMode = Mode.ALPHA;
} else if (subModeCh == TEXT_COMPACTION_MODE_LATCH) {
subMode = Mode.ALPHA;
}
@ -338,10 +334,6 @@ final class DecodedBitStreamParser {
// PS before Shift-to-Byte is used as a padding character,
// see 5.4.2.4 of the specification
result.append((char) byteCompactionData[i]);
// the pdf417 specs say we have to return to the last latched
// sub-mode. But I checked different encoder implementations and
// all of them return to alpha sub-mode after Shift-to-Byte
subMode = Mode.ALPHA;
} else if (subModeCh == TEXT_COMPACTION_MODE_LATCH) {
subMode = Mode.ALPHA;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -1 +0,0 @@
nä jag menar det där som sitter fast i din dörrkarm

View file

@ -30,7 +30,7 @@ public final class DataMatrixBlackBox2TestCase extends AbstractBlackBoxTestCase
addTest(8, 8, 0, 1, 0.0f);
addTest(14, 14, 0, 1, 90.0f);
addTest(14, 14, 0, 1, 180.0f);
addTest(12, 12, 0, 1, 270.0f);
addTest(13, 13, 0, 1, 270.0f);
}
}

View file

@ -29,8 +29,8 @@ public final class PDF417BlackBox1TestCase extends AbstractBlackBoxTestCase {
public PDF417BlackBox1TestCase() {
super("test/data/blackbox/pdf417", new MultiFormatReader(), BarcodeFormat.PDF_417);
addTest(5, 5, 0.0f);
addTest(5, 5, 180.0f);
addTest(4, 4, 0.0f);
addTest(4, 4, 180.0f);
}
}