diff options
author | Julius Werner <jwerner@chromium.org> | 2020-06-24 19:43:36 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2020-07-09 00:32:17 +0000 |
commit | 7f87812c30ac5e4c3329911aec2ce52050a9abbb (patch) | |
tree | 256289352ddd35494ef1ebae7fd4660d8567bbf6 /src/cpu/intel/fit/fit.S | |
parent | 96b00a50f14e3e41eaf69171945ceeb587b4fe0b (diff) |
libpayload: cbgfx: Replace bilinear resampling with Lanczos
This patch improves the image resampling (scaling) code in CBGFX to use
the Lanczos algorithm that is widely considered the "best" resampling
algorithm (e.g. also the first choice in Python's PIL library). It is of
course much more elaborate and therefore slower than bilinear
resampling, but a lot of the difference can be made up with
optimizations, and the resulting code was found to still produce
acceptable speeds for existing Chrome OS UI use cases (on an Arm
Cortex-A55 device, time to scale an image to 1101x593 went from ~88ms to
~275ms, a little over 3x slowdown). Nevertheless, if this should be too
slow for anyone there's also an option to tune it down a little, but
still much better than bilinear (same operation was ~170ms with this).
Example images (scaled up by a factor of 7):
Old (bilinear): https://i.imgur.com/ytr2n4Z.png
New (Lanczos a=3): https://i.imgur.com/f0vKluM.png
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Idde6f61865bfac2801ee4fff40ac64e4ebddff1a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42792
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/cpu/intel/fit/fit.S')
0 files changed, 0 insertions, 0 deletions