| 1026 | } |
| 1027 | |
| 1028 | static int check_combing_results(hb_filter_private_t *pv) |
| 1029 | { |
| 1030 | int combed = HB_COMB_NONE; |
| 1031 | for (int ii = 0; ii < pv->comb_check_nthreads; ii++) |
| 1032 | { |
| 1033 | if (pv->block_score[ii] >= (pv->block_threshold / 2)) |
| 1034 | { |
| 1035 | if (pv->block_score[ii] <= pv->block_threshold) |
| 1036 | { |
| 1037 | // Indicate light combing for block_score that is between |
| 1038 | // ( pv->block_threshold / 2 ) and pv->block_threshold |
| 1039 | combed = HB_COMB_LIGHT; |
| 1040 | } |
| 1041 | else if (pv->block_score[ii] > pv->block_threshold) |
| 1042 | { |
| 1043 | return HB_COMB_HEAVY; |
| 1044 | } |
| 1045 | } |
| 1046 | } |
| 1047 | return combed; |
| 1048 | } |
| 1049 | |
| 1050 | static int comb_segmenter(hb_filter_private_t *pv) |
| 1051 | { |