Projects > cpp > Issues > Bug #4501

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

upgrade WebP support from 0.2.1 to 0.4.0

Bug #4501 [Closed]
alexodus 2014-03-21 10:14 . Updated over 9 years ago

the current webp support is outdated. The decoder is very slow (on Nexus 4, 1.2 seconds for 3674x717 webp image; on LG Optimus One P500, 5.7 seconds).

test.webp - file 3674x717 (140.4 kB) alexodus, 2014-03-24 12:21

alexodus 2014-03-24 12:21

I have another benchmark test with this example project:
-Simulator iOS (on MacBook Pro 2,4Ghz Intel Core 2 Duo) : ~ 260 milliseconds
-Simulator iOS (on MacBook Pro 2,4Ghz Intel Core 2 Duo) with lib file libwebp.a(*) inside Cocos2D-X 3.0rc0: ~ 400 milliseconds

GOOD! :)

(*) in ./cocos2d/external/webp/prebuilt/ios/ folder

colprog 2014-03-25 01:28

i've tested webp 0.4.0 on a 1366x720 image on ios and android. and the result looked very promising.

webp decode performance on iphone 5:
Webp(lossy) : 0.079884s
Webp(loseless) : 0.115118s
Png : 0.197729s

webp decode performance on xiaomi 2s:
Webp (lossy): 0.100315s
Webp(leseless) : 0.090699s
Png : 0.165843s

and the image size reduction is also remarkable:
PNG: 535 KB
WEBP(lossless): 172KB
WEBP(lossy): 48KB

going forward, now that webp support animated webp, it might be plausible to make webp the default image format for cocos2d-x.

alexodus 2014-08-17 07:28

Changelog for 0.4.1 version of libwebp:

  • 7/24/14: version 0.4.1 This is a binary compatible release.
    • AArch64 (arm64) & MIPS support/optimizations
    • NEON assembly additions:
    • ~25% faster lossy decode / encode (-m 4)
    • ~10% faster lossless decode
    • ~5-10% faster lossless encode (-m 3/4)
    • dwebp/vwebp can read from stdin
    • cwebp/gif2webp can write to stdout
    • cwebp can read webp files; useful if storing sources as webp lossless 2014-10-08 02:59

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to

Atom PDF

Start date:2014-03-21
Due date:
% Done:


Target version:-