TCH_PATTERN_COUNT
if (test_pat_idx >= TCH_PATTERN_COUNT)
(f->width / TCH_PATTERN_COUNT));
offset_x = ((TCH_PATTERN_COUNT - 1 - test_pat_idx) * x) /
TCH_PATTERN_COUNT;
offset_y = ((TCH_PATTERN_COUNT - 1 - test_pat_idx) * y) /
TCH_PATTERN_COUNT;
offset_x = (test_pat_idx * x) / TCH_PATTERN_COUNT;
offset_y = (test_pat_idx * y) / TCH_PATTERN_COUNT;