OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_Context.h" | 7 #include "core/fxcodec/jbig2/JBig2_Context.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
| 14 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" |
| 15 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" |
14 #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h" | 16 #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h" |
15 #include "core/fxcodec/jbig2/JBig2_BitStream.h" | 17 #include "core/fxcodec/jbig2/JBig2_BitStream.h" |
16 #include "core/fxcodec/jbig2/JBig2_GrdProc.h" | 18 #include "core/fxcodec/jbig2/JBig2_GrdProc.h" |
17 #include "core/fxcodec/jbig2/JBig2_GrrdProc.h" | 19 #include "core/fxcodec/jbig2/JBig2_GrrdProc.h" |
18 #include "core/fxcodec/jbig2/JBig2_HtrdProc.h" | 20 #include "core/fxcodec/jbig2/JBig2_HtrdProc.h" |
19 #include "core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h" | 21 #include "core/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h" |
20 #include "core/fxcodec/jbig2/JBig2_PddProc.h" | 22 #include "core/fxcodec/jbig2/JBig2_PddProc.h" |
21 #include "core/fxcodec/jbig2/JBig2_SddProc.h" | 23 #include "core/fxcodec/jbig2/JBig2_SddProc.h" |
22 #include "core/fxcodec/jbig2/JBig2_TrdProc.h" | 24 #include "core/fxcodec/jbig2/JBig2_TrdProc.h" |
23 #include "core/include/fpdfapi/cpdf_stream.h" | |
24 #include "core/include/fpdfapi/cpdf_stream_acc.h" | |
25 #include "third_party/base/stl_util.h" | 25 #include "third_party/base/stl_util.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 size_t GetHuffContextSize(uint8_t val) { | 29 size_t GetHuffContextSize(uint8_t val) { |
30 return val == 0 ? 65536 : val == 1 ? 8192 : 1024; | 30 return val == 0 ? 65536 : val == 1 ? 8192 : 1024; |
31 } | 31 } |
32 | 32 |
33 size_t GetRefAggContextSize(FX_BOOL val) { | 33 size_t GetRefAggContextSize(FX_BOOL val) { |
34 return val ? 1024 : 8192; | 34 return val ? 1024 : 8192; |
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 SBSYMCODES[CURTEMP].code = CURCODE; | 1431 SBSYMCODES[CURTEMP].code = CURCODE; |
1432 CURCODE = CURCODE + 1; | 1432 CURCODE = CURCODE + 1; |
1433 } | 1433 } |
1434 CURTEMP = CURTEMP + 1; | 1434 CURTEMP = CURTEMP + 1; |
1435 } | 1435 } |
1436 CURLEN = CURLEN + 1; | 1436 CURLEN = CURLEN + 1; |
1437 } | 1437 } |
1438 FX_Free(LENCOUNT); | 1438 FX_Free(LENCOUNT); |
1439 FX_Free(FIRSTCODE); | 1439 FX_Free(FIRSTCODE); |
1440 } | 1440 } |
OLD | NEW |