Lines Matching refs:stateCount
89 CFX_Int32Array stateCount; in Find() local
90 stateCount.SetSize(5); in Find()
92 stateCount[0] = 0; in Find()
93 stateCount[1] = 0; in Find()
94 stateCount[2] = 0; in Find()
95 stateCount[3] = 0; in Find()
96 stateCount[4] = 0; in Find()
103 stateCount[currentState]++; in Find()
107 if (FoundPatternCross(stateCount)) { in Find()
108 FX_BOOL confirmed = HandlePossibleCenter(stateCount, i, j); in Find()
115 if (rowSkip > stateCount[2]) { in Find()
116 i += rowSkip - stateCount[2] - iSkip; in Find()
127 stateCount[0] = 0; in Find()
128 stateCount[1] = 0; in Find()
129 stateCount[2] = 0; in Find()
130 stateCount[3] = 0; in Find()
131 stateCount[4] = 0; in Find()
133 stateCount[0] = stateCount[2]; in Find()
134 stateCount[1] = stateCount[3]; in Find()
135 stateCount[2] = stateCount[4]; in Find()
136 stateCount[3] = 1; in Find()
137 stateCount[4] = 0; in Find()
141 stateCount[++currentState]++; in Find()
144 stateCount[currentState]++; in Find()
148 if (FoundPatternCross(stateCount)) { in Find()
149 FX_BOOL confirmed = HandlePossibleCenter(stateCount, i, maxJ); in Find()
151 iSkip = stateCount[0]; in Find()
204 const CFX_Int32Array& stateCount, in CenterFromEnd() argument
206 return (FX_FLOAT)(end - stateCount[4] - stateCount[3]) - stateCount[2] / 2.0f; in CenterFromEnd()
209 const CFX_Int32Array& stateCount) { in FoundPatternCross() argument
212 int32_t count = stateCount[i]; in FoundPatternCross()
223 return FXSYS_abs(moduleSize - (stateCount[0] << INTEGER_MATH_SHIFT)) < in FoundPatternCross()
225 FXSYS_abs(moduleSize - (stateCount[1] << INTEGER_MATH_SHIFT)) < in FoundPatternCross()
227 FXSYS_abs(3 * moduleSize - (stateCount[2] << INTEGER_MATH_SHIFT)) < in FoundPatternCross()
229 FXSYS_abs(moduleSize - (stateCount[3] << INTEGER_MATH_SHIFT)) < in FoundPatternCross()
231 FXSYS_abs(moduleSize - (stateCount[4] << INTEGER_MATH_SHIFT)) < in FoundPatternCross()
241 CFX_Int32Array& stateCount = GetCrossCheckStateCount(); in CrossCheckVertical() local
244 stateCount[2]++; in CrossCheckVertical()
250 while (i >= 0 && !image->Get(centerJ, i) && stateCount[1] <= maxCount) { in CrossCheckVertical()
251 stateCount[1]++; in CrossCheckVertical()
254 if (i < 0 || stateCount[1] > maxCount) { in CrossCheckVertical()
257 while (i >= 0 && image->Get(centerJ, i) && stateCount[0] <= maxCount) { in CrossCheckVertical()
258 stateCount[0]++; in CrossCheckVertical()
261 if (stateCount[0] > maxCount) { in CrossCheckVertical()
266 stateCount[2]++; in CrossCheckVertical()
272 while (i < maxI && !image->Get(centerJ, i) && stateCount[3] < maxCount) { in CrossCheckVertical()
273 stateCount[3]++; in CrossCheckVertical()
276 if (i == maxI || stateCount[3] >= maxCount) { in CrossCheckVertical()
279 while (i < maxI && image->Get(centerJ, i) && stateCount[4] < maxCount) { in CrossCheckVertical()
280 stateCount[4]++; in CrossCheckVertical()
283 if (stateCount[4] >= maxCount) { in CrossCheckVertical()
286 int32_t stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + in CrossCheckVertical()
287 stateCount[3] + stateCount[4]; in CrossCheckVertical()
292 return FoundPatternCross(stateCount) ? CenterFromEnd(stateCount, i) in CrossCheckVertical()
302 CFX_Int32Array& stateCount = GetCrossCheckStateCount(); in CrossCheckHorizontal() local
305 stateCount[2]++; in CrossCheckHorizontal()
311 while (j >= 0 && !image->Get(j, centerI) && stateCount[1] <= maxCount) { in CrossCheckHorizontal()
312 stateCount[1]++; in CrossCheckHorizontal()
315 if (j < 0 || stateCount[1] > maxCount) { in CrossCheckHorizontal()
318 while (j >= 0 && image->Get(j, centerI) && stateCount[0] <= maxCount) { in CrossCheckHorizontal()
319 stateCount[0]++; in CrossCheckHorizontal()
322 if (stateCount[0] > maxCount) { in CrossCheckHorizontal()
327 stateCount[2]++; in CrossCheckHorizontal()
333 while (j < maxJ && !image->Get(j, centerI) && stateCount[3] < maxCount) { in CrossCheckHorizontal()
334 stateCount[3]++; in CrossCheckHorizontal()
337 if (j == maxJ || stateCount[3] >= maxCount) { in CrossCheckHorizontal()
340 while (j < maxJ && image->Get(j, centerI) && stateCount[4] < maxCount) { in CrossCheckHorizontal()
341 stateCount[4]++; in CrossCheckHorizontal()
344 if (stateCount[4] >= maxCount) { in CrossCheckHorizontal()
347 int32_t stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + in CrossCheckHorizontal()
348 stateCount[3] + stateCount[4]; in CrossCheckHorizontal()
353 return FoundPatternCross(stateCount) ? CenterFromEnd(stateCount, j) in CrossCheckHorizontal()
357 const CFX_Int32Array& stateCount, in HandlePossibleCenter() argument
360 int32_t stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + in HandlePossibleCenter()
361 stateCount[3] + stateCount[4]; in HandlePossibleCenter()
362 FX_FLOAT centerJ = CenterFromEnd(stateCount, j); in HandlePossibleCenter()
364 CrossCheckVertical(i, (int32_t)centerJ, stateCount[2], stateCountTotal); in HandlePossibleCenter()
367 stateCount[2], stateCountTotal); in HandlePossibleCenter()