Remove unreachable condition

Change-Id: I9149d1574f72e6ecb532300712660abb29d0d027
This commit is contained in:
Vincent Rabaud
2026-03-16 15:33:09 +01:00
parent 561325651c
commit d25c11493a

View File

@@ -960,6 +960,7 @@ static void GetBestGreenRedToBlue(const uint32_t* argb, int stride,
const int8_t offset[kGreenRedToBlueNumAxis][2] = { const int8_t offset[kGreenRedToBlueNumAxis][2] = {
{0, -1}, {0, 1}, {-1, 0}, {1, 0}, {-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; {0, -1}, {0, 1}, {-1, 0}, {1, 0}, {-1, -1}, {-1, 1}, {1, -1}, {1, 1}};
const int8_t delta_lut[kGreenRedToBlueMaxIters] = {16, 16, 8, 4, 2, 2, 2}; const int8_t delta_lut[kGreenRedToBlueMaxIters] = {16, 16, 8, 4, 2, 2, 2};
// Only axis aligned diffs for lower quality.
const int iters = (quality < 25) ? 1 const int iters = (quality < 25) ? 1
: (quality > 50) ? kGreenRedToBlueMaxIters : (quality > 50) ? kGreenRedToBlueMaxIters
: 4; : 4;
@@ -985,10 +986,6 @@ static void GetBestGreenRedToBlue(const uint32_t* argb, int stride,
green_to_blue_best = green_to_blue_cur; green_to_blue_best = green_to_blue_cur;
red_to_blue_best = red_to_blue_cur; red_to_blue_best = red_to_blue_cur;
} }
if (quality < 25 && iter == 4) {
// Only axis aligned diffs for lower quality.
break; // next iter.
}
} }
if (delta == 2 && green_to_blue_best == 0 && red_to_blue_best == 0) { if (delta == 2 && green_to_blue_best == 0 && red_to_blue_best == 0) {
// Further iterations would not help. // Further iterations would not help.