Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp

Issue 1390883004: Merge to XFA: Stop inlining CJBig2_BitStream. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "JBig2_HuffmanTable.h" 7 #include "JBig2_HuffmanTable.h"
8 8
9 #include <string.h> 9 #include <string.h>
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "../../../include/fxcrt/fx_memory.h" 13 #include "../../../include/fxcrt/fx_memory.h"
14 #include "JBig2_BitStream.h" 14 #include "JBig2_BitStream.h"
15 #include "JBig2_Define.h"
15 16
16 CJBig2_HuffmanTable::CJBig2_HuffmanTable(const JBig2TableLine* pTable, 17 CJBig2_HuffmanTable::CJBig2_HuffmanTable(const JBig2TableLine* pTable,
17 int nLines, 18 int nLines,
18 FX_BOOL bHTOOB) { 19 FX_BOOL bHTOOB) {
19 init(); 20 init();
20 m_bOK = parseFromStandardTable(pTable, nLines, bHTOOB); 21 m_bOK = parseFromStandardTable(pTable, nLines, bHTOOB);
21 } 22 }
22 23
23 CJBig2_HuffmanTable::CJBig2_HuffmanTable(CJBig2_BitStream* pStream) { 24 CJBig2_HuffmanTable::CJBig2_HuffmanTable(CJBig2_BitStream* pStream) {
24 init(); 25 init();
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 for (int i = 0; i <= LENMAX; ++i) { 163 for (int i = 0; i <= LENMAX; ++i) {
163 FIRSTCODE[i] = (FIRSTCODE[i - 1] + LENCOUNT[i - 1]) << 1; 164 FIRSTCODE[i] = (FIRSTCODE[i - 1] + LENCOUNT[i - 1]) << 1;
164 int CURCODE = FIRSTCODE[i]; 165 int CURCODE = FIRSTCODE[i];
165 for (int j = 0; j < NTEMP; ++j) { 166 for (int j = 0; j < NTEMP; ++j) {
166 if (PREFLEN[j] == i) 167 if (PREFLEN[j] == i)
167 CODES[j] = CURCODE++; 168 CODES[j] = CURCODE++;
168 } 169 }
169 } 170 }
170 return TRUE; 171 return TRUE;
171 } 172 }
OLDNEW
« no previous file with comments | « core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698