• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FXCODEC_JBIG2_JBIG2_SDDPROC_H_
8 #define CORE_FXCODEC_JBIG2_JBIG2_SDDPROC_H_
9 
10 #include <memory>
11 #include <vector>
12 
13 #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h"
14 #include "core/fxcrt/fx_system.h"
15 
16 class CJBig2_BitStream;
17 class CJBig2_HuffmanTable;
18 class CJBig2_Image;
19 class CJBig2_SymbolDict;
20 
21 class CJBig2_SDDProc {
22  public:
23   std::unique_ptr<CJBig2_SymbolDict> decode_Arith(
24       CJBig2_ArithDecoder* pArithDecoder,
25       std::vector<JBig2ArithCtx>* gbContext,
26       std::vector<JBig2ArithCtx>* grContext);
27 
28   std::unique_ptr<CJBig2_SymbolDict> decode_Huffman(
29       CJBig2_BitStream* pStream,
30       std::vector<JBig2ArithCtx>* gbContext,
31       std::vector<JBig2ArithCtx>* grContext);
32 
33   bool SDHUFF;
34   bool SDREFAGG;
35   uint32_t SDNUMINSYMS;
36   CJBig2_Image** SDINSYMS;
37   uint32_t SDNUMNEWSYMS;
38   uint32_t SDNUMEXSYMS;
39   CJBig2_HuffmanTable* SDHUFFDH;
40   CJBig2_HuffmanTable* SDHUFFDW;
41   CJBig2_HuffmanTable* SDHUFFBMSIZE;
42   CJBig2_HuffmanTable* SDHUFFAGGINST;
43   uint8_t SDTEMPLATE;
44   int8_t SDAT[8];
45   bool SDRTEMPLATE;
46   int8_t SDRAT[4];
47 };
48 
49 #endif  // CORE_FXCODEC_JBIG2_JBIG2_SDDPROC_H_
50