| 1529 | } |
| 1530 | |
| 1531 | CGV_FLOAT shake(CGV_INT epo_code_shaker_out[2 * MAX_CHANNELS], |
| 1532 | CGV_FLOAT image_ep[2 * MAX_CHANNELS], |
| 1533 | CGV_UINT8 index_cidx[MAX_SUBSET_SIZE], |
| 1534 | CGV_FLOAT image_src[SOURCE_BLOCK_SIZE * MAX_CHANNELS], |
| 1535 | CGU_INT clogBC7, |
| 1536 | CGU_INT type, |
| 1537 | CGU_UINT8 max_bits[MAX_CHANNELS], |
| 1538 | CGU_UINT8 use_par, |
| 1539 | CGV_INT numEntries, // max 16 |
| 1540 | CGU_UINT8 channels3or4) |
| 1541 | { |
| 1542 | #define SHAKESIZE1 1 |
| 1543 | #define SHAKESIZE2 2 |
| 1544 | // shake single or - cartesian |
| 1545 | // shake odd/odd and even/even or - same parity |
| 1546 | // shake odd/odd odd/even , even/odd and even/even - bcc |
| 1547 | |
| 1548 | CGV_FLOAT best_err = CMP_FLOAT_MAX; |
| 1549 | |
| 1550 | CGV_FLOAT err_ed[16] = {0}; |
| 1551 | CGV_INT epo_code_par[2][2][2][MAX_CHANNELS]; |
| 1552 | |
| 1553 | for (CGU_UINT8 ch = 0; ch < channels3or4; ch++) |
| 1554 | { |
| 1555 | CGU_UINT8 ppA = 0; |
| 1556 | CGU_UINT8 ppB = 0; |
| 1557 | CGU_UINT8 rr = (use_par ? 2 : 1); |
| 1558 | CGV_INT epo_code_epi[2][2]; // first/second, coord, begin rage end range |
| 1559 | |
| 1560 | for (ppA = 0; ppA < rr; ppA++) |
| 1561 | { // loop max =2 |
| 1562 | for (ppB = 0; ppB < rr; ppB++) |
| 1563 | { //loop max =2 |
| 1564 | |
| 1565 | // set default ranges |
| 1566 | epo_code_epi[0][0] = epo_code_epi[0][1] = ep_find_floor(image_ep[ch], max_bits[ch], use_par, ppA); |
| 1567 | epo_code_epi[1][0] = epo_code_epi[1][1] = ep_find_floor(image_ep[4 + ch], max_bits[ch], use_par, ppB); |
| 1568 | |
| 1569 | // set begin range |
| 1570 | epo_code_epi[0][0] -= ((epo_code_epi[0][0] < SHAKESIZE1 ? epo_code_epi[0][0] : SHAKESIZE1)) & (~use_par); |
| 1571 | epo_code_epi[1][0] -= ((epo_code_epi[1][0] < SHAKESIZE1 ? epo_code_epi[1][0] : SHAKESIZE1)) & (~use_par); |
| 1572 | |
| 1573 | // set end range |
| 1574 | epo_code_epi[0][1] += |
| 1575 | ((1 << max_bits[ch]) - 1 - epo_code_epi[0][1] < SHAKESIZE2 ? (1 << max_bits[ch]) - 1 - epo_code_epi[0][1] : SHAKESIZE2) & (~use_par); |
| 1576 | epo_code_epi[1][1] += |
| 1577 | ((1 << max_bits[ch]) - 1 - epo_code_epi[1][1] < SHAKESIZE2 ? (1 << max_bits[ch]) - 1 - epo_code_epi[1][1] : SHAKESIZE2) & (~use_par); |
| 1578 | |
| 1579 | CGV_INT step = (1 << use_par); |
| 1580 | err_ed[(ppA * 8) + (ppB * 4) + ch] = CMP_FLOAT_MAX; |
| 1581 | |
| 1582 | for (CGV_INT epo_p1 = epo_code_epi[0][0]; epo_p1 <= epo_code_epi[0][1]; epo_p1 += step) |
| 1583 | { |
| 1584 | for (CGV_INT epo_p2 = epo_code_epi[1][0]; epo_p2 <= epo_code_epi[1][1]; epo_p2 += step) |
| 1585 | { |
| 1586 | CGV_FLOAT image_square_diff = 0.0F; |
| 1587 | CGV_INT _mc = numEntries; |
| 1588 | CGV_FLOAT image_ramp; |
no test coverage detected