Reed Solomon encoding/decoding with 1-,2- and 3- Bit words

39 views
Skip to first unread message

Charlie Chan

unread,
Aug 25, 2016, 11:17:39 PM8/25/16
to zxing
Hi,

How do you use Reed Solomon encoding/decoding with 1-,2- and 3- Bit words. In particular, how to set each field of the method for each case:

GenericGF(int primitive, int size, int b)

I found it particularly difficult to set the primitive parameter. There is probably a number of possibilities, it would be great if you can provide some examples.

Many thanks in advance for your help.

Best,

Charlie

Sean Owen

unread,
Aug 28, 2016, 8:14:35 AM8/28/16
to zxing
It's an irreducible polynomial over the field. I think it'd be easier if you read up on that separately rather than explain it here. The file itself has 6 examples of different fields and their polynomials. Did you try reading any of the rest of the source?

Charlie Chan

unread,
Aug 28, 2016, 6:07:44 PM8/28/16
to zxing
On Monday, August 29, 2016 at 12:14:35 AM UTC+12, Sean Owen wrote:
> It's an irreducible polynomial over the field. I think it'd be easier if you read up on that separately rather than explain it here. The file itself has 6 examples of different fields and their polynomials. Did you try reading any of the rest of the source?

Hi Sean,

Thank you for the speedy reply.

1) Yes I know about the 6 examples you provided, and I've read the rest of the source:
public static final GenericGF AZTEC_DATA_12 = new GenericGF(0x1069, 4096, 1); // x^12 + x^6 + x^5 + x^3 + 1
public static final GenericGF AZTEC_DATA_10 = new GenericGF(0x409, 1024, 1); // x^10 + x^3 + 1
public static final GenericGF AZTEC_DATA_6 = new GenericGF(0x43, 64, 1); // x^6 + x + 1
public static final GenericGF AZTEC_PARAM = new GenericGF(0x13, 16, 1); // x^4 + x + 1
public static final GenericGF QR_CODE_FIELD_256 = new GenericGF(0x011D, 256, 0); // x^8 + x^4 + x^3 + x^2 + 1
public static final GenericGF DATA_MATRIX_FIELD_256 = new GenericGF(0x012D, 256, 1); // x^8 + x^5 + x^3 + x^2 + 1


2) My problem is I don't know how to set the irreducible polynomials (I've tried many values and the code just hanged). I don't need explanations, but if you can just provide example value of the irreducible polynomial x and b in each of the following case (1-3 bits) that would really help me to learn.
new GenericGF(x, 8, b) // 3 bit
new GenericGF(x, 4, b) // 2 bit
new GenericGF(x, 2, b) // 1 bit

Many thanks Sean.

Best,

Charlie

Reply all
Reply to author
Forward
0 new messages