base: tweak swizzle_ycck ycc_upsampling parameter

This moves from a 2-valued "basic (box) or fancy (triangle)" upsampling
parameter to a 3-valued one, which can now represent the fact that
libjpeg's and libwebp's fancy (triangle) upsampling is ever-so-slightly
different (see script/script/replicate-libwebp-chroma-upsampling.go and
its comments).

This is not an optimization or pessimization per se, but for the record,
the performance impact is mixed.

name                                             old speed     new speed     delta

wuffs_jpeg_decode_19k_8bpp/clang14               317MB/s ± 0%  314MB/s ± 0%  -0.99%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/clang14  318MB/s ± 0%  328MB/s ± 0%  +3.13%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/clang14   879MB/s ± 0%  871MB/s ± 0%  -0.83%  (p=0.008 n=5+5)
wuffs_jpeg_decode_77k_24bpp/clang14              719MB/s ± 0%  713MB/s ± 0%  -0.89%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/clang14         779MB/s ± 0%  771MB/s ± 0%  -1.01%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/clang14         902MB/s ± 0%  890MB/s ± 0%  -1.32%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/clang14            784MB/s ± 0%  779MB/s ± 0%  -0.66%  (p=0.008 n=5+5)

wuffs_jpeg_decode_19k_8bpp/gcc12                 358MB/s ± 0%  362MB/s ± 0%  +0.93%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/gcc12    305MB/s ± 0%  311MB/s ± 0%  +1.91%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/gcc12     912MB/s ± 0%  918MB/s ± 0%  +0.73%  (p=0.016 n=4+5)
wuffs_jpeg_decode_77k_24bpp/gcc12                749MB/s ± 0%  763MB/s ± 0%  +1.83%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/gcc12           813MB/s ± 0%  824MB/s ± 0%  +1.37%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/gcc12           969MB/s ± 0%  984MB/s ± 0%  +1.62%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/gcc12              815MB/s ± 0%  832MB/s ± 0%  +2.06%  (p=0.008 n=5+5)
This commit is contained in:
Nigel Tao committed 2026-07-03 21:38:28 +10:00
1 parent e3b5a7d506
commit 85a0283cfc
8 files changed
+211 -61

No files matched your search

+7 -1
View File
@@ -248,6 +248,12 @@ var Consts = [...]struct {
{t.IDU32, "0x01", "YCC_MODEL__BT_601_STUDIO_RANGE"},
{t.IDU32, "0x40", "YCC_MODEL__RGB"},
{t.IDU32, "0x80", "YCC_MODEL__CMY"},
// ----
{t.IDU32, "0x00", "YCC_UPSAMPLING__BASIC"},
{t.IDU32, "0x01", "YCC_UPSAMPLING__FANCY_LIKE_LIBJPEG"},
{t.IDU32, "0x02", "YCC_UPSAMPLING__FANCY_LIKE_LIBWEBP"},
}
var Statuses = [...]string{
@@ -742,7 +748,7 @@ var funcsOther = [...]string{
"v2: u8[..= 4]," +
"v3: u8[..= 4]," +
"ycc_model: u8," +
"triangle_filter_for_2to1: bool," +
"ycc_upsampling: u8," +
"scratch_buffer_2k: slice u8) status",
// ---- arm_crc32_utility