pdf417.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* pdf417.h - PDF417 tables and coefficients declarations */
  2. /*
  3. libzint - the open source barcode library
  4. Copyright (C) 2008-2024 Robin Stuart <rstuart114@gmail.com>
  5. Portions Copyright (C) 2004 Grandzebu
  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. 1. Redistributions of source code must retain the above copyright
  10. notice, this list of conditions and the following disclaimer.
  11. 2. Redistributions in binary form must reproduce the above copyright
  12. notice, this list of conditions and the following disclaimer in the
  13. documentation and/or other materials provided with the distribution.
  14. 3. Neither the name of the project nor the names of its contributors
  15. may be used to endorse or promote products derived from this software
  16. without specific prior written permission.
  17. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  18. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  21. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23. OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24. HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25. LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. SUCH DAMAGE.
  28. */
  29. /* SPDX-License-Identifier: BSD-3-Clause */
  30. /* See "pdf417_tabs.h" for table definitions */
  31. #ifndef Z_PDF417_H
  32. #define Z_PDF417_H
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif /* __cplusplus */
  36. /* PDF417 error correction coefficients from Grand Zebu */
  37. INTERNAL_DATA_EXTERN const unsigned short pdf_coefrs[1022];
  38. INTERNAL_DATA_EXTERN const unsigned short pdf_bitpattern[2787];
  39. /* MicroPDF417 coefficients from ISO/IEC 24728:2006 Annex F */
  40. INTERNAL_DATA_EXTERN const unsigned short pdf_Microcoeffs[344];
  41. /* rows, columns, error codewords, k-offset of valid MicroPDF417 sizes from ISO/IEC 24728:2006 */
  42. INTERNAL_DATA_EXTERN const unsigned short pdf_MicroVariants[136];
  43. /* following is Left RAP, Centre RAP, Right RAP and Start Cluster from ISO/IEC 24728:2006 tables 10, 11 and 12 */
  44. INTERNAL_DATA_EXTERN const char pdf_RAPTable[136];
  45. /* Left and Right Row Address Pattern from Table 2 */
  46. INTERNAL_DATA_EXTERN const unsigned short pdf_rap_side[52];
  47. /* Centre Row Address Pattern from Table 2 */
  48. INTERNAL_DATA_EXTERN const unsigned short pdf_rap_centre[52];
  49. INTERNAL void pdf_byteprocess(short *chainemc, int *p_mclength, const unsigned char chaine[], int start,
  50. const int length, const int lastmode);
  51. #ifdef __cplusplus
  52. }
  53. #endif /* __cplusplus */
  54. /* vim: set ts=4 sw=4 et : */
  55. #endif /* Z_PDF417_H */