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 about 2 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:
https://code.google.com/p/webp/downloads/detail?name=webpiosapp-0.4.0.tar.gz&can=2&q=
-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
walzer@cocos2d-x.org 2014-10-08 02:59

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

This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8375

Atom PDF

Status:Closed
Start date:2014-03-21
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:all
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.