Commit graph

290 commits

Author SHA1 Message Date
srowen 70732c334e Now more lenient in detecting Shift_JIS to detect more byte sequences as Shift_JIS
git-svn-id: https://zxing.googlecode.com/svn/trunk@662 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-02 10:30:09 +00:00
dswitkin a8b57c466d Discovered that our 1D Readers were being reallocated for every row scanned - yikes! I made them reusable across both rows and different scans. This saved 26 ms on the worst case rejection. We can now consistently reject any 240x240 image on Android in 150 ms or less, checking all 7 formats.
git-svn-id: https://zxing.googlecode.com/svn/trunk@661 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-01 02:31:05 +00:00
srowen 5a5987df88 Allow up to 3 superfluous bits at end of stream
git-svn-id: https://zxing.googlecode.com/svn/trunk@659 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-31 18:49:54 +00:00
dswitkin bf362ae853 Added 17 new, unusual QR Codes to the blackbox tests. We can decode the majority OK, but some of the contents are not agreeing with the golden results because of a text encoding issue.
git-svn-id: https://zxing.googlecode.com/svn/trunk@658 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-31 18:09:24 +00:00
dswitkin 8671371c59 Did a big refactoring on the MonochromeBitmapSource. I removed all the caching luminance calls and converted them to getting luminance data on demand. This saved another 33,000 function calls per rejected scan, good for another 15 ms savings. I also moved the luminance calls to BaseMonochromeBitmapSource and made them protected, to indicate that the decoders shouldn't use them.
Overall the recent optimizations took one rejected scan from 307 to 135 ms, which is definitely noticeable.

WARNING: I am not able to build the Bug or J2ME clients, but I believe they are correct.

git-svn-id: https://zxing.googlecode.com/svn/trunk@656 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-30 18:44:10 +00:00
dswitkin bef3c75048 Fixed a crash in calendar parsing when encountering an illegal VEVENT without newlines.
git-svn-id: https://zxing.googlecode.com/svn/trunk@655 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-30 16:35:26 +00:00
dswitkin 4f7b7d573d Made the data members of BitArray public so they will be inlined. This saves about 60,000 function calls per rejected scan. We can make these private again once we figure out the ProGuard problems with -allowaccessmodification.
git-svn-id: https://zxing.googlecode.com/svn/trunk@653 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 21:16:46 +00:00
dswitkin 77f41cce22 Added another target for building a debug key signed Android client, and removed the old optimized target from core.
git-svn-id: https://zxing.googlecode.com/svn/trunk@650 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 19:50:37 +00:00
srowen 6f6da9a04c moved ProGuard optimization into Android build file since it's the only way to fully optimize the final build product (inlining of key methods). Also always dump proguard results.
git-svn-id: https://zxing.googlecode.com/svn/trunk@649 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 15:42:22 +00:00
dswitkin d80cd07064 Made a change to the QR detector which cuts the worst case rejection time from 300 ms to 160 ms, with almost no penalty in decoding ability. Given that we're emphasizing continuous decoding, I feel it's much better to reject the occasional borderline image in half the time, and get on with the next scan.
git-svn-id: https://zxing.googlecode.com/svn/trunk@648 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 14:22:44 +00:00
srowen 78da6447b0 Inner class elements now not private since it is pointless and confuses Proguard
git-svn-id: https://zxing.googlecode.com/svn/trunk@647 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-28 15:59:51 +00:00
srowen 96f6428eea Add column caching to MonochromeBitmapSources and use it to improve Data Matrix speed
git-svn-id: https://zxing.googlecode.com/svn/trunk@631 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-22 08:43:56 +00:00
dswitkin f142a9478c Reordered the address book fields to something a little more standard/reasonable.
git-svn-id: https://zxing.googlecode.com/svn/trunk@623 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-17 20:21:29 +00:00
dswitkin 77d29c3d7a Added support for URL to MECARD and VCARD.
git-svn-id: https://zxing.googlecode.com/svn/trunk@622 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-17 16:12:10 +00:00
dswitkin 8cb804ec9e Made a change to 1D decoding which looks for 100% instead of 150% of the start and end patterns when searching for quiet zones, but in exchange for that reduction, we reject rows whose quiet zones would run off either edge of the image.
The result is complete elimination of all false positives in the new batch of 40 images I just checked in. Bettter than that, we come up with a net gain of 38 new barcodes decoded (counting rotation and try harder variations). We even get some of the reflective images that were impossible up to this point.

git-svn-id: https://zxing.googlecode.com/svn/trunk@620 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-15 19:47:34 +00:00
dswitkin edcf34f0c5 Created 40 new blackbox images which are partial shots of a very large QR code. In mobile mode we do OK, but in try harder we find bogus 1D results in almost half of these. I'm checking this in as a baseline, and will work on improving the situation in a subsequent change.
git-svn-id: https://zxing.googlecode.com/svn/trunk@618 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-14 22:08:48 +00:00
dswitkin c91f427a8b Added a bit of defensive programming in the AlignmentPattern code. There were real world examples where the width passed to AlignmentPatternFinder was zero, which causes BitArray to throw when built with a size of zero. I'm going a little bit farther and not searching extremely small areas either.
Sean, please review.

git-svn-id: https://zxing.googlecode.com/svn/trunk@617 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-14 18:24:23 +00:00
dswitkin ef2f3f8ce0 Expanded calendar parsing to allow more date formats, added some unit tests for ISBN and VEVENTS, and fixed the EAN13-1 test which was failing by one image.
git-svn-id: https://zxing.googlecode.com/svn/trunk@616 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-14 15:56:03 +00:00
dswitkin 7fe2c1c60c Prevented ISBN parsing from happening twice.
git-svn-id: https://zxing.googlecode.com/svn/trunk@610 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-09 18:46:21 +00:00
srowen 83c01f0cee Camel-cased log_table, exp_table vars
git-svn-id: https://zxing.googlecode.com/svn/trunk@609 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-09 12:17:37 +00:00
mschulkind 76b4fa1910 Fixing a comment.
git-svn-id: https://zxing.googlecode.com/svn/trunk@607 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-08 20:52:58 +00:00
mschulkind af555d2409 Renaming two member variables so they no longer share names with their getters.
git-svn-id: https://zxing.googlecode.com/svn/trunk@606 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-08 20:42:04 +00:00
dswitkin 45677f2bb2 Made calendar event parsing more robust, and also reject non-calendar contents a little faster.
git-svn-id: https://zxing.googlecode.com/svn/trunk@604 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-08 15:37:38 +00:00
dswitkin 13c08aedaf Added 13 new blackbox images.
git-svn-id: https://zxing.googlecode.com/svn/trunk@603 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-07 18:57:15 +00:00
srowen 773409ed6a Add check for minimal whitespace before/after Code 128, Code 39; a few code tweaks as well
git-svn-id: https://zxing.googlecode.com/svn/trunk@601 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-07 09:53:53 +00:00
srowen 089df8eb7b Added redundant abstract method declarations to maybe work around problems on Nokias
git-svn-id: https://zxing.googlecode.com/svn/trunk@600 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-06 11:43:19 +00:00
srowen b0b0afc172 Added redundant abstract method declarations to maybe work around problems on Nokias
git-svn-id: https://zxing.googlecode.com/svn/trunk@599 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-04 14:46:15 +00:00
srowen 8c3b727bd4 Recent bug fix uncovered some bugs in test case -- fixing those
git-svn-id: https://zxing.googlecode.com/svn/trunk@594 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-01 16:17:03 +00:00
dswitkin 16bdeac581 Added two more UPC-A blackbox images submitted by the community.
git-svn-id: https://zxing.googlecode.com/svn/trunk@593 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-01 14:17:17 +00:00
dswitkin bacd1469af - Fixed a crash when parsing a particular VCard with a blank entry.
- Trimmed whitespace around many fields to sanitize the results (this is very useful upstream, for example we hyphenate phone numbers on Android but can't tolerate extra whitespace).
- Fixed a bug with 1D result points when scanning upside down - they needed to be mirrored to draw correctly.

git-svn-id: https://zxing.googlecode.com/svn/trunk@592 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-29 18:45:00 +00:00
srowen 6db50e0b79 Finally actually fix the Code-128 bug and add tests
git-svn-id: https://zxing.googlecode.com/svn/trunk@588 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-24 12:16:41 +00:00
srowen 78af16ca34 More UPC-A tests: interesting clear but low-res images that don't decode
git-svn-id: https://zxing.googlecode.com/svn/trunk@587 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-23 17:24:03 +00:00
srowen e2b141e1a3 Another fix -- account for CODE_STOP. Add some comments.
git-svn-id: https://zxing.googlecode.com/svn/trunk@585 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-22 09:08:57 +00:00
srowen b29b4d2070 Fix bug that would cut out part of result string if final checksum value happened to be the code for a non-printable character
git-svn-id: https://zxing.googlecode.com/svn/trunk@584 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-21 11:14:48 +00:00
dswitkin 1ab0f14f41 Made a couple utility methods public.
git-svn-id: https://zxing.googlecode.com/svn/trunk@582 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-19 01:10:25 +00:00
dswitkin d45123da9e Added an ISBN parsed result type courtesy of jbreiden.
git-svn-id: https://zxing.googlecode.com/svn/trunk@576 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-08 20:54:52 +00:00
srowen 67d139dadb git-svn-id: https://zxing.googlecode.com/svn/trunk@574 59b500cc-1b3d-0410-9834-0bbf25fbcc57 2008-09-01 00:33:53 +00:00
dswitkin f344098895 Added a new unit test of real world QR codes. We get 29/42 - pretty good, but room for improvement.
git-svn-id: https://zxing.googlecode.com/svn/trunk@571 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-25 17:44:23 +00:00
srowen 8b5d15cc5c URIParsedResult now has isPossiblyMaliciousURI() to check for username in host, which may be an attempt to mask the host of the URI
git-svn-id: https://zxing.googlecode.com/svn/trunk@570 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-21 04:33:42 +00:00
srowen 7dbc556789 Per dominik.wild, added support for "sms:number:body" format URIs
git-svn-id: https://zxing.googlecode.com/svn/trunk@565 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-15 16:35:47 +00:00
srowen 966c5a8e97 (Thanks to John White) Make UPC/EAN decoder less picky about white space bordering 1D code
git-svn-id: https://zxing.googlecode.com/svn/trunk@557 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-12 18:29:29 +00:00
dswitkin 3371fdb4d3 Added 55 EAN-13 real world test images. For mobile we get 49/55 of these, 55/55 with try harder.
git-svn-id: https://zxing.googlecode.com/svn/trunk@554 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-08 15:26:21 +00:00
srowen 6c309a7247 Parallelize black box tests
git-svn-id: https://zxing.googlecode.com/svn/trunk@552 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-06 20:26:05 +00:00
srowen 86ce6b77b7 Use unicode escapes to avoid apparent source file encoding issues here
git-svn-id: https://zxing.googlecode.com/svn/trunk@549 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-06 16:21:47 +00:00
srowen 7c6276d89b Reverted inadvertent Detector changes that broke unit tests. Fixed test target to definitely exclude non-TestCase classes from tests.
git-svn-id: https://zxing.googlecode.com/svn/trunk@548 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-06 16:07:46 +00:00
srowen 3a1d1f1850 Initial checkin of Data Matrix detector. Still needs work, and is not enabled by default.
git-svn-id: https://zxing.googlecode.com/svn/trunk@545 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-04 18:37:42 +00:00
srowen 944feda925 Re-add ECI test case and groundwork for more tests of DecodedBitStreamParser
git-svn-id: https://zxing.googlecode.com/svn/trunk@539 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-30 23:01:37 +00:00
srowen 91b0ef1622 Some small improvements in error handling based on exceptions observed at zxing.org
git-svn-id: https://zxing.googlecode.com/svn/trunk@538 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-30 21:58:17 +00:00
srowen dbc1eebc49 Minor style changes; optimized nested loops at end to avoid some redundant computation
git-svn-id: https://zxing.googlecode.com/svn/trunk@537 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-25 15:24:59 +00:00
srowen 423f0a05ca Remove dead files
git-svn-id: https://zxing.googlecode.com/svn/trunk@536 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-24 21:43:40 +00:00