Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: core/src/fxcodec/jbig2/JBig2_ArithDecoder.h

Issue 1359013003: Cleanup JBig2_ArithIntDecoder. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 JBig2ArithCtx() : MPS(0), I(0) {}
14
13 unsigned int MPS; 15 unsigned int MPS;
14 unsigned int I; 16 unsigned int I;
15 }; 17 };
16 18
17 class CJBig2_ArithDecoder { 19 class CJBig2_ArithDecoder {
18 public: 20 public:
19 explicit CJBig2_ArithDecoder(CJBig2_BitStream* pStream); 21 explicit CJBig2_ArithDecoder(CJBig2_BitStream* pStream);
20 22
21 ~CJBig2_ArithDecoder(); 23 ~CJBig2_ArithDecoder();
22 24
23 int DECODE(JBig2ArithCtx* pCX); 25 int DECODE(JBig2ArithCtx* pCX);
24 26
25 private: 27 private:
26 void BYTEIN(); 28 void BYTEIN();
27 void ReadValueA(); 29 void ReadValueA();
28 30
29 unsigned char m_B; 31 unsigned char m_B;
30 unsigned int m_C; 32 unsigned int m_C;
31 unsigned int m_A; 33 unsigned int m_A;
32 unsigned int m_CT; 34 unsigned int m_CT;
33 CJBig2_BitStream* const m_pStream; 35 CJBig2_BitStream* const m_pStream;
34 }; 36 };
35 37
36 #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_ 38 #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698