New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 789665 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Show other hotlists

Hotlists containing this issue:
XXX


Sign in to add a comment

reduce libwebp size

Project Member Reported by jzern@chromium.org, Nov 29 2017

Issue description

With 0.6.1 additional defines were added to strip unused sections of the code.

WEBP_DISABLE_STATS
WEBP_REDUCE_SIZE
WEBP_REDUCE_CSP
WEBP_NEAR_LOSSLESS=0

All of these should apply to chrome.
 

Comment 1 by jzern@chromium.org, Nov 30 2017

Status: Started (was: Assigned)
> WEBP_REDUCE_CSP

This one is too restrictive for ios tests. Applying this to a targeted set of platforms is still possible.


[ RUN      ] WebpDecoderTest.DecodeToJpeg
Assertion failed: (0), function EmptyUpsampleFunc, file ../../third_party/libwebp/src/dsp/upsampling.c, line 119.
Received signal 6

> WEBP_REDUCE_SIZE

This one had a bug causing lossless decoding to fail.
https://chromium-review.googlesource.com/c/webm/libwebp/+/797949
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b1ecefce7c9a7164c1453ab94c8c2283b2f4b3a

commit 3b1ecefce7c9a7164c1453ab94c8c2283b2f4b3a
Author: James Zern <jzern@chromium.org>
Date: Thu Nov 30 04:18:11 2017

libwebp,BUILD: add WEBP_NEAR_LOSSLESS=0, WEBP_DISABLE_STATS

near-lossless and stats reported by the encoder are unused in chrome

Bug:  789665 
Change-Id: I53ffb8bf4d6fb36fa5ed0789a3dabbd8d8bbef89
Reviewed-on: https://chromium-review.googlesource.com/797418
Reviewed-by: Tom Finegan <tomfinegan@chromium.org>
Commit-Queue: James Zern <jzern@google.com>
Cr-Commit-Position: refs/heads/master@{#520431}
[modify] https://crrev.com/3b1ecefce7c9a7164c1453ab94c8c2283b2f4b3a/third_party/libwebp/BUILD.gn

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c87a1d0f11e1d7f594502e3ac43b4fd5d4cda51

commit 3c87a1d0f11e1d7f594502e3ac43b4fd5d4cda51
Author: James Zern <jzern@chromium.org>
Date: Thu Nov 30 19:53:17 2017

libwebp,BUILD: add WEBP_REDUCE_CSP

removes colorspaces unused in chrome.
only supported ones are: RGBA/BGRA/rgbA/bgrA (decoder)
as well as: WebPPictureImportRGB/RGBX/RGBA (encoder).

Bug:  789665 
Change-Id: I27fdfc197f806413526242d9b029c506e1a71c3f
Reviewed-on: https://chromium-review.googlesource.com/798472
Reviewed-by: Tom Finegan <tomfinegan@chromium.org>
Reviewed-by: Urvang Joshi <urvang@chromium.org>
Commit-Queue: James Zern <jzern@google.com>
Cr-Commit-Position: refs/heads/master@{#520650}
[modify] https://crrev.com/3c87a1d0f11e1d7f594502e3ac43b4fd5d4cda51/third_party/libwebp/BUILD.gn

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0a4b781780049187217fabf5408339901f8c531d

commit 0a4b781780049187217fabf5408339901f8c531d
Author: James Zern <jzern@chromium.org>
Date: Fri Dec 01 23:51:33 2017

libwebp: cherry-pick fix lossless decoding w/WEBP_REDUCE_SIZE

commit 296c7dc4ac54becebec0b8f32b072becf0b94c33
Author: James Zern <jzern@google.com>
Date:   Wed Nov 29 16:54:23 2017 -0800

    fix lossless decoding w/WEBP_REDUCE_SIZE

    alpha processing is still required when requesting premultiplied output

    since:
    1b27bf8b WEBP_REDUCE_SIZE: disable all rescaler code

Bug:  789665 
Change-Id: I4920127e71519a1534ae84ea04b92a8e2ac271d3
Reviewed-on: https://chromium-review.googlesource.com/802399
Reviewed-by: Urvang Joshi <urvang@chromium.org>
Commit-Queue: James Zern <jzern@google.com>
Cr-Commit-Position: refs/heads/master@{#521131}
[modify] https://crrev.com/0a4b781780049187217fabf5408339901f8c531d/third_party/libwebp/README.chromium
[modify] https://crrev.com/0a4b781780049187217fabf5408339901f8c531d/third_party/libwebp/src/dec/vp8l_dec.c

Project Member

Comment 5 by bugdroid1@chromium.org, Dec 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9a656dcb39ccd2e3e8ffa815bf85c41798b6c8c6

commit 9a656dcb39ccd2e3e8ffa815bf85c41798b6c8c6
Author: James Zern <jzern@chromium.org>
Date: Wed Dec 06 02:04:08 2017

libwebp,BUILD: add WEBP_REDUCE_SIZE

removes rescaler, auto-filter (-af) support and makes WebPPictureCopy,
WebPPictureIsView, WebPPictureView, WebPPictureCrop, and
WebPPictureRescale noops.

Bug:  789665 
Change-Id: I222feb7dce9b41093acebf1d3381dcedf9922e7d
Reviewed-on: https://chromium-review.googlesource.com/797771
Reviewed-by: Urvang Joshi <urvang@chromium.org>
Commit-Queue: James Zern <jzern@google.com>
Cr-Commit-Position: refs/heads/master@{#521944}
[modify] https://crrev.com/9a656dcb39ccd2e3e8ffa815bf85c41798b6c8c6/third_party/libwebp/BUILD.gn

Comment 6 by jzern@chromium.org, Dec 6 2017

Labels: Performance-Size
libwebp reported size in MonochromePublic.apk with target_cpu=arm:

0.6.0: 309.12KiB
0.6.1: 284.57KiB
0.6.1+defines: 239.09KiB

Comment 7 by jzern@chromium.org, Dec 6 2017

Status: Fixed (was: Started)
The size for M64 from the change in comment #3 is 250.84KiB, the remainder will be in M65.
I don't have anything additional planned for this currently, closing.

Sign in to add a comment