Prior to 381e186f "std/vp8: swizzle_ycck once, not once per MB row", we
swizzled one row of macroblocks at a time. After 381e186f, we swizzled
the whole image in one pass, but kept the option of, in the future,
amending the swizzle_ycck implementation to allow ((y_min_incl > 0) and
(ycc_upsampling == FANCY_ETC)) at the same time.
However, 381e186f didn't show a performance loss so large that it seems
worth complicating the swizzle_ycck implementation in that way. So we
just drop, in this commit, the option of that amendment.
This prepares us to change std/vp8's YCC upsampling method from "basic"
to "fancy, like libwebp". Wuffs' current implementation of "fancy"
requires the initial Y coordinate to be zero, as fancy upsampling
special cases the top row of the image and it's simpler if the top row
(row zero) is always presented in the upsampling call.
This is not an optimization or pessimization per se, but for the record,
the performance impact is between negligible and a small improvement.
name old speed new speed delta
wuffs_webp_lossy_decode_image_19k_8bpp/clang14 33.7MB/s ± 0% 34.1MB/s ± 0% +1.28% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_40k_24bpp/clang14 106MB/s ± 0% 106MB/s ± 0% +0.09% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_77k_24bpp/clang14 129MB/s ± 0% 130MB/s ± 0% +0.54% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_552k_32bpp/clang14 207MB/s ± 0% 211MB/s ± 0% +1.90% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_4002k_24bpp/clang14 137MB/s ± 0% 138MB/s ± 0% +0.40% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_19k_8bpp/gcc12 32.9MB/s ± 0% 32.9MB/s ± 0% +0.05% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_40k_24bpp/gcc12 98.4MB/s ± 0% 98.8MB/s ± 0% +0.42% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_77k_24bpp/gcc12 125MB/s ± 0% 125MB/s ± 0% +0.17% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_552k_32bpp/gcc12 211MB/s ± 0% 214MB/s ± 0% +1.21% (p=0.008 n=5+5)
wuffs_webp_lossy_decode_image_4002k_24bpp/gcc12 137MB/s ± 0% 137MB/s ± 0% ~ (p=0.095 n=5+5)
"wuffs test -mimic std/webp" now passes.
This commit, part of a series, is inspired by pull request PR #168 by
Damian Kaczmarek (with AI assistance), with some modifications.
Updates PR #168