1
votes

I have the task of encoding and decoding some bytes of sound using parity checksum method and Reed-Solomon Erasure Correction. I've done my encoding for first method(parity checksum) but need help completing the second method which is detection by Reed-Solomon Erasure Correction.

So far I know that, RS code adds t symbols to k symbols of data. So it is able to locate and correct up to t/2 symbols or if the error locations are known so called erasures. It can correct up to t. For this task I have to use Galois field GF(28) to represent each symbol as a byte. Operation addition and subtraction are based on XOR. So over all I have to employ Reed-Solomon codes that are capable of correction up to t=3 erasures. The computation of a single Reed Solomon code in now as follow

C0 | C1 |........| Ck-1 | Ck | Ck+1 | Ck+2

so the code bytes can be viewed as vector c=[c0,c1,...,ck+2] and a single code C is computed from k bytes of data as follow d=[d0,d1,...,dk-1], so my encoding and decoding process require the following Vandermonde matrix F

1  1    12     13   ...   1k-1
1  2    22     23   ...   2k-1
             ...
1 k+2 (k+2)2 (k+2)3 ... (k+2)k-1
1 k+3 (k+3)2 (k+3)3 ... (k+3)k-1

so a simple matrix vector multiplication using F & D we get C=F.D.

so far what I did for encoding is as follow :

#else

void fox_encode(Buffer* bufin, Buffer* bufout, FoxEncData* algorithm_data){

    // Your encoder for Task 2.C.3 goes in here !!!

    while (bufin->size >= 1){
        guint8 databyte = bufin->data[0];       //Pick up a byte from input buffer
        buffer_push_byte (bufout, databyte);    //Send it 3 times
        buffer_push_byte (bufout, databyte);
        buffer_push_byte (bufout, databyte);
        buffer_pop (bufin, 1);                  //Remove it from the input buffer
    }
}

#endif

I need code to complete this code for encoding and decoding my fox_encode and fox_decode class using Reed-Solomon Erasure Correction. Any Help will be appreciated to complete this task as soon as possible.

Thanks in advance

2
please correct your formattingCAFxX
What is the specific question?Oliver Charlesworth
need a code to complete above code for endocing error detection using Reed-SOlomon Erasure Correction, also need a code for decoding by using same method.Fox
So you just want someone to give you the code for RS coding/decoding? Have you tried a web search?Oliver Charlesworth
yes if possible.. Because I've tried my self and web sources but nothing useful found i done with first part which is by using parity checksum, but for this method(RS) i have no idea how to encoded and decoded. ThanksFox

2 Answers

0
votes

You can take look at my RS(255,255-k) C-implementation which is available from my homepage.

It handles both errors and erasures and corrects any byte error/erasure patterns bounded by:

(2*errorCount + erasureCount) <= k.

0
votes

There is now a good tutorial on Wikiversity which details how to handle both erasures and errors.

Here is an outline of what you need to implement for the erasures decoding process:

  1. Compute the syndromes. Then check if it's all 0 coefficients, the message does not need correction, else continue.
  2. Call the Forney algorithm with the syndrome and the erasures positions as input to compute the erasure magnitude polynomial (ie, the values to subtract from message polynomial to get the original message back).
  3. Subtract message - erasure_magnitude_polynomial to recover your original message (if within Singleton bound).

Apart from the Forney algorithm which can be a bit involving, all the other parts are very simple and straightforward. Indeed, the most difficult parts such as Berlekamp-Massey algorithm and Chien search are only necessary when you want to decode errors, and Forney syndromes computation is only necessary if you want to correct both erasures and errors (ie, errata) -- although I have read some paper which describe that Forney syndromes computation can be bypassed, but I never seen such a code.