RE: Bug example (2006-04-16 01:35 by drhu00 #21258)
I think we can use following:
else if (version >= 14 && version <= 20) {
logicalSeeds = new int[4];
logicalSeeds[0] = 6;
logicalSeeds[1] = 7 + 1 * version / 2;
logicalSeeds[2] = 9 + 2 * version / 2;
logicalSeeds[3] = 10 + 4 * version;
logicalCenters = new Point[logicalSeeds.length][logicalSeeds.length];
}
else if (version >= 21 && version <= 27) {
logicalSeeds = new int[5];
logicalSeeds[0] = 6;
logicalSeeds[1] = 7 + 1 * version;
logicalSeeds[2] = 8 + 2 * version;
logicalSeeds[3] = 9 + 3 * version;
logicalSeeds[4] = 10 + 4 * version;
logicalCenters = new Point[logicalSeeds.length][logicalSeeds.length];
}
But we still need the correct cal for getCenter
Do you know some number for ver >= 28? If we know what it should be, maybe we can fihure out the formula
RE: Problem with logicalSeeds (2006-04-15 04:16 by drhu00 #21240)
Benjamin, in your new code, you should avoid using float. Because we try to build application for J2ME that only support CLDC 1.0 (no floating point support).
In your code AlignmentPatern.java and Point.java, change ratio from float to int.
Irregular logicalSeeds (2006-04-18 18:53 by benjaminbellamy #21327)
If we can't find a regular formula, at least we can find a regular... array !
I suggest we used an array containing all the values.
It's fast, it's reliable, it doesn't waste much memory and it allows us to use the same code for all versions.
It just needs patience to write the table... and I already did it.
RE: New LogicalSeed class (2006-04-19 08:02 by drhu00 #21357)
Good job. I like the seeds table. Actually, I prefer to use simple table to replace the hard understable calculation if the value can be predetermine, mostlikely depending on the versiom. The speed is the key point in decoding.