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

Side by Side Diff: core/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp

Issue 1800523005: Move core/src/ up to core/. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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/fxcodec/jbig2/JBig2_HuffmanDecoder.h ('k') | core/fxcodec/jbig2/JBig2_HuffmanTable.h » ('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 "core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.h" 7 #include "core/fxcodec/jbig2/JBig2_HuffmanDecoder.h"
8 8
9 #include "core/src/fxcodec/jbig2/JBig2_Define.h" 9 #include "core/fxcodec/jbig2/JBig2_Define.h"
10 10
11 CJBig2_HuffmanDecoder::CJBig2_HuffmanDecoder(CJBig2_BitStream* pStream) 11 CJBig2_HuffmanDecoder::CJBig2_HuffmanDecoder(CJBig2_BitStream* pStream)
12 : m_pStream(pStream) { 12 : m_pStream(pStream) {}
13 }
14 13
15 CJBig2_HuffmanDecoder::~CJBig2_HuffmanDecoder() {} 14 CJBig2_HuffmanDecoder::~CJBig2_HuffmanDecoder() {}
16 15
17 int CJBig2_HuffmanDecoder::decodeAValue(CJBig2_HuffmanTable* pTable, 16 int CJBig2_HuffmanDecoder::decodeAValue(CJBig2_HuffmanTable* pTable,
18 int* nResult) { 17 int* nResult) {
19 int nVal = 0; 18 int nVal = 0;
20 int nBits = 0; 19 int nBits = 0;
21 while (1) { 20 while (1) {
22 FX_DWORD nTmp; 21 FX_DWORD nTmp;
23 if (m_pStream->read1Bit(&nTmp) == -1) 22 if (m_pStream->read1Bit(&nTmp) == -1)
(...skipping 13 matching lines...) Expand all
37 if (i == pTable->Size() - offset) 36 if (i == pTable->Size() - offset)
38 *nResult = pTable->GetRANGELOW()[i] - nTmp; 37 *nResult = pTable->GetRANGELOW()[i] - nTmp;
39 else 38 else
40 *nResult = pTable->GetRANGELOW()[i] + nTmp; 39 *nResult = pTable->GetRANGELOW()[i] + nTmp;
41 return 0; 40 return 0;
42 } 41 }
43 } 42 }
44 } 43 }
45 return -1; 44 return -1;
46 } 45 }
OLDNEW
« no previous file with comments | « core/fxcodec/jbig2/JBig2_HuffmanDecoder.h ('k') | core/fxcodec/jbig2/JBig2_HuffmanTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698