K. Moon | 832a694 | 2022-10-31 20:11:31 +0000 | [diff] [blame] | 1 | // Copyright 2014 The PDFium Authors |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
Dan Sinclair | e778668 | 2017-03-29 15:18:41 -0400 | [diff] [blame] | 7 | #ifndef FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_ |
| 8 | #define FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_ |
Lei Zhang | db36c24 | 2018-11-28 21:24:20 +0000 | [diff] [blame] | 9 | |
Lei Zhang | 537d3a6 | 2019-12-13 17:39:38 +0000 | [diff] [blame] | 10 | #include <stdint.h> |
| 11 | |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 12 | class CBC_CommonByteMatrix; |
Lei Zhang | db36c24 | 2018-11-28 21:24:20 +0000 | [diff] [blame] | 13 | |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 14 | class CBC_QRCoderMaskUtil { |
| 15 | public: |
Lei Zhang | db36c24 | 2018-11-28 21:24:20 +0000 | [diff] [blame] | 16 | CBC_QRCoderMaskUtil() = delete; |
| 17 | ~CBC_QRCoderMaskUtil() = delete; |
| 18 | |
| 19 | static bool GetDataMaskBit(int32_t maskPattern, int32_t x, int32_t y); |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 20 | |
| 21 | static int32_t ApplyMaskPenaltyRule1(CBC_CommonByteMatrix* matrix); |
| 22 | static int32_t ApplyMaskPenaltyRule2(CBC_CommonByteMatrix* matrix); |
| 23 | static int32_t ApplyMaskPenaltyRule3(CBC_CommonByteMatrix* matrix); |
| 24 | static int32_t ApplyMaskPenaltyRule4(CBC_CommonByteMatrix* matrix); |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 25 | }; |
| 26 | |
Dan Sinclair | e778668 | 2017-03-29 15:18:41 -0400 | [diff] [blame] | 27 | #endif // FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_ |