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 _BC_REEDSOLOMONGF256_H_ | 7 #ifndef _BC_REEDSOLOMONGF256_H_ |
8 #define _BC_REEDSOLOMONGF256_H_ | 8 #define _BC_REEDSOLOMONGF256_H_ |
9 class CBC_ReedSolomonGF256Poly; | 9 class CBC_ReedSolomonGF256Poly; |
10 class CBC_ReedSolomonGF256; | 10 class CBC_ReedSolomonGF256 |
11 class CBC_ReedSolomonGF256 : public CFX_Object | |
12 { | 11 { |
13 public: | 12 public: |
14 static void Initialize(); | 13 static void Initialize(); |
15 static void Finalize(); | 14 static void Finalize(); |
16 static CBC_ReedSolomonGF256 *QRCodeFild; | 15 static CBC_ReedSolomonGF256 *QRCodeFild; |
17 static CBC_ReedSolomonGF256 *DataMatrixField; | 16 static CBC_ReedSolomonGF256 *DataMatrixField; |
18 CBC_ReedSolomonGF256(FX_INT32 primitive); | 17 CBC_ReedSolomonGF256(FX_INT32 primitive); |
19 virtual ~CBC_ReedSolomonGF256(); | 18 virtual ~CBC_ReedSolomonGF256(); |
20 CBC_ReedSolomonGF256Poly* GetZero(); | 19 CBC_ReedSolomonGF256Poly* GetZero(); |
21 CBC_ReedSolomonGF256Poly* GetOne(); | 20 CBC_ReedSolomonGF256Poly* GetOne(); |
22 CBC_ReedSolomonGF256Poly* BuildMonomial(FX_INT32 degree, FX_INT32 coefficien
t, FX_INT32 &e); | 21 CBC_ReedSolomonGF256Poly* BuildMonomial(FX_INT32 degree, FX_INT32 coefficien
t, FX_INT32 &e); |
23 static FX_INT32 AddOrSubtract(FX_INT32 a, FX_INT32 b); | 22 static FX_INT32 AddOrSubtract(FX_INT32 a, FX_INT32 b); |
24 FX_INT32 Exp(FX_INT32 a); | 23 FX_INT32 Exp(FX_INT32 a); |
25 FX_INT32 Log(FX_INT32 a, FX_INT32 &e); | 24 FX_INT32 Log(FX_INT32 a, FX_INT32 &e); |
26 FX_INT32 Inverse(FX_INT32 a, FX_INT32 &e); | 25 FX_INT32 Inverse(FX_INT32 a, FX_INT32 &e); |
27 FX_INT32 Multiply(FX_INT32 a, FX_INT32 b); | 26 FX_INT32 Multiply(FX_INT32 a, FX_INT32 b); |
28 virtual void Init(); | 27 virtual void Init(); |
29 private: | 28 private: |
30 FX_INT32 m_expTable[256]; | 29 FX_INT32 m_expTable[256]; |
31 FX_INT32 m_logTable[256]; | 30 FX_INT32 m_logTable[256]; |
32 CBC_ReedSolomonGF256Poly *m_zero; | 31 CBC_ReedSolomonGF256Poly *m_zero; |
33 CBC_ReedSolomonGF256Poly *m_one; | 32 CBC_ReedSolomonGF256Poly *m_one; |
34 }; | 33 }; |
35 #endif | 34 #endif |
OLD | NEW |