| 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_GsidProc.h" | 7 #include "JBig2_GsidProc.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_BitStream.h" | 10 #include "JBig2_BitStream.h" |
| 12 #include "JBig2_GrdProc.h" | 11 #include "JBig2_GrdProc.h" |
| 13 #include "JBig2_Image.h" | 12 #include "JBig2_Image.h" |
| 14 #include "JBig2_List.h" | 13 #include "JBig2_List.h" |
| 14 #include "third_party/base/nonstd_unique_ptr.h" |
| 15 | 15 |
| 16 FX_DWORD* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder, | 16 FX_DWORD* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder, |
| 17 JBig2ArithCtx* gbContext, | 17 JBig2ArithCtx* gbContext, |
| 18 IFX_Pause* pPause) { | 18 IFX_Pause* pPause) { |
| 19 nonstd::unique_ptr<CJBig2_GRDProc> pGRD(new CJBig2_GRDProc()); | 19 nonstd::unique_ptr<CJBig2_GRDProc> pGRD(new CJBig2_GRDProc()); |
| 20 pGRD->MMR = GSMMR; | 20 pGRD->MMR = GSMMR; |
| 21 pGRD->GBW = GSW; | 21 pGRD->GBW = GSW; |
| 22 pGRD->GBH = GSH; | 22 pGRD->GBH = GSH; |
| 23 pGRD->GBTEMPLATE = GSTEMPLATE; | 23 pGRD->GBTEMPLATE = GSTEMPLATE; |
| 24 pGRD->TPGDON = 0; | 24 pGRD->TPGDON = 0; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 for (J = 0; J < GSBPP; ++J) { | 113 for (J = 0; J < GSBPP; ++J) { |
| 114 GSVALS.get()[y * GSW + x] |= GSPLANES.get()[J]->getPixel(x, y) << J; | 114 GSVALS.get()[y * GSW + x] |= GSPLANES.get()[J]->getPixel(x, y) << J; |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 for (J = 0; J < GSBPP; ++J) { | 118 for (J = 0; J < GSBPP; ++J) { |
| 119 delete GSPLANES.get()[J]; | 119 delete GSPLANES.get()[J]; |
| 120 } | 120 } |
| 121 return GSVALS.release(); | 121 return GSVALS.release(); |
| 122 } | 122 } |
| OLD | NEW |