| OLD | NEW |
| 1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "core/fxcodec/jbig2/JBig2_HtrdProc.h" | 7 #include "core/fxcodec/jbig2/JBig2_HtrdProc.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "core/fxcodec/jbig2/JBig2_GsidProc.h" | 11 #include "core/fxcodec/jbig2/JBig2_GsidProc.h" |
| 12 #include "core/fxcrt/include/fx_basic.h" | 12 #include "core/fxcrt/fx_basic.h" |
| 13 | 13 |
| 14 CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder, | 14 CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder, |
| 15 JBig2ArithCtx* gbContext, | 15 JBig2ArithCtx* gbContext, |
| 16 IFX_Pause* pPause) { | 16 IFX_Pause* pPause) { |
| 17 uint32_t ng, mg; | 17 uint32_t ng, mg; |
| 18 int32_t x, y; | 18 int32_t x, y; |
| 19 uint32_t HBPP; | 19 uint32_t HBPP; |
| 20 uint32_t* GI; | 20 uint32_t* GI; |
| 21 std::unique_ptr<CJBig2_Image> HSKIP; | 21 std::unique_ptr<CJBig2_Image> HSKIP; |
| 22 std::unique_ptr<CJBig2_Image> HTREG(new CJBig2_Image(HBW, HBH)); | 22 std::unique_ptr<CJBig2_Image> HTREG(new CJBig2_Image(HBW, HBH)); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 uint32_t pat_index = GI[mg * HGW + ng]; | 95 uint32_t pat_index = GI[mg * HGW + ng]; |
| 96 if (pat_index >= HNUMPATS) { | 96 if (pat_index >= HNUMPATS) { |
| 97 pat_index = HNUMPATS - 1; | 97 pat_index = HNUMPATS - 1; |
| 98 } | 98 } |
| 99 HTREG->composeFrom(x, y, HPATS[pat_index], HCOMBOP); | 99 HTREG->composeFrom(x, y, HPATS[pat_index], HCOMBOP); |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 FX_Free(GI); | 102 FX_Free(GI); |
| 103 return HTREG.release(); | 103 return HTREG.release(); |
| 104 } | 104 } |
| OLD | NEW |