| 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 #ifndef _BC_PDF417SCANNINGDECODER_H_ | 7 #ifndef _BC_PDF417SCANNINGDECODER_H_ |
| 8 #define _BC_PDF417SCANNINGDECODER_H_ | 8 #define _BC_PDF417SCANNINGDECODER_H_ |
| 9 class CBC_CommonDecoderResult; | 9 class CBC_CommonDecoderResult; |
| 10 class CBC_CommonBitMatrix; | 10 class CBC_CommonBitMatrix; |
| 11 class CBC_ErrorCorrection; | 11 class CBC_ErrorCorrection; |
| 12 class CBC_Codeword; | 12 class CBC_Codeword; |
| 13 class CBC_BoundingBox; | 13 class CBC_BoundingBox; |
| 14 class CBC_ResultPoint; | 14 class CBC_ResultPoint; |
| 15 class CBC_BarcodeMetadata; | 15 class CBC_BarcodeMetadata; |
| 16 class CBC_BarcodeValue; | 16 class CBC_BarcodeValue; |
| 17 class CBC_DetectionResult; | 17 class CBC_DetectionResult; |
| 18 class CBC_DetectionResultRowIndicatorColumn; | 18 class CBC_DetectionResultRowIndicatorColumn; |
| 19 class CBC_PDF417ScanningDecoder; | 19 |
| 20 class CBC_PDF417ScanningDecoder : public CFX_Object | 20 class CBC_PDF417ScanningDecoder |
| 21 { | 21 { |
| 22 public: | 22 public: |
| 23 CBC_PDF417ScanningDecoder(); | 23 CBC_PDF417ScanningDecoder(); |
| 24 virtual ~CBC_PDF417ScanningDecoder(); | 24 virtual ~CBC_PDF417ScanningDecoder(); |
| 25 static void Initialize(); | 25 static void Initialize(); |
| 26 static void Finalize(); | 26 static void Finalize(); |
| 27 static CBC_CommonDecoderResult* decode(CBC_CommonBitMatrix* image, CBC_Resul
tPoint* imageTopLeft, CBC_ResultPoint* imageBottomLeft, CBC_ResultPoint* imageTo
pRight, | 27 static CBC_CommonDecoderResult* decode(CBC_CommonBitMatrix* image, CBC_Resul
tPoint* imageTopLeft, CBC_ResultPoint* imageBottomLeft, CBC_ResultPoint* imageTo
pRight, |
| 28 CBC_ResultPoint* imageBottomRight, FX
_INT32 minCodewordWidth, FX_INT32 maxCodewordWidth, FX_INT32 &e); | 28 CBC_ResultPoint* imageBottomRight, FX
_INT32 minCodewordWidth, FX_INT32 maxCodewordWidth, FX_INT32 &e); |
| 29 static CFX_ByteString toString(CFX_PtrArray* barcodeMatrix); | 29 static CFX_ByteString toString(CFX_PtrArray* barcodeMatrix); |
| 30 private: | 30 private: |
| (...skipping 21 matching lines...) Expand all Loading... |
| 52 static FX_INT32 adjustCodewordStartColumn(CBC_CommonBitMatrix* image, FX_INT
32 minColumn, FX_INT32 maxColumn, FX_BOOL leftToRight, FX_INT32 codewordStartCol
umn, FX_INT32 imageRow); | 52 static FX_INT32 adjustCodewordStartColumn(CBC_CommonBitMatrix* image, FX_INT
32 minColumn, FX_INT32 maxColumn, FX_BOOL leftToRight, FX_INT32 codewordStartCol
umn, FX_INT32 imageRow); |
| 53 static FX_BOOL checkCodewordSkew(FX_INT32 codewordSize, FX_INT32 minCodeword
Width, FX_INT32 maxCodewordWidth); | 53 static FX_BOOL checkCodewordSkew(FX_INT32 codewordSize, FX_INT32 minCodeword
Width, FX_INT32 maxCodewordWidth); |
| 54 static CBC_CommonDecoderResult* decodeCodewords(CFX_Int32Array &codewords, F
X_INT32 ecLevel, CFX_Int32Array &erasures, FX_INT32 &e); | 54 static CBC_CommonDecoderResult* decodeCodewords(CFX_Int32Array &codewords, F
X_INT32 ecLevel, CFX_Int32Array &erasures, FX_INT32 &e); |
| 55 static FX_INT32 correctErrors(CFX_Int32Array &codewords, CFX_Int32Array &era
sures, FX_INT32 numECCodewords, FX_INT32 &e); | 55 static FX_INT32 correctErrors(CFX_Int32Array &codewords, CFX_Int32Array &era
sures, FX_INT32 numECCodewords, FX_INT32 &e); |
| 56 static void verifyCodewordCount(CFX_Int32Array &codewords, FX_INT32 numECCod
ewords, FX_INT32 &e); | 56 static void verifyCodewordCount(CFX_Int32Array &codewords, FX_INT32 numECCod
ewords, FX_INT32 &e); |
| 57 static CFX_Int32Array* getBitCountForCodeword(FX_INT32 codeword); | 57 static CFX_Int32Array* getBitCountForCodeword(FX_INT32 codeword); |
| 58 static FX_INT32 getCodewordBucketNumber(FX_INT32 codeword); | 58 static FX_INT32 getCodewordBucketNumber(FX_INT32 codeword); |
| 59 static FX_INT32 getCodewordBucketNumber(CFX_Int32Array& moduleBitCount); | 59 static FX_INT32 getCodewordBucketNumber(CFX_Int32Array& moduleBitCount); |
| 60 }; | 60 }; |
| 61 #endif | 61 #endif |
| OLD | NEW |