wxMaxima
Loading...
Searching...
No Matches
pdf417.h
1/* pdf417.h - PDF417 tables and coefficients declarations */
2/*
3 libzint - the open source barcode library
4 Copyright (C) 2008-2026 Robin Stuart <rstuart114@gmail.com>
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
9
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 3. Neither the name of the project nor the names of its contributors
16 may be used to endorse or promote products derived from this software
17 without specific prior written permission.
18
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
23 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 SUCH DAMAGE.
30 */
31/* SPDX-License-Identifier: BSD-3-Clause */
32
33/* See "pdf417_tabs.h" for table definitions */
34
35#ifndef Z_PDF417_H
36#define Z_PDF417_H
37
38#ifdef __cplusplus
39extern "C" {
40#endif /* __cplusplus */
41
42/* PDF417 error correction coefficients from ISO/IEC 15438:2015 Annex F */
43INTERNAL_DATA_EXTERN const unsigned short zint_pdf_coefrs[1022];
44
45/* Encoding/decoding table of PDF417 symbol character bar-space sequences from ISO/IEC 15438:2015 Annex A */
46INTERNAL_DATA_EXTERN const unsigned short zint_pdf_bitpattern[2787]; /* 2787 = 929 * 3 */
47
48/* Left RAP, Centre RAP, Right RAP and Start Cluster from ISO/IEC 15438:2015 Tables 10, 11 and 12 */
49INTERNAL_DATA_EXTERN const char zint_pdf_RAPTable[136]; /* 34 * 4 */
50
51/* Left and Right Row Address Pattern from ISO/IEC 15438:2015 Table 2 */
52INTERNAL_DATA_EXTERN const unsigned short zint_pdf_rap_side[52];
53
54/* Centre Row Address Pattern from ISO/IEC 15438:2015 Table 2 */
55INTERNAL_DATA_EXTERN const unsigned short zint_pdf_rap_centre[52];
56
57/* MicroPDF417 coefficients from ISO/IEC 24728:2006 Annex F */
58INTERNAL_DATA_EXTERN const unsigned short zint_pdf_Microcoeffs[344];
59
60/* Number of Data Columns (1st 34), Number of Rows (2nd 34), Number of EC CWs (3rd 34) from ISO/IEC 24728:2006 Table 1
61 and k-offsets (4th 34) into `zint_pdf_Microcoeffs[]` above */
62INTERNAL_DATA_EXTERN const unsigned short zint_pdf_MicroVariants[136]; /* 34 * 4 */
63
64INTERNAL void zint_pdf_byteprocess(short *chainemc, int *p_mclength, const unsigned char chaine[], int start,
65 const int length, const int lastmode);
66
67#ifdef __cplusplus
68}
69#endif /* __cplusplus */
70
71/* vim: set ts=4 sw=4 et : */
72#endif /* Z_PDF417_H */