Permalink
Browse files

native: Avoid an absolute value error.

Presumably this was the goal.  Not tested.
  • Loading branch information...
unknownbrackets committed Jun 17, 2018
1 parent b281da9 commit ae7f5d7824fd8ace05cb61fb17e6b5fd906476d2
Showing with 2 additions and 2 deletions.
  1. +2 −2 ext/native/ext/rg_etc1/rg_etc1.cpp
@@ -1805,7 +1805,7 @@ namespace rg_etc1
{
if (block_inten[0] > m_pSorted_luma[n - 1])
{
const uint min_error = (uint)(labs(block_inten[0] - m_pSorted_luma[n - 1]));
const uint min_error = (uint)(labs((int)block_inten[0] - (int)m_pSorted_luma[n - 1]));
if (min_error >= trial_solution.m_error)
continue;
}
@@ -1819,7 +1819,7 @@ namespace rg_etc1
{
if (m_pSorted_luma[0] > block_inten[3])
{
const uint min_error = (uint)(labs(m_pSorted_luma[0] - block_inten[3]));
const uint min_error = (uint)(labs((int)m_pSorted_luma[0] - (int)block_inten[3]));
if (min_error >= trial_solution.m_error)
continue;
}

0 comments on commit ae7f5d7

Please sign in to comment.