dmtx / libdmtx

libdmtx Library
Other
300 stars 137 forks source link

Issue with Reed Solomon errors detection/correction #42

Open olivAval opened 3 years ago

olivAval commented 3 years ago

Hi,

We saw that sometimes the error correction does not run as we expected: We had these codewords as input : {140, 142, 229, 130, 229, 130, 182, 130, 72, 156, 53, 144, 110, 15, 22, 55, 12, 171}, that is seen as {174, 142, 229, 130, 229, 130, 182, 131, 72, 156, 61, 144, 110, 47, 50, 63, 12, 155}, so we have some errors (starting from the end 0 2 3 4 7 17 index, 0 index being the last code), but while detection/correction, we get "5 errors / 5 correctables" out of RsFindErrorLocatorPoly, which seems to be a normal behaviour because it seems to maximise the look for loop at the maximum number of correctable errors. Then we run RsFindErrorLocations and this function seems to fail when there are toomuch errors (it finds less error locations tat the number of correction to get and the function outs an error. But in our case, 5 locations are found (but we had 7 errors), and locations are loc[0] = 2 loc[1] = 4 loc[2] = 15 loc[3] = 16 loc[4] = 15 : we find 5 errors but two at the same index and get a successful output, but with a wrong codeword array: we expected: 10 12 99 00 99 00 52 00 but we extract : 44 12 99 00 99 00 52 01

Thanks for your help!

msva commented 2 years ago

Hi there! Actually, original author is unavailable long ago, and I'm just keeping kind of maintenance when I have enough spare time (I'm not even guru on the entire codebase and last time I looked in the code was about few years ago). For now, project is in "active maintainers wanted" stage and I'm ready to give push access to anyone willing to co-maintain it.