| 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_SddProc.h" | 7 #include "core/src/fxcodec/jbig2/JBig2_SddProc.h" |
| 8 | 8 |
| 9 #include "JBig2_ArithIntDecoder.h" | 9 #include <vector> |
| 10 #include "JBig2_GrdProc.h" | 10 |
| 11 #include "JBig2_GrrdProc.h" | |
| 12 #include "JBig2_HuffmanDecoder.h" | |
| 13 #include "JBig2_HuffmanTable.h" | |
| 14 #include "JBig2_SymbolDict.h" | |
| 15 #include "JBig2_TrdProc.h" | |
| 16 #include "core/include/fxcrt/fx_basic.h" | 11 #include "core/include/fxcrt/fx_basic.h" |
| 12 #include "core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h" |
| 13 #include "core/src/fxcodec/jbig2/JBig2_GrdProc.h" |
| 14 #include "core/src/fxcodec/jbig2/JBig2_GrrdProc.h" |
| 15 #include "core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.h" |
| 16 #include "core/src/fxcodec/jbig2/JBig2_HuffmanTable.h" |
| 17 #include "core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h" |
| 18 #include "core/src/fxcodec/jbig2/JBig2_SymbolDict.h" |
| 19 #include "core/src/fxcodec/jbig2/JBig2_TrdProc.h" |
| 17 #include "third_party/base/nonstd_unique_ptr.h" | 20 #include "third_party/base/nonstd_unique_ptr.h" |
| 18 #include "third_party/base/stl_util.h" | 21 #include "third_party/base/stl_util.h" |
| 19 | 22 |
| 20 using pdfium::vector_as_array; | 23 using pdfium::vector_as_array; |
| 21 | 24 |
| 22 CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith( | 25 CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith( |
| 23 CJBig2_ArithDecoder* pArithDecoder, | 26 CJBig2_ArithDecoder* pArithDecoder, |
| 24 std::vector<JBig2ArithCtx>* gbContext, | 27 std::vector<JBig2ArithCtx>* gbContext, |
| 25 std::vector<JBig2ArithCtx>* grContext) { | 28 std::vector<JBig2ArithCtx>* grContext) { |
| 26 CJBig2_Image** SDNEWSYMS; | 29 CJBig2_Image** SDNEWSYMS; |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 failed: | 625 failed: |
| 623 for (I = 0; I < NSYMSDECODED; I++) { | 626 for (I = 0; I < NSYMSDECODED; I++) { |
| 624 delete SDNEWSYMS[I]; | 627 delete SDNEWSYMS[I]; |
| 625 } | 628 } |
| 626 FX_Free(SDNEWSYMS); | 629 FX_Free(SDNEWSYMS); |
| 627 if (SDREFAGG == 0) { | 630 if (SDREFAGG == 0) { |
| 628 FX_Free(SDNEWSYMWIDTHS); | 631 FX_Free(SDNEWSYMWIDTHS); |
| 629 } | 632 } |
| 630 return nullptr; | 633 return nullptr; |
| 631 } | 634 } |
| OLD | NEW |