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 #include "core/fxcrt/unowned_ptr.h" 17 18 class CJBig2_ArithDecoder; 19 class CJBig2_BitStream; 20 class JBig2ArithCtx; 21 class PauseIndicatorIface; 22 23 class CJBig2_HTRDProc { 24 public: 25 CJBig2_HTRDProc(); 26 ~CJBig2_HTRDProc(); 27 28 std::unique_ptr<CJBig2_Image> DecodeArith(CJBig2_ArithDecoder* pArithDecoder, 29 JBig2ArithCtx* gbContext, 30 PauseIndicatorIface* pPause); 31 32 std::unique_ptr<CJBig2_Image> DecodeMMR(CJBig2_BitStream* pStream); 33 34 public: 35 uint32_t HBW; 36 uint32_t HBH; 37 bool HMMR; 38 uint8_t HTEMPLATE; 39 uint32_t HNUMPATS; 40 UnownedPtr<const std::vector<std::unique_ptr<CJBig2_Image>>> HPATS; 41 bool HDEFPIXEL; 42 JBig2ComposeOp HCOMBOP; 43 bool HENABLESKIP; 44 uint32_t HGW; 45 uint32_t HGH; 46 int32_t HGX; 47 int32_t HGY; 48 uint16_t HRX; 49 uint16_t HRY; 50 uint8_t HPW; 51 uint8_t HPH; 52 53 private: 54 std::unique_ptr<CJBig2_Image> DecodeImage( 55 const std::vector<std::unique_ptr<CJBig2_Image>>& GSPLANES); 56 }; 57 58 #endif // CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_ 59