libdmtx 0.7.8.7
libdmtx is a software library that enables programs to read and write Data Matrix barcodes of the modern ECC200 variety.
|
libdmtx - Data Matrix Encoding/Decoding Library Copyright 2011 Mike Laughton. More...
Go to the source code of this file.
Macros | |
#define | NN 255 |
#define | MAX_ERROR_WORD_COUNT 68 |
#define | DMTX_CHECK_BOUNDS(l, i) |
#define | GfAdd(a, b) |
#define | GfMult(a, b) |
#define | GfMultAntilog(a, b) |
#define | CHKPASS |
#define | CHKPASS |
#define | CHKPASS |
#define | CHKPASS |
#define | CHKPASS |
#define | CHKPASS |
#define | CHKPASS |
Functions | |
static DmtxPassFail | rsEncode (DmtxMessage *message, int sizeIdx) |
Encode xyz. | |
static DmtxPassFail | rsDecode (unsigned char *code, int sizeIdx, int fix) |
Decode xyz. | |
static DmtxPassFail | rsGenPoly (DmtxByteList *gen, int errorWordCount) |
Populate generator polynomial. | |
static DmtxBoolean | rsComputeSyndromes (DmtxByteList *syn, const DmtxByteList *rec, int blockErrorWords) |
Populate generator polynomial. | |
static DmtxBoolean | rsFindErrorLocatorPoly (DmtxByteList *elpOut, const DmtxByteList *syn, int errorWordCount, int maxCorrectable) |
Find the error location polynomial using Berlekamp-Massey. | |
static DmtxBoolean | rsFindErrorLocations (DmtxByteList *loc, const DmtxByteList *elp) |
Find roots of the error locator polynomial (Chien Search). | |
static DmtxPassFail | rsRepairErrors (DmtxByteList *rec, const DmtxByteList *loc, const DmtxByteList *elp, const DmtxByteList *syn) |
Find the error values and repair. | |
Variables | |
static DmtxByte | log301 [] |
static DmtxByte | antilog301 [] |
libdmtx - Data Matrix Encoding/Decoding Library Copyright 2011 Mike Laughton.
All rights reserved. Copyright 2012-2016 Vadim A. Misbakh-Soloviov. All rights reserved.
See LICENSE file in the main project directory for full terms of use and distribution.
Portions of this file were derived from the Reed-Solomon
Contact: Vadim A. Misbakh-Soloviov dmtx@.nosp@m.mva..nosp@m.name Mike Laughton mike@.nosp@m.drag.nosp@m.onfly.nosp@m.logi.nosp@m.c.com
Definition in file dmtxreedsol.c.
#define CHKPASS |
#define CHKPASS |
Definition at line 71 of file dmtxreedsol.c.
#define CHKPASS |
Definition at line 71 of file dmtxreedsol.c.
#define CHKPASS |
#define CHKPASS |
#define CHKPASS |
Definition at line 71 of file dmtxreedsol.c.
#define CHKPASS |
Definition at line 71 of file dmtxreedsol.c.
#define DMTX_CHECK_BOUNDS | ( | l, | |
i ) |
Definition at line 29 of file dmtxreedsol.c.
#define GfAdd | ( | a, | |
b ) |
Definition at line 32 of file dmtxreedsol.c.
#define GfMult | ( | a, | |
b ) |
Definition at line 35 of file dmtxreedsol.c.
#define GfMultAntilog | ( | a, | |
b ) |
Definition at line 38 of file dmtxreedsol.c.
#define MAX_ERROR_WORD_COUNT 68 |
Definition at line 27 of file dmtxreedsol.c.
#define NN 255 |
Definition at line 26 of file dmtxreedsol.c.
|
static |
Populate generator polynomial.
Assume we have received bits grouped into mm-bit symbols in rec[i], i=0..(nn-1), and rec[i] is index form (ie as powers of alpha). We first compute the 2*tt syndromes by substituting alpha**i into rec(X) and evaluating, storing the syndromes in syn[i], i=1..2tt (leave syn[0] zero).
syn | |
rec | |
blockErrorWords |
Definition at line 298 of file dmtxreedsol.c.
|
static |
Decode xyz.
More detailed description.
code | |
sizeIdx | |
fix |
Definition at line 148 of file dmtxreedsol.c.
|
static |
Encode xyz.
More detailed description.
message | |
sizeIdx |
Definition at line 83 of file dmtxreedsol.c.
|
static |
Find roots of the error locator polynomial (Chien Search).
If the degree of elp is <= tt, we substitute alpha**i, i=1..n into the elp to get the roots, hence the inverse roots, the error location numbers. If the number of errors located does not equal the degree of the elp, we have more than tt errors and cannot correct them.
loc | |
elp |
Definition at line 437 of file dmtxreedsol.c.
|
static |
Find the error location polynomial using Berlekamp-Massey.
More detailed description.
elpOut | |
syn | |
errorWordCount | |
maxCorrectable |
Definition at line 339 of file dmtxreedsol.c.
|
static |
Populate generator polynomial.
More detailed description.
gen | |
errorWordCount |
Definition at line 258 of file dmtxreedsol.c.
|
static |
Find the error values and repair.
Solve for the error value at the error location and correct the error. The procedure is that found in Lin and Costello. For the cases where the number of errors is known to be too large to correct, the information symbols as received are output (the advantage of systematic encoding is that hopefully some of the information symbols will be okay and that if we are in luck, the errors are in the parity part of the transmitted codeword).
rec | |
loc | |
elp | |
syn |
Definition at line 485 of file dmtxreedsol.c.
|
static |
Definition at line 56 of file dmtxreedsol.c.
|
static |
Definition at line 41 of file dmtxreedsol.c.