mirror of
https://github.com/webmproject/libwebp.git
synced 2026-04-09 14:22:31 +02:00
Remove unreachable condition
Change-Id: I9149d1574f72e6ecb532300712660abb29d0d027
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user