討論區: English (Thread #16370)

Good News: Fixed ReedSolomon.java available (2007-10-10 09:51 by drhu00 #32698)

From <a href=http://www.drhu.org/j2se.php?url=QRCode/QRCode.html>here</a>, you can find the fixed java source code of ReedSolomon.java which fixed several bugs in the original c version.

回覆 #32698×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

RE: Good News: Fixed ReedSolomon.java availab (2007-10-10 16:25 by 匿名 #32704)

Great job, it really works,

but I have to change lines with eccPerRSBlock/2 to
eccPerRSBlock

jascco
回覆: #32698

回覆 #32704×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

Random data problem (2007-10-11 23:50 by m-miyzaki #32729)

Congratulations!
I'm a project leader for JAVA reed-solomon library at
http://sourceforge.jp/projects/reedsolomon

Your source code has a problem for ramdom data correction as below and returns correctionSucceeded is true.
It was succeeded from the original c-source.

public static void main(String[] args) {
java.util.Random random = new java.util.Random();
for(int count = 0; count < 10; count++) {
int[] data = new int[255];
for(int i = 0; i < data.length; i++) {
data[i] = random.nextInt() & 0xff;
}
ReedSolomon rs = new ReedSolomon(data, 17);
rs.correct();
System.out.println(rs.correctionSucceeded);
}
}
回覆: #32698

回覆 #32729×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

Random data problem patch (2007-10-12 01:24 by m-miyzaki #32732)

*** orig\ReedSolomon.java Fri Oct 12 01:15:41 2007
--- ReedSolomon.java Fri Oct 12 01:04:07 2007
***************
*** 161,167 ****
}

/* From Cain, Clark, "Error-Correction Coding For Digital Communications", pp. 216. */
! void Modified_Berlekamp_Massey() {
int L2, d;
int[] psi = new int[MAXDEG];
int[] psi2 = new int[MAXDEG];
--- 161,167 ----
}

/* From Cain, Clark, "Error-Correction Coding For Digital Communications", pp. 216. */
! boolean Modified_Berlekamp_Massey() {
int L2, d;
int[] psi = new int[MAXDEG];
int[] psi2 = new int[MAXDEG];
***************
*** 196,201 ****
--- 196,203 ----
/* D = scale_poly(ginv(d), psi); */
for (int i = 0; i < MAXDEG; i++) D[i] = gmult(psi[i], ginv(d));
L = L2;
+ if(L > NPAR / 2)
+ return false;
}

/* psi = psi2 */
***************
*** 208,213 ****
--- 210,216 ----
for(int i = 0; i < MAXDEG; i++) Lambda[i] = psi[i];
//printArray(Lambda);
compute_modified_omega();
+ return true;
}

/* given Psi (called Lambda in Modified_Berlekamp_Massey) and synBytes,
***************
*** 328,334 ****
NErasures = nerasures;
for (int i = 0; i < NErasures; i++) ErasureLocs[i] = erasures[i];

! Modified_Berlekamp_Massey();
Find_Roots();
if (NErrors == 0) return true;

--- 331,338 ----
NErasures = nerasures;
for (int i = 0; i < NErasures; i++) ErasureLocs[i] = erasures[i];

! if(!Modified_Berlekamp_Massey())
! return false;
Find_Roots();
if (NErrors == 0) return true;

回覆: #32729

回覆 #32732×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

Sorry, this patch is more better (2007-10-13 09:57 by m-miyzaki #32741)

The degree of the lambda is compared with NErrors.

*** orig/ReedSolomon.java 2007-10-13 08:07:22.000000000 +0900
--- ReedSolomon.java 2007-10-13 09:01:20.000000000 +0900
***************
*** 160,166 ****
}

/* From Cain, Clark, "Error-Correction Coding For Digital Communications", pp. 216. */
! void Modified_Berlekamp_Massey() {
int L2, d;
int[] psi = new int[MAXDEG];
int[] psi2 = new int[MAXDEG];
--- 160,166 ----
}

/* From Cain, Clark, "Error-Correction Coding For Digital Communications", pp. 216. */
! int Modified_Berlekamp_Massey() {
int L2, d;
int[] psi = new int[MAXDEG];
int[] psi2 = new int[MAXDEG];
***************
*** 207,212 ****
--- 207,213 ----
for(int i = 0; i < MAXDEG; i++) Lambda[i] = psi[i];
//printArray(Lambda);
compute_modified_omega();
+ return L;
}

/* given Psi (called Lambda in Modified_Berlekamp_Massey) and synBytes,
***************
*** 327,334 ****
NErasures = nerasures;
for (int i = 0; i < NErasures; i++) ErasureLocs[i] = erasures[i];

! Modified_Berlekamp_Massey();
Find_Roots();
if (NErrors == 0) return true;

if (NErrors <= NPAR) {
--- 328,337 ----
NErasures = nerasures;
for (int i = 0; i < NErasures; i++) ErasureLocs[i] = erasures[i];

! int degree = Modified_Berlekamp_Massey();
! if(degree > NPAR / 2) return false;
Find_Roots();
+ if(degree != NErrors) return false;
if (NErrors == 0) return true;

if (NErrors <= NPAR) {
回覆: #32732

回覆 #32741×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

Contact me (2007-10-15 08:43 by drhu00 #32760)

I don't understand what you mean. If you find a bug in my code, please let me know. Or if you have a specific test tthat can fail my code, let me know also.
回覆: #32729

回覆 #32760×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

RE: Contact me (2007-10-16 01:10 by m-miyzaki #32789)

It is an original c-source bug rather than yours.
Please test on the following conditions.

Number of parity(NPAR) = 17
data length(with parity) = 255
Number of errors = 9

The decoder should notify the correction failure.
However, the success is actually notified.
(correctionSucceeded = true)

I will E-mail the test program, if you need it.
回覆: #32760

回覆 #32789×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

Brief description (2007-10-16 18:34 by m-miyzaki #32799)

The degree of Lambda must be equal to NErrors to correct RS-CODE correctly. It is necessary to notify the correction failure, if it is not so.
However, the original source code and yours lack this check.
回覆: #32760

回覆 #32799×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

Try my decoder (2007-10-19 06:21 by m-miyzaki #32851)

Please try my decoder if you are interested.
It has not such a bug and might be two times faster.

http://sourceforge.jp/projects/reedsolomon/
回覆: #32760

回覆 #32851×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

RE: Try my decoder (2007-12-04 23:47 by yanbe #33787)

Finally I released version 0.9 which utilize your ReedSolomon decoder.

Thanks for suggestion. It really helped this project.
回覆: #32851

回覆 #33787×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

Congratulations on new release (2007-12-06 21:17 by m-miyzaki #33830)

I am very happy that my decoder is used
by your project.
回覆: #33787

回覆 #33830×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入

RE: Good News: Fixed ReedSolomon.java available (2008-01-08 18:37 by 匿名 #34370)

good news.
回覆: #32698

回覆 #34370×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登入