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 CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_ | 7 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_ |
8 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_ | 8 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_ |
9 | 9 |
10 class CJBig2_BitStream; | 10 class CJBig2_BitStream; |
11 | 11 |
12 struct JBig2ArithCtx { | 12 struct JBig2ArithCtx { |
13 unsigned int MPS; | 13 unsigned int MPS; |
14 unsigned int I; | 14 unsigned int I; |
15 }; | 15 }; |
16 | 16 |
17 class CJBig2_ArithDecoder { | 17 class CJBig2_ArithDecoder { |
18 public: | 18 public: |
19 explicit CJBig2_ArithDecoder(CJBig2_BitStream* pStream); | 19 explicit CJBig2_ArithDecoder(CJBig2_BitStream* pStream); |
20 | 20 |
21 ~CJBig2_ArithDecoder(); | 21 ~CJBig2_ArithDecoder(); |
22 | 22 |
23 int DECODE(JBig2ArithCtx* pCX); | 23 int DECODE(JBig2ArithCtx* pCX); |
24 | 24 |
25 private: | 25 private: |
26 void INITDEC(); | |
27 void BYTEIN(); | 26 void BYTEIN(); |
| 27 void ReadValueA(); |
28 | 28 |
29 unsigned char B; | 29 unsigned char m_B; |
30 unsigned int C; | 30 unsigned int m_C; |
31 unsigned int A; | 31 unsigned int m_A; |
32 unsigned int CT; | 32 unsigned int m_CT; |
33 CJBig2_BitStream* m_pStream; | 33 CJBig2_BitStream* const m_pStream; |
34 }; | 34 }; |
35 | 35 |
36 #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_ | 36 #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_ |
OLD | NEW |