• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The PDFium Authors
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_HTRDPROC_H_
8 #define CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_
9 
10 #include <stdint.h>
11 
12 #include <memory>
13 #include <vector>
14 
15 #include "core/fxcodec/jbig2/JBig2_Image.h"
16 
17 class CJBig2_ArithDecoder;
18 class CJBig2_BitStream;
19 class JBig2ArithCtx;
20 class PauseIndicatorIface;
21 
22 class CJBig2_HTRDProc {
23  public:
24   std::unique_ptr<CJBig2_Image> DecodeArith(CJBig2_ArithDecoder* pArithDecoder,
25                                             JBig2ArithCtx* gbContext,
26                                             PauseIndicatorIface* pPause);
27 
28   std::unique_ptr<CJBig2_Image> DecodeMMR(CJBig2_BitStream* pStream);
29 
30  public:
31   uint32_t HBW;
32   uint32_t HBH;
33   bool HMMR;
34   uint8_t HTEMPLATE;
35   uint32_t HNUMPATS;
36   const std::vector<std::unique_ptr<CJBig2_Image>>* HPATS;
37   bool HDEFPIXEL;
38   JBig2ComposeOp HCOMBOP;
39   bool HENABLESKIP;
40   uint32_t HGW;
41   uint32_t HGH;
42   int32_t HGX;
43   int32_t HGY;
44   uint16_t HRX;
45   uint16_t HRY;
46   uint8_t HPW;
47   uint8_t HPH;
48 
49  private:
50   std::unique_ptr<CJBig2_Image> DecodeImage(
51       const std::vector<std::unique_ptr<CJBig2_Image>>& GSPLANES);
52 };
53 
54 #endif  // CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_
55