quiet / libcorrect

C library for Convolutional codes and Reed-Solomon
BSD 3-Clause "New" or "Revised" License
379 stars 94 forks source link

Reed solomon decoder fails #5

Closed MageSlayer closed 7 years ago

MageSlayer commented 7 years ago

See attached diff with test where Reed-Solomon fails to recover 11 bit error even though it has 32 bits of parity (16 error bits should be guaranteed).

a.zip

brian-armstrong commented 7 years ago

Hi @MageSlayer

Thanks for the report. I'll have a closer look tonight.

Just to be clear, libcorrect's symbol size is 8 bits. With RS, an error in any symbol, even if it's only one bit, consumes one of your error budget. So I will need to look at this more closely, but it looks like in your example the error budget is 2, which could tolerate more than 2 bits of error only if these bits are located within the same 2 bytes. Is this true for your test case?

MageSlayer commented 7 years ago

Nope, I think the error is distributed across 8 bytes.

brian-armstrong commented 7 years ago

@MageSlayer Unfortunately libcorrect can presently only do 8-bit symbols :( It looks like your use case would be well-served by 1-bit symbols. In this case I'd recommend trying libfec which I believe can do arbitraily sized symbols

MageSlayer commented 7 years ago

Ok. Thanks. I'll check libfec :)