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