mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
Merge "EstimateBestFilter: use an int to iterate WEBP_FILTER_TYPE"
This commit is contained in:
commit
8189885b6d
@ -228,7 +228,8 @@ WEBP_FILTER_TYPE EstimateBestFilter(const uint8_t* data,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
WEBP_FILTER_TYPE filter, best_filter = WEBP_FILTER_NONE;
|
int filter;
|
||||||
|
WEBP_FILTER_TYPE best_filter = WEBP_FILTER_NONE;
|
||||||
int best_score = 0x7fffffff;
|
int best_score = 0x7fffffff;
|
||||||
for (filter = WEBP_FILTER_NONE; filter < WEBP_FILTER_LAST; ++filter) {
|
for (filter = WEBP_FILTER_NONE; filter < WEBP_FILTER_LAST; ++filter) {
|
||||||
int score = 0;
|
int score = 0;
|
||||||
@ -239,7 +240,7 @@ WEBP_FILTER_TYPE EstimateBestFilter(const uint8_t* data,
|
|||||||
}
|
}
|
||||||
if (score < best_score) {
|
if (score < best_score) {
|
||||||
best_score = score;
|
best_score = score;
|
||||||
best_filter = filter;
|
best_filter = (WEBP_FILTER_TYPE)filter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return best_filter;
|
return best_filter;
|
||||||
|
Loading…
Reference in New Issue
Block a user