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