diff options
Diffstat (limited to 'src/coord.c')
| -rw-r--r-- | src/coord.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/coord.c b/src/coord.c index 7e691ef..059a7a2 100644 --- a/src/coord.c +++ b/src/coord.c | |||
| @@ -171,7 +171,7 @@ antindex_eofbepos(uint64_t ind) | |||
| 171 | 171 | ||
| 172 | /* We need eorl for sym16 coordinate */ | 172 | /* We need eorl for sym16 coordinate */ |
| 173 | static int initialized = false; | 173 | static int initialized = false; |
| 174 | static uint64_t eorl_aux[POW2TO11][BINOM12ON4]; | 174 | static uint64_t eorl_a[POW2TO11][BINOM12ON4]; |
| 175 | static int eo_aux[12], ep_aux[12]; | 175 | static int eo_aux[12], ep_aux[12]; |
| 176 | unsigned int i, j, k; | 176 | unsigned int i, j, k; |
| 177 | 177 | ||
| @@ -181,8 +181,10 @@ antindex_eofbepos(uint64_t ind) | |||
| 181 | int_to_sum_zero_array(i, 2, 12, eo_aux); | 181 | int_to_sum_zero_array(i, 2, 12, eo_aux); |
| 182 | index_to_subset(j, 12, 4, ep_aux); | 182 | index_to_subset(j, 12, 4, ep_aux); |
| 183 | for (k = 0; k < 12; k++) | 183 | for (k = 0; k < 12; k++) |
| 184 | if (ep_aux[k]) | 184 | if ((ep_aux[k] && k < FR) || |
| 185 | (!ep_aux[k] && k >= FR)) | ||
| 185 | eo_aux[k] = 1 - eo_aux[k]; | 186 | eo_aux[k] = 1 - eo_aux[k]; |
| 187 | eorl_a[i][j] = digit_array_to_int(eo_aux,11,2); | ||
| 186 | } | 188 | } |
| 187 | } | 189 | } |
| 188 | 190 | ||
| @@ -191,7 +193,7 @@ antindex_eofbepos(uint64_t ind) | |||
| 191 | 193 | ||
| 192 | ret.eofb = ind % POW2TO11; | 194 | ret.eofb = ind % POW2TO11; |
| 193 | ret.epose = (ind / POW2TO11) * 24; | 195 | ret.epose = (ind / POW2TO11) * 24; |
| 194 | ret.eorl = eorl_aux[ret.eofb][ret.epose/24]; | 196 | ret.eorl = eorl_a[ret.eofb][ret.epose/24]; |
| 195 | 197 | ||
| 196 | return ret; | 198 | return ret; |
| 197 | } | 199 | } |
