Issue 287 in webp: Lossy gif2webp creates weird artifacts

91 views
Skip to first unread message

maxstepin@gmail.com via Monorail

unread,
Feb 1, 2016, 2:53:33 AM2/1/16
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 287 by maxste...@gmail.com: Lossy gif2webp creates weird artifacts
https://bugs.chromium.org/p/webp/issues/detail?id=287

What steps will reproduce the problem?

1. Download GIF from https://dribbble.com/shots/2389999-Trefoil 
2. gif2webp -lossy trefoil.gif -o trefoil_lossy.webp
3. Playing the result in browser, you'll notice at the bottom of the figure some blue horizontal lines flickering.

What is the expected output? What do you see instead?

Some artifacts are expected in lossy conversion, but those horizontal lines are too weird. Seems like a bug.

What version of the product are you using?

0.5.0

Please provide any additional information below.

webpmux -get frame 15 trefoil_lossy.webp -o frame15.webp

After extracting the frame with the command ^^^ above, it's clear that fully transparent areas are filled with some artificial RGB values, probably to help with the compression. That's ok for invisible alpha=0 areas. But those RGB values seems to spill over into visible alpha=255 areas too.

See the attached screenshots.



Attachments:
	Animation_in_chrome_crop4x.png  46.0 KB
	RGB_frame15_crop4x.png  42.3 KB
	RGBA_frame15_crop4x.png  37.1 KB

-- 
You received this message because:
  1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

urvang@google.com via Monorail

unread,
Feb 1, 2016, 6:35:33 PM2/1/16
to webp-d...@webmproject.org
Updates:
	Status: Accepted

Comment #1 on issue 287 by urv...@google.com: Lossy gif2webp creates weird artifacts
https://bugs.chromium.org/p/webp/issues/detail?id=287#c1

Thanks for the report!

I can reproduce the problem. Let me investigate.

-- 
You received this message because:
  1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

pascal.massimino@gmail.com via Monorail

unread,
Feb 8, 2016, 7:48:29 PM2/8/16
to webp-d...@webmproject.org
Comment #2 on issue 287 by pascal.m...@gmail.com: Lossy gif2webp creates weird artifacts
https://bugs.chromium.org/p/webp/issues/detail?id=287#c2

It seems the various *source* frames have been preprocessed to reduce their individual palette to ~100 colors.

It also means that the delta between two subsequent frames has a lot of 'dust' that comes from the per-frame quantization (see attached frame diff).

Not only is this dust 'hard' to compress (lossless or lossy mode), but it also produces trails and artifact in the lossy mode.

We probably need some option to apply temporal smoothing, that would undo the quantization and remove the dust (for better compressibility!).


Attachments:
	diff_frame_1_2.png  17.2 KB

-- 
You received this message because:
  1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

maxstepin@gmail.com via Monorail

unread,
Feb 9, 2016, 1:09:44 AM2/9/16
to webp-d...@webmproject.org
Comment #3 on issue 287 by maxste...@gmail.com: Lossy gif2webp creates weird artifacts
https://bugs.chromium.org/p/webp/issues/detail?id=287#c3

Yes, that might help. But please investigate the blurring too.

The function below seems to fill those transparent 8x8 blocks with solid 'average' color, yet in the 2nd screenshot you see that some of the blocks are blurry, and it even spills over opaque pixels nearby.


// Replace similar blocks of pixels by a 'see-through' transparent block
// with uniform average color.
static void FlattenSimilarBlocks(const WebPPicture* const src,
                                 const FrameRect* const rect,
                                 WebPPicture* const dst) {
...
}


-- 
You received this message because:
  1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

pascal.m… via monorail

unread,
Sep 5, 2016, 10:46:09 AM9/5/16
to webp-d...@webmproject.org

Comment #4 on issue 287 by pascal.m...@gmail.com: Lossy gif2webp creates weird artifacts
https://bugs.chromium.org/p/webp/issues/detail?id=287#c4

update: libwebp-0.5.1 is behaving better with the artifacts (see new output, attached).

But there's still the 'dust' problem, that makes the lossy file much larger than just using lossless. And -min_size helps a little at reducing the size, but the difference is still large.

Attachments:
trefoil_lossy.webp 2.7 MB

vincent.… via monorail

unread,
Aug 31, 2017, 9:57:01 AM8/31/17
to webp-d...@webmproject.org
Updates:
Status: Fixed

Comment #5 on issue 287 by vincent....@gmail.com: Lossy gif2webp creates weird artifacts
https://bugs.chromium.org/p/webp/issues/detail?id=287#c5

We know that lossy can end up bigger than lossless on artificial images as it does not take into account the structure of the image, while lossless does, especially with LZ77.

The original bug with the artifacts got fixed.

in addition, lossless is now smaller than GIF: 689046 kB for gif2webp -min_size trefoil.gif -o trefoil.webp
(it is also faster: 6.4s down to 2.9s)
Reply all
Reply to author
Forward
0 new messages