| 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 // Original code is licensed as follows: | 6 // Original code is licensed as follows: |
| 7 /* | 7 /* |
| 8 * Copyright 2013 ZXing authors | 8 * Copyright 2013 ZXing authors |
| 9 * | 9 * |
| 10 * Licensed under the Apache License, Version 2.0 (the "License"); | 10 * Licensed under the Apache License, Version 2.0 (the "License"); |
| 11 * you may not use this file except in compliance with the License. | 11 * you may not use this file except in compliance with the License. |
| 12 * You may obtain a copy of the License at | 12 * You may obtain a copy of the License at |
| 13 * | 13 * |
| 14 * http://www.apache.org/licenses/LICENSE-2.0 | 14 * http://www.apache.org/licenses/LICENSE-2.0 |
| 15 * | 15 * |
| 16 * Unless required by applicable law or agreed to in writing, software | 16 * Unless required by applicable law or agreed to in writing, software |
| 17 * distributed under the License is distributed on an "AS IS" BASIS, | 17 * distributed under the License is distributed on an "AS IS" BASIS, |
| 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 * See the License for the specific language governing permissions and | 19 * See the License for the specific language governing permissions and |
| 20 * limitations under the License. | 20 * limitations under the License. |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #include "barcode.h" | 23 #include "../barcode.h" |
| 24 #include "include/BC_DecoderResult.h" | 24 #include "../BC_DecoderResult.h" |
| 25 #include "include/BC_ResultPoint.h" | 25 #include "../BC_ResultPoint.h" |
| 26 #include "include/BC_PDF417Codeword.h" | 26 #include "../common/BC_CommonBitMatrix.h" |
| 27 #include "include/BC_CommonBitMatrix.h" | 27 #include "BC_PDF417Codeword.h" |
| 28 #include "include/BC_PDF417Common.h" | 28 #include "BC_PDF417Common.h" |
| 29 #include "include/BC_PDF417BarcodeValue.h" | 29 #include "BC_PDF417BarcodeValue.h" |
| 30 #include "include/BC_PDF417BarcodeMetadata.h" | 30 #include "BC_PDF417BarcodeMetadata.h" |
| 31 #include "include/BC_PDF417BoundingBox.h" | 31 #include "BC_PDF417BoundingBox.h" |
| 32 #include "include/BC_PDF417DetectionResultColumn.h" | 32 #include "BC_PDF417DetectionResultColumn.h" |
| 33 #include "include/BC_PDF417DetectionResultRowIndicatorColumn.h" | 33 #include "BC_PDF417DetectionResultRowIndicatorColumn.h" |
| 34 #include "include/BC_PDF417DetectionResult.h" | 34 #include "BC_PDF417DetectionResult.h" |
| 35 #include "include/BC_PDF417DecodedBitStreamParser.h" | 35 #include "BC_PDF417DecodedBitStreamParser.h" |
| 36 #include "include/BC_PDF417CodewordDecoder.h" | 36 #include "BC_PDF417CodewordDecoder.h" |
| 37 #include "include/BC_PDF417DecodedBitStreamParser.h" | 37 #include "BC_PDF417DecodedBitStreamParser.h" |
| 38 #include "include/BC_PDF417ECModulusPoly.h" | 38 #include "BC_PDF417ECModulusPoly.h" |
| 39 #include "include/BC_PDF417ECModulusGF.h" | 39 #include "BC_PDF417ECModulusGF.h" |
| 40 #include "include/BC_PDF417ECErrorCorrection.h" | 40 #include "BC_PDF417ECErrorCorrection.h" |
| 41 #include "include/BC_PDF417DecodedBitStreamParser.h" | 41 #include "BC_PDF417DecodedBitStreamParser.h" |
| 42 #include "include/BC_PDF417ScanningDecoder.h" | 42 #include "BC_PDF417ScanningDecoder.h" |
| 43 FX_INT32 CBC_PDF417ScanningDecoder::CODEWORD_SKEW_SIZE = 2; | 43 FX_INT32 CBC_PDF417ScanningDecoder::CODEWORD_SKEW_SIZE = 2; |
| 44 FX_INT32 CBC_PDF417ScanningDecoder::MAX_ERRORS = 3; | 44 FX_INT32 CBC_PDF417ScanningDecoder::MAX_ERRORS = 3; |
| 45 FX_INT32 CBC_PDF417ScanningDecoder::MAX_EC_CODEWORDS = 512; | 45 FX_INT32 CBC_PDF417ScanningDecoder::MAX_EC_CODEWORDS = 512; |
| 46 CBC_PDF417ECErrorCorrection* CBC_PDF417ScanningDecoder::errorCorrection = NULL; | 46 CBC_PDF417ECErrorCorrection* CBC_PDF417ScanningDecoder::errorCorrection = NULL; |
| 47 CBC_PDF417ScanningDecoder::CBC_PDF417ScanningDecoder() | 47 CBC_PDF417ScanningDecoder::CBC_PDF417ScanningDecoder() |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 CBC_PDF417ScanningDecoder::~CBC_PDF417ScanningDecoder() | 50 CBC_PDF417ScanningDecoder::~CBC_PDF417ScanningDecoder() |
| 51 { | 51 { |
| 52 } | 52 } |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 { | 587 { |
| 588 CFX_Int32Array* array = getBitCountForCodeword(codeword); | 588 CFX_Int32Array* array = getBitCountForCodeword(codeword); |
| 589 FX_INT32 result = getCodewordBucketNumber(*array); | 589 FX_INT32 result = getCodewordBucketNumber(*array); |
| 590 delete array; | 590 delete array; |
| 591 return result; | 591 return result; |
| 592 } | 592 } |
| 593 FX_INT32 CBC_PDF417ScanningDecoder::getCodewordBucketNumber(CFX_Int32Array& modu
leBitCount) | 593 FX_INT32 CBC_PDF417ScanningDecoder::getCodewordBucketNumber(CFX_Int32Array& modu
leBitCount) |
| 594 { | 594 { |
| 595 return (moduleBitCount.GetAt(0) - moduleBitCount.GetAt(2) + moduleBitCount.G
etAt(4) - moduleBitCount.GetAt(6) + 9) % 9; | 595 return (moduleBitCount.GetAt(0) - moduleBitCount.GetAt(2) + moduleBitCount.G
etAt(4) - moduleBitCount.GetAt(6) + 9) % 9; |
| 596 } | 596 } |
| OLD | NEW |