mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
gif2webp: detect and flatten uniformly similar blocks
helps during lossless compression. 10% average saving, but that's mostly on what was previously 'difficult' cases, where the gain is ~30-50% actually. Non-difficult cases are mostly unchanged. Tested over ~7k random web gifs. Change-Id: I09db4560e4ab09105d1cad28e6dbf83842eda8e9
This commit is contained in:
@ -170,6 +170,7 @@ static int OptimizeAndEncodeFrame(
|
||||
// For lossy compression, it's better to replace transparent pixels of
|
||||
// 'curr' with actual RGB values, whenever possible.
|
||||
WebPUtilReduceTransparency(prev_canvas, &rect, curr);
|
||||
WebPUtilFlattenSimilarBlocks(prev_canvas, &rect, curr);
|
||||
}
|
||||
if (!WebPFrameCacheShouldTryKeyFrame(cache)) {
|
||||
// Add this as a frame rectangle.
|
||||
|
Reference in New Issue
Block a user