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

Side by Side Diff: xfa/fxbarcode/pdf417/BC_PDF417Detector.h

Issue 1936733002: Replace CFX_PtrArray with typesafe CFX_ArrayTemplate, part 10 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits Created 4 years, 7 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 | « xfa/fxbarcode/BC_ResultPoint.h ('k') | xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp » ('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 #ifndef XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ 7 #ifndef XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_
8 #define XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ 8 #define XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_
9 9
10 class CBC_PDF417DetectorResult; 10 #include "xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.h"
11
11 class CBC_BinaryBitmap; 12 class CBC_BinaryBitmap;
12 class CBC_CommonBitMatrix; 13 class CBC_CommonBitMatrix;
13 class CBC_CommonBitArray; 14 class CBC_CommonBitArray;
14 15
15 class CBC_Detector { 16 class CBC_Detector {
16 public: 17 public:
17 CBC_Detector(); 18 CBC_Detector();
18 virtual ~CBC_Detector(); 19 virtual ~CBC_Detector();
19 static CBC_PDF417DetectorResult* detect(CBC_BinaryBitmap* image, 20 static CBC_PDF417DetectorResult* detect(CBC_BinaryBitmap* image,
20 int32_t hints, 21 int32_t hints,
(...skipping 10 matching lines...) Expand all
31 static int32_t PATTERN_MATCH_RESULT_SCALE_FACTOR; 32 static int32_t PATTERN_MATCH_RESULT_SCALE_FACTOR;
32 static int32_t MAX_AVG_VARIANCE; 33 static int32_t MAX_AVG_VARIANCE;
33 static int32_t MAX_INDIVIDUAL_VARIANCE; 34 static int32_t MAX_INDIVIDUAL_VARIANCE;
34 static int32_t START_PATTERN[]; 35 static int32_t START_PATTERN[];
35 static int32_t STOP_PATTERN[]; 36 static int32_t STOP_PATTERN[];
36 static int32_t MAX_PIXEL_DRIFT; 37 static int32_t MAX_PIXEL_DRIFT;
37 static int32_t MAX_PATTERN_DRIFT; 38 static int32_t MAX_PATTERN_DRIFT;
38 static int32_t SKIPPED_ROW_COUNT_MAX; 39 static int32_t SKIPPED_ROW_COUNT_MAX;
39 static int32_t ROW_STEP; 40 static int32_t ROW_STEP;
40 static int32_t BARCODE_MIN_HEIGHT; 41 static int32_t BARCODE_MIN_HEIGHT;
41 static CFX_PtrArray* detect(FX_BOOL multiple, CBC_CommonBitMatrix* bitMatrix); 42 static CBC_ResultPointArrayArray* detect(FX_BOOL multiple,
42 static CFX_PtrArray* findVertices(CBC_CommonBitMatrix* matrix, 43 CBC_CommonBitMatrix* bitMatrix);
43 int32_t startRow, 44 static CBC_ResultPointArray* findVertices(CBC_CommonBitMatrix* matrix,
44 int32_t startColumn); 45 int32_t startRow,
45 static void copyToResult(CFX_PtrArray* result, 46 int32_t startColumn);
46 CFX_PtrArray* tmpResult, 47 static void copyToResult(CBC_ResultPointArray* result,
48 CBC_ResultPointArray* tmpResult,
47 int32_t* destinationIndexes, 49 int32_t* destinationIndexes,
48 int32_t destinationLength); 50 int32_t destinationLength);
49 static CFX_PtrArray* findRowsWithPattern(CBC_CommonBitMatrix* matrix, 51 static CBC_ResultPointArray* findRowsWithPattern(CBC_CommonBitMatrix* matrix,
50 int32_t height, 52 int32_t height,
51 int32_t width, 53 int32_t width,
52 int32_t startRow, 54 int32_t startRow,
53 int32_t startColumn, 55 int32_t startColumn,
54 int32_t* pattern, 56 int32_t* pattern,
55 int32_t patternLength); 57 int32_t patternLength);
56 static CFX_Int32Array* findGuardPattern(CBC_CommonBitMatrix* matrix, 58 static CFX_Int32Array* findGuardPattern(CBC_CommonBitMatrix* matrix,
57 int32_t column, 59 int32_t column,
58 int32_t row, 60 int32_t row,
59 int32_t width, 61 int32_t width,
60 FX_BOOL whiteFirst, 62 FX_BOOL whiteFirst,
61 int32_t* pattern, 63 int32_t* pattern,
62 int32_t patternLength, 64 int32_t patternLength,
63 CFX_Int32Array& counters); 65 CFX_Int32Array& counters);
64 static int32_t patternMatchVariance(CFX_Int32Array& counters, 66 static int32_t patternMatchVariance(CFX_Int32Array& counters,
65 int32_t* pattern, 67 int32_t* pattern,
66 int32_t maxIndividualVariance); 68 int32_t maxIndividualVariance);
67 }; 69 };
68 70
69 #endif // XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ 71 #endif // XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_
OLDNEW
« no previous file with comments | « xfa/fxbarcode/BC_ResultPoint.h ('k') | xfa/fxbarcode/pdf417/BC_PDF417Detector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698