Issue 1693 in zxing: Non-optimal high-level-encoding in Aztec

17 vues
Accéder directement au premier message non lu

zx...@googlecode.com

non lue,
27 mai 2013, 01:08:1627/05/2013
à zx...@googlegroups.com
Status: New
Owner: ----

New issue 1693 by fyel...@gmail.com: Non-optimal high-level-encoding in
Aztec
http://code.google.com/p/zxing/issues/detail?id=1693

The current high-level Aztec encoder is locally optimal rather than
globally optimal For each successive character in the input, it determines
the fewest number of bits needed to add that character to the already
existing output.

For example, given "ABC 123", the space is output in UPPER mode. Moving
the shift to DIGIT mode to include the space saves a bit. The airline
Aztec codes use about 5% fewer bits than would be generated by Zxing.

I've modified the current encoder to generate better code. As it reads
each character, it keeps track of all reasonable high-level encodings, and
then at the end chooses the shortest one.

This is a request for comments, concerns, etc., before I request such a big
change to the Encoder.

Attached is the patch with changes to four files:
Encoder.java: Removed the high-level encoder
HighLevelEncoder.java: Implementation of high-level encode
Decoder.java: Added a stub for HighLevelDecoder, so that encoder could be
tested.
EncoderTest.java: Modified tests for new output. Tested some of the new
output.

Attachments:
Patch1.diff 56.1 KB

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

zx...@googlecode.com

non lue,
27 mai 2013, 08:17:4627/05/2013
à zx...@googlegroups.com

Comment #1 on issue 1693 by srowen: Non-optimal high-level-encoding in Aztec
http://code.google.com/p/zxing/issues/detail?id=1693

Rustam do you have any comments on this? otherwise I'll review. Broadly it
looks fine and I'm glad to see there are plenty of tests included, since
the primary concern is correctness.

zx...@googlecode.com

non lue,
31 mai 2013, 16:28:0331/05/2013
à zx...@googlegroups.com

Comment #2 on issue 1693 by srowen: Non-optimal high-level-encoding in Aztec
http://code.google.com/p/zxing/issues/detail?id=1693

Here's my take on the patch. The major difference is teasing apart the
inner classes into top-level classes and reshuffling a bit.

Attachments:
1693.patch 55.8 KB

zx...@googlecode.com

non lue,
31 mai 2013, 19:00:2231/05/2013
à zx...@googlegroups.com

Comment #3 on issue 1693 by fyel...@gmail.com: Non-optimal
Look good to me. I wasn't sure if the preferred style was each class in
its own file, or using inner static classes to keep related stuff
together. I'm happy either way.

zx...@googlecode.com

non lue,
1 juin 2013, 09:58:0601/06/2013
à zx...@googlegroups.com
Updates:
Status: Fixed
Owner: fyel...@gmail.com
Labels: Type-Enhancement Priority-Medium

Comment #4 on issue 1693 by srowen: Non-optimal high-level-encoding in Aztec
http://code.google.com/p/zxing/issues/detail?id=1693

Cool, this is in now too.

zx...@googlecode.com

non lue,
9 déc. 2013, 14:14:4809/12/2013
à zx...@googlegroups.com

Comment #5 on issue 1693 by rustam...@gmail.com: Non-optimal
Sorry - I just now saw this. Looks good to me -- but I'm wondering how much
memory is needed to keep track of all the possible states?
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message