southamptonzeng / FEC

BCH/RS码的编码

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FEC - Forward error correction
Written in 2017 by <Ahmet Inan> <xdsopl@gmail.com>
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

Read:
Introduction to Bose Chaudhuri Hocquenghem codes
Tretter, S. A. (NASA Goddard Space Flight Center, Greenbelt, MD, United States)

Read:
Tutorial on Reed-Solomon error correction coding
Geisel, William A. (NASA Lyndon B. Johnson Space Center, Houston, TX, United States)

Read:
A Simplified Procedure for Correcting Both Errors and Erasures of a Reed-Solomon Code Using the Euclidean Algorithm
T. K. Truong and I. S. Hsu (Communications Systems Research Section)
W. L. Eastman (Mitre Corporation)
I. S. Reed (University of Southern California)

Read:
Reed-Solomon error correction (White Paper WHP 031)
C.K.P. Clarke (BBC R&D)

Read:
Quadratic Equations in Finite Fields of Characteristic 2
Klaus Pommerening (Johannes Gutenberg-Universität Mainz)

Read:
Berlekamp–Massey algorithm
https://en.wikipedia.org/wiki/Berlekamp%E2%80%93Massey_algorithm

Read:
Chien search
https://en.wikipedia.org/wiki/Chien_search

Read:
Forney algorithm
https://en.wikipedia.org/wiki/Forney_algorithm

Read:
Synthetic division
https://en.wikipedia.org/wiki/Synthetic_division

Read:
Horner's method
https://en.wikipedia.org/wiki/Horner%27s_method

# make speed
clang++ -stdlib=libc++ -std=c++11 -W -Wall -O3 -march=native tables_generator.cc -o tables_generator
./tables_generator > galois_field_tables.hh
clang++ -stdlib=libc++ -std=c++11 -W -Wall -O3 -march=native -DNDEBUG testbench.cc -o benchmark
uname -p | tee RESULTS
Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
./benchmark | tee -a RESULTS
testing: NASA INTRO BCH(15, 5) T=3
encoding of 1047536 random bytes into 3142608 codeword bytes (200.0% redundancy) in 1676058 blocks took 62 milliseconds (16896KB/s).
decoding with 0 errors and 0 known erasures per block took 178 milliseconds (17655KB/s).
decoding with 1 errors and 0 known erasures per block took 365 milliseconds (8610KB/s).
decoding with 1 errors and 1 known erasures per block took 326 milliseconds (9640KB/s).
decoding with 2 errors and 0 known erasures per block took 536 milliseconds (5863KB/s).
decoding with 2 errors and 1 known erasures per block took 575 milliseconds (5465KB/s).
decoding with 2 errors and 2 known erasures per block took 491 milliseconds (6400KB/s).
decoding with 3 errors and 0 known erasures per block took 1000 milliseconds (3143KB/s).
decoding with 3 errors and 1 known erasures per block took 1127 milliseconds (2788KB/s).
decoding with 3 errors and 2 known erasures per block took 1067 milliseconds (2945KB/s).
decoding with 3 errors and 3 known erasures per block took 923 milliseconds (3405KB/s).
decoding with 4 errors and 0 known erasures per block took 878 milliseconds (3579KB/s). expected 6704232 corrected errors but got 1088103 and 4663521 wrong corrections.
decoding with 4 errors and 1 known erasures per block took 1140 milliseconds (2757KB/s). expected 6704232 corrected errors but got -516707 and 903903 wrong corrections.
decoding with 4 errors and 2 known erasures per block took 1435 milliseconds (2190KB/s).
decoding with 4 errors and 3 known erasures per block took 1348 milliseconds (2331KB/s).
decoding with 4 errors and 4 known erasures per block took 1142 milliseconds (2752KB/s).
decoding with 5 errors and 0 known erasures per block took 843 milliseconds (3728KB/s). expected 8380290 corrected errors but got 959093 and 5294165 wrong corrections.
decoding with 5 errors and 1 known erasures per block took 1125 milliseconds (2793KB/s). expected 8380290 corrected errors but got -772424 and 1980472 wrong corrections.
decoding with 5 errors and 2 known erasures per block took 1235 milliseconds (2545KB/s). expected 8380290 corrected errors but got -1147263 and 1232413 wrong corrections.
decoding with 5 errors and 3 known erasures per block took 1403 milliseconds (2240KB/s). expected 8380290 corrected errors but got -960345 and 42385 wrong corrections.
decoding with 5 errors and 4 known erasures per block took 1679 milliseconds (1872KB/s).
decoding with 5 errors and 5 known erasures per block took 1413 milliseconds (2224KB/s).
decoding with 6 errors and 0 known erasures per block took 907 milliseconds (3465KB/s). expected 10056348 corrected errors but got 2349688 and 7506346 wrong corrections.
decoding with 6 errors and 1 known erasures per block took 1106 milliseconds (2841KB/s). expected 10056348 corrected errors but got -613872 and 2368013 wrong corrections.
decoding with 6 errors and 2 known erasures per block took 1345 milliseconds (2337KB/s). expected 10056348 corrected errors but got -59452 and 3336974 wrong corrections.
decoding with 6 errors and 3 known erasures per block took 1428 milliseconds (2201KB/s). expected 10056348 corrected errors but got -1469115 and 496903 wrong corrections.
decoding with 6 errors and 4 known erasures per block took 1727 milliseconds (1820KB/s). expected 10056348 corrected errors but got -1606086 and 244902 wrong corrections.
decoding with 6 errors and 5 known erasures per block took 1823 milliseconds (1724KB/s). expected 10056348 corrected errors but got -884645 and 18865 wrong corrections.
decoding with 6 errors and 6 known erasures per block took 1518 milliseconds (2070KB/s).
testing: BBC WHP031 RS(15, 11) T=2
encoding of 1000000 random bytes into 1363642 codeword bytes (36% redundancy) in 181819 blocks took 25 milliseconds (40000KB/s).
decoding with 0 errors and 0 known erasures per block took 25 milliseconds (54546KB/s).
decoding with 1 errors and 0 known erasures per block took 42 milliseconds (32468KB/s).
decoding with 1 errors and 1 known erasures per block took 37 milliseconds (36855KB/s).
decoding with 2 errors and 0 known erasures per block took 62 milliseconds (21994KB/s).
decoding with 2 errors and 1 known erasures per block took 60 milliseconds (22727KB/s).
decoding with 2 errors and 2 known erasures per block took 50 milliseconds (27273KB/s).
decoding with 3 errors and 0 known erasures per block took 59 milliseconds (23113KB/s). expected 545457 corrected errors but got -15182 and 276517 wrong corrections.
decoding with 3 errors and 1 known erasures per block took 91 milliseconds (14985KB/s). expected 545457 corrected errors but got 75734 and 275110 wrong corrections.
decoding with 3 errors and 2 known erasures per block took 110 milliseconds (12397KB/s).
decoding with 3 errors and 3 known erasures per block took 99 milliseconds (13774KB/s).
decoding with 4 errors and 0 known erasures per block took 61 milliseconds (22355KB/s). expected 727276 corrected errors but got 41467 and 422550 wrong corrections.
decoding with 4 errors and 1 known erasures per block took 92 milliseconds (14822KB/s). expected 727276 corrected errors but got 97347 and 399453 wrong corrections.
decoding with 4 errors and 2 known erasures per block took 106 milliseconds (12865KB/s). expected 727276 corrected errors but got 366765 and 709753 wrong corrections.
decoding with 4 errors and 3 known erasures per block took 119 milliseconds (11459KB/s). expected 727276 corrected errors but got 519021 and 666865 wrong corrections.
decoding with 4 errors and 4 known erasures per block took 115 milliseconds (11858KB/s).
*snip*

About

BCH/RS码的编码

License:Creative Commons Zero v1.0 Universal


Languages

Language:C++ 98.2%Language:Makefile 1.8%