blob: e7415376edee63b01cff7f8a75035943eeb72192 [file] [log] [blame]
K. Moon832a6942022-10-31 20:11:31 +00001// Copyright 2014 The PDFium Authors
Dan Sinclair1770c022016-03-14 14:14:16 -04002// 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 Sinclaire7786682017-03-29 15:18:41 -04007#ifndef FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_
8#define FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_
Lei Zhangdb36c242018-11-28 21:24:20 +00009
Lei Zhang537d3a62019-12-13 17:39:38 +000010#include <stdint.h>
11
Dan Sinclair1770c022016-03-14 14:14:16 -040012class CBC_CommonByteMatrix;
Lei Zhangdb36c242018-11-28 21:24:20 +000013
Dan Sinclair1770c022016-03-14 14:14:16 -040014class CBC_QRCoderMaskUtil {
15 public:
Lei Zhangdb36c242018-11-28 21:24:20 +000016 CBC_QRCoderMaskUtil() = delete;
17 ~CBC_QRCoderMaskUtil() = delete;
18
19 static bool GetDataMaskBit(int32_t maskPattern, int32_t x, int32_t y);
Dan Sinclair1770c022016-03-14 14:14:16 -040020
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 Sinclair1770c022016-03-14 14:14:16 -040025};
26
Dan Sinclaire7786682017-03-29 15:18:41 -040027#endif // FXBARCODE_QRCODE_BC_QRCODERMASKUTIL_H_