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