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 _JBIG2_ARITH_INT_DECODER_H_ | 7 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHINTDECODER_H_ |
8 #define _JBIG2_ARITH_INT_DECODER_H_ | 8 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHINTDECODER_H_ |
| 9 |
| 10 #include <vector> |
9 | 11 |
10 #include "JBig2_ArithDecoder.h" | 12 #include "JBig2_ArithDecoder.h" |
11 | 13 |
12 class CJBig2_ArithIntDecoder { | 14 class CJBig2_ArithIntDecoder { |
13 public: | 15 public: |
14 CJBig2_ArithIntDecoder(); | 16 CJBig2_ArithIntDecoder(); |
15 | |
16 ~CJBig2_ArithIntDecoder(); | 17 ~CJBig2_ArithIntDecoder(); |
17 | 18 |
18 int decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult); | 19 bool decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult); |
19 | 20 |
20 private: | 21 private: |
21 JBig2ArithCtx* IAx; | 22 std::vector<JBig2ArithCtx> m_IAx; |
22 }; | 23 }; |
| 24 |
23 class CJBig2_ArithIaidDecoder { | 25 class CJBig2_ArithIaidDecoder { |
24 public: | 26 public: |
25 CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA); | 27 explicit CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA); |
26 | |
27 ~CJBig2_ArithIaidDecoder(); | 28 ~CJBig2_ArithIaidDecoder(); |
28 | 29 |
29 int decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult); | 30 void decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult); |
30 | 31 |
31 private: | 32 private: |
32 JBig2ArithCtx* IAID; | 33 std::vector<JBig2ArithCtx> m_IAID; |
33 | 34 |
34 unsigned char SBSYMCODELEN; | 35 const unsigned char SBSYMCODELEN; |
35 }; | 36 }; |
36 #endif | 37 |
| 38 #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHINTDECODER_H_ |
OLD | NEW |