OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef _BC_DECODEDBITSTREAMPARSER_H_ | |
8 #define _BC_DECODEDBITSTREAMPARSER_H_ | |
9 class CBC_CommonDecoderResult; | |
10 class CBC_PDF417ResultMetadata; | |
11 class CBC_DecodedBitStreamPaser; | |
12 class CBC_DecodedBitStreamPaser : public CFX_Object | |
13 { | |
14 public: | |
15 CBC_DecodedBitStreamPaser(); | |
16 virtual ~CBC_DecodedBitStreamPaser(); | |
17 static void Initialize(); | |
18 static void Finalize(); | |
19 static CBC_CommonDecoderResult* decode(CFX_Int32Array &codewords, CFX_ByteSt
ring ecLevel, FX_INT32 &e); | |
20 | |
21 private: | |
22 enum Mode { | |
23 ALPHA, | |
24 LOWER, | |
25 MIXED, | |
26 PUNCT, | |
27 ALPHA_SHIFT, | |
28 PUNCT_SHIFT | |
29 }; | |
30 static FX_INT32 MAX_NUMERIC_CODEWORDS; | |
31 static FX_INT32 PL; | |
32 static FX_INT32 LL; | |
33 static FX_INT32 AS; | |
34 static FX_INT32 ML; | |
35 static FX_INT32 AL; | |
36 static FX_INT32 PS; | |
37 static FX_INT32 PAL; | |
38 static FX_CHAR PUNCT_CHARS[29]; | |
39 static FX_CHAR MIXED_CHARS[30]; | |
40 static FX_INT32 NUMBER_OF_SEQUENCE_CODEWORDS; | |
41 static FX_INT32 decodeMacroBlock(CFX_Int32Array &codewords, FX_INT32 codeInd
ex, CBC_PDF417ResultMetadata* resultMetadata, FX_INT32 &e); | |
42 static FX_INT32 textCompaction(CFX_Int32Array &codewords, FX_INT32 codeIndex
, CFX_ByteString &result); | |
43 static void decodeTextCompaction(CFX_Int32Array &textCompactionData, CFX_Int
32Array &byteCompactionData, FX_INT32 length, CFX_ByteString &result); | |
44 static FX_INT32 byteCompaction(FX_INT32 mode, CFX_Int32Array &codewords, FX_
INT32 codeIndex, CFX_ByteString &result); | |
45 static FX_INT32 numericCompaction(CFX_Int32Array &codewords, FX_INT32 codeIn
dex, CFX_ByteString &result, FX_INT32 &e); | |
46 static CFX_ByteString decodeBase900toBase10(CFX_Int32Array &codewords, FX_IN
T32 count, FX_INT32 &e); | |
47 }; | |
48 #endif | |
OLD | NEW |