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

Side by Side Diff: xfa/src/fxbarcode/src/include/BC_PDF417ScanningDecoder.h

Issue 842043002: Organize barcode codes into modules. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 5 years, 11 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
OLDNEW
(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_PDF417SCANNINGDECODER_H_
8 #define _BC_PDF417SCANNINGDECODER_H_
9 class CBC_CommonDecoderResult;
10 class CBC_CommonBitMatrix;
11 class CBC_ErrorCorrection;
12 class CBC_Codeword;
13 class CBC_BoundingBox;
14 class CBC_ResultPoint;
15 class CBC_BarcodeMetadata;
16 class CBC_BarcodeValue;
17 class CBC_DetectionResult;
18 class CBC_DetectionResultRowIndicatorColumn;
19 class CBC_PDF417ScanningDecoder;
20 class CBC_PDF417ScanningDecoder : public CFX_Object
21 {
22 public:
23 CBC_PDF417ScanningDecoder();
24 virtual ~CBC_PDF417ScanningDecoder();
25 static void Initialize();
26 static void Finalize();
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);
29 static CFX_ByteString toString(CFX_PtrArray* barcodeMatrix);
30 private:
31 static FX_INT32 CODEWORD_SKEW_SIZE;
32 static FX_INT32 MAX_ERRORS;
33 static FX_INT32 MAX_EC_CODEWORDS;
34 static CBC_PDF417ECErrorCorrection* errorCorrection;
35 static CBC_DetectionResult* merge(CBC_DetectionResultRowIndicatorColumn* lef tRowIndicatorColumn, CBC_DetectionResultRowIndicatorColumn* rightRowIndicatorCol umn, FX_INT32 &e);
36 static CBC_BoundingBox* adjustBoundingBox(CBC_DetectionResultRowIndicatorCol umn* rowIndicatorColumn, FX_INT32 &e);
37 static FX_INT32 getMax(CFX_Int32Array& values);
38 static CBC_BarcodeMetadata* getBarcodeMetadata(CBC_DetectionResultRowIndicat orColumn* leftRowIndicatorColumn, CBC_DetectionResultRowIndicatorColumn* rightRo wIndicatorColumn);
39 static CBC_DetectionResultRowIndicatorColumn* getRowIndicatorColumn(CBC_Comm onBitMatrix* image, CBC_BoundingBox* boundingBox, CBC_ResultPoint startPoint,
40 FX_BOOL leftToRight, FX_INT32 minCodewordWidth, FX_INT32 maxCodeword Width);
41 static void adjustCodewordCount(CBC_DetectionResult* detectionResult, CFX_Pt rArray* barcodeMatrix, FX_INT32 &e);
42 static CBC_CommonDecoderResult* createDecoderResult(CBC_DetectionResult* det ectionResult, FX_INT32 &e);
43 static CBC_CommonDecoderResult* createDecoderResultFromAmbiguousValues(FX_IN T32 ecLevel, CFX_Int32Array &codewords, CFX_Int32Array &erasureArray, CFX_Int32A rray &ambiguousIndexes,
44 CFX_PtrArray& ambiguousIndexValues, FX_INT32 &e);
45 static CFX_PtrArray* createBarcodeMatrix(CBC_DetectionResult* detectionResul t);
46 static FX_BOOL isValidBarcodeColumn(CBC_DetectionResult* detectionResult, FX _INT32 barcodeColumn);
47 static FX_INT32 getStartColumn(CBC_DetectionResult* detectionResult, FX_INT3 2 barcodeColumn, FX_INT32 imageRow, FX_BOOL leftToRight);
48 static CBC_Codeword* detectCodeword(CBC_CommonBitMatrix* image, FX_INT32 min Column, FX_INT32 maxColumn, FX_BOOL leftToRight, FX_INT32 startColumn,
49 FX_INT32 imageRow, FX_INT32 minCodewordW idth, FX_INT32 maxCodewordWidth);
50 static CFX_Int32Array* getModuleBitCount(CBC_CommonBitMatrix* image, FX_INT3 2 minColumn, FX_INT32 maxColumn, FX_BOOL leftToRight, FX_INT32 startColumn, FX_I NT32 imageRow);
51 static FX_INT32 getNumberOfECCodeWords(FX_INT32 barcodeECLevel);
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);
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);
56 static void verifyCodewordCount(CFX_Int32Array &codewords, FX_INT32 numECCod ewords, FX_INT32 &e);
57 static CFX_Int32Array* getBitCountForCodeword(FX_INT32 codeword);
58 static FX_INT32 getCodewordBucketNumber(FX_INT32 codeword);
59 static FX_INT32 getCodewordBucketNumber(CFX_Int32Array& moduleBitCount);
60 };
61 #endif
OLDNEW
« no previous file with comments | « xfa/src/fxbarcode/src/include/BC_PDF417ResultMetadata.h ('k') | xfa/src/fxbarcode/src/include/BC_PDF417Writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698