OLD | NEW |
---|---|
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_SRC_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ | 7 #ifndef XFA_SRC_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ |
8 #define XFA_SRC_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ | 8 #define XFA_SRC_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ |
9 | 9 |
10 class CBC_OneDReader; | 10 class CBC_OneDReader; |
11 class CBC_CommonBitArray; | 11 class CBC_CommonBitArray; |
12 class CBC_OnedCode128Reader : public CBC_OneDReader { | 12 class CBC_OnedCode128Reader : public CBC_OneDReader { |
13 public: | 13 public: |
14 CBC_OnedCode128Reader(); | 14 CBC_OnedCode128Reader(); |
15 virtual ~CBC_OnedCode128Reader(); | 15 virtual ~CBC_OnedCode128Reader(); |
16 virtual CFX_ByteString DecodeRow(int32_t rowNumber, | 16 virtual CFX_ByteString DecodeRow(int32_t rowNumber, |
17 CBC_CommonBitArray* row, | 17 CBC_CommonBitArray* row, |
18 int32_t hints, | 18 int32_t hints, |
19 int32_t& e); | 19 int32_t& e); |
20 const static int32_t CODE_PATTERNS[107][7]; | 20 static const int32_t CODE_PATTERNS[107][7]; |
21 const static int32_t MAX_AVG_VARIANCE; | 21 static const int32_t MAX_AVG_VARIANCE; |
Tom Sepez
2016/03/08 19:27:06
etc.
dsinclair
2016/03/08 21:08:03
Done.
| |
22 const static int32_t MAX_INDIVIDUAL_VARIANCE; | 22 static const int32_t MAX_INDIVIDUAL_VARIANCE; |
23 | 23 |
24 const static int32_t CODE_SHIFT; | 24 static const int32_t CODE_SHIFT; |
25 const static int32_t CODE_CODE_C; | 25 static const int32_t CODE_CODE_C; |
26 const static int32_t CODE_CODE_B; | 26 static const int32_t CODE_CODE_B; |
27 const static int32_t CODE_CODE_A; | 27 static const int32_t CODE_CODE_A; |
28 const static int32_t CODE_FNC_1; | 28 static const int32_t CODE_FNC_1; |
29 const static int32_t CODE_FNC_2; | 29 static const int32_t CODE_FNC_2; |
30 const static int32_t CODE_FNC_3; | 30 static const int32_t CODE_FNC_3; |
31 const static int32_t CODE_FNC_4_A; | 31 static const int32_t CODE_FNC_4_A; |
32 const static int32_t CODE_FNC_4_B; | 32 static const int32_t CODE_FNC_4_B; |
33 | 33 |
34 const static int32_t CODE_START_A; | 34 static const int32_t CODE_START_A; |
35 const static int32_t CODE_START_B; | 35 static const int32_t CODE_START_B; |
36 const static int32_t CODE_START_C; | 36 static const int32_t CODE_START_C; |
37 const static int32_t CODE_STOP; | 37 static const int32_t CODE_STOP; |
38 | 38 |
39 private: | 39 private: |
40 CFX_Int32Array* FindStartPattern(CBC_CommonBitArray* row, int32_t& e); | 40 CFX_Int32Array* FindStartPattern(CBC_CommonBitArray* row, int32_t& e); |
41 int32_t DecodeCode(CBC_CommonBitArray* row, | 41 int32_t DecodeCode(CBC_CommonBitArray* row, |
42 CFX_Int32Array* counters, | 42 CFX_Int32Array* counters, |
43 int32_t rowOffset, | 43 int32_t rowOffset, |
44 int32_t& e); | 44 int32_t& e); |
45 }; | 45 }; |
46 | 46 |
47 #endif // XFA_SRC_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ | 47 #endif // XFA_SRC_FXBARCODE_ONED_BC_ONEDCODE128READER_H_ |
OLD | NEW |