Merge changes from The Witness.
This commit is contained in:
6
extern/rg_etc1_v104/rg_etc1.cpp
vendored
6
extern/rg_etc1_v104/rg_etc1.cpp
vendored
@ -1808,7 +1808,7 @@ typedef unsigned long uint64;
|
||||
{
|
||||
if (block_inten[0] > m_pSorted_luma[n - 1])
|
||||
{
|
||||
const uint min_error = labs(int(block_inten[0] - m_pSorted_luma[n - 1]));
|
||||
const uint min_error = abs(int(block_inten[0] - m_pSorted_luma[n - 1]));
|
||||
if (min_error >= trial_solution.m_error)
|
||||
continue;
|
||||
}
|
||||
@ -1822,7 +1822,7 @@ typedef unsigned long uint64;
|
||||
{
|
||||
if (m_pSorted_luma[0] > block_inten[3])
|
||||
{
|
||||
const uint min_error = labs(int(m_pSorted_luma[0] - block_inten[3]));
|
||||
const uint min_error = abs(int(m_pSorted_luma[0] - block_inten[3]));
|
||||
if (min_error >= trial_solution.m_error)
|
||||
continue;
|
||||
}
|
||||
@ -1914,7 +1914,7 @@ done:
|
||||
for (uint packed_c = 0; packed_c < limit; packed_c++)
|
||||
{
|
||||
int v = etc1_decode_value(diff, inten, selector, packed_c);
|
||||
uint err = labs(v - static_cast<int>(color));
|
||||
uint err = abs(v - static_cast<int>(color));
|
||||
if (err < best_error)
|
||||
{
|
||||
best_error = err;
|
||||
|
Reference in New Issue
Block a user