mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Roll dst_palette into the pixel_swizzler struct
This commit will soon be followed by a rollback, but it is committed anyway so that we can refer to these numbers in the git log. name old speed new speed delta wuffs_gif_decode_1k_bw/clang5 286MB/s ± 1% 251MB/s ± 0% -12.11% (p=0.000 n=10+9) wuffs_gif_decode_1k_color_full_init/clang5 96.0MB/s ± 0% 88.9MB/s ± 0% -7.35% (p=0.000 n=10+10) wuffs_gif_decode_1k_color_part_init/clang5 119MB/s ± 0% 108MB/s ± 0% -9.06% (p=0.000 n=10+8) wuffs_gif_decode_10k_bgra/clang5 469MB/s ± 1% 438MB/s ± 0% -6.50% (p=0.000 n=10+8) wuffs_gif_decode_10k_indexed/clang5 125MB/s ± 1% 117MB/s ± 1% -6.78% (p=0.000 n=9+9) wuffs_gif_decode_20k/clang5 153MB/s ± 0% 139MB/s ± 0% -9.40% (p=0.000 n=9+9) wuffs_gif_decode_100k_artificial/clang5 324MB/s ± 0% 304MB/s ± 0% -6.22% (p=0.000 n=10+9) wuffs_gif_decode_100k_realistic/clang5 139MB/s ± 1% 125MB/s ± 1% -9.69% (p=0.000 n=9+10) wuffs_gif_decode_1000k_full_init/clang5 141MB/s ± 0% 126MB/s ± 0% -10.40% (p=0.000 n=10+10) wuffs_gif_decode_1000k_part_init/clang5 141MB/s ± 1% 126MB/s ± 0% -10.50% (p=0.000 n=10+8) wuffs_gif_decode_anim_screencap/clang5 655MB/s ± 0% 617MB/s ± 1% -5.91% (p=0.000 n=9+9) wuffs_gif_decode_1k_bw/gcc7 299MB/s ± 0% 295MB/s ± 0% -1.18% (p=0.000 n=10+8) wuffs_gif_decode_1k_color_full_init/gcc7 85.2MB/s ± 1% 88.2MB/s ± 0% +3.58% (p=0.000 n=10+10) wuffs_gif_decode_1k_color_part_init/gcc7 104MB/s ± 0% 103MB/s ± 0% -0.39% (p=0.001 n=9+10) wuffs_gif_decode_10k_bgra/gcc7 349MB/s ± 2% 352MB/s ± 0% +0.77% (p=0.000 n=9+10) wuffs_gif_decode_10k_indexed/gcc7 106MB/s ± 0% 106MB/s ± 2% ~ (p=0.762 n=8+10) wuffs_gif_decode_20k/gcc7 133MB/s ± 0% 133MB/s ± 0% ~ (p=0.258 n=9+9) wuffs_gif_decode_100k_artificial/gcc7 302MB/s ± 0% 301MB/s ± 1% -0.41% (p=0.035 n=10+10) wuffs_gif_decode_100k_realistic/gcc7 118MB/s ± 1% 118MB/s ± 1% ~ (p=0.095 n=9+10) wuffs_gif_decode_1000k_full_init/gcc7 120MB/s ± 1% 119MB/s ± 0% -0.34% (p=0.007 n=10+10) wuffs_gif_decode_1000k_part_init/gcc7 119MB/s ± 1% 119MB/s ± 1% ~ (p=0.138 n=10+10) wuffs_gif_decode_anim_screencap/gcc7 640MB/s ± 0% 640MB/s ± 0% ~ (p=0.905 n=9+10)
This commit is contained in:
1 parent
3afdd91acb
commit
2d8ec9ace9
9 files changed
+236
-310
No files matched your search
+2
-11
@@ -107,7 +107,6 @@ test_wuffs_pixel_swizzler_swizzle() {
|
||||
|
||||
const uint32_t width = 5;
|
||||
const uint32_t height = 5;
|
||||
uint8_t dummy_palette_array[1024];
|
||||
wuffs_base__pixel_swizzler swizzler;
|
||||
|
||||
const struct {
|
||||
@@ -201,14 +200,6 @@ test_wuffs_pixel_swizzler_swizzle() {
|
||||
wuffs_base__pixel_alpha_transparency dst_transparency =
|
||||
wuffs_base__pixel_format__transparency(&dst_pixfmt);
|
||||
|
||||
wuffs_base__slice_u8 dst_palette =
|
||||
wuffs_base__pixel_buffer__palette(&dst_pixbuf);
|
||||
if (dst_palette.len == 0) {
|
||||
dst_palette = wuffs_base__make_slice_u8(
|
||||
&dummy_palette_array[0],
|
||||
WUFFS_TESTLIB_ARRAY_SIZE(dummy_palette_array));
|
||||
}
|
||||
|
||||
int b;
|
||||
for (b = 0; b < WUFFS_TESTLIB_ARRAY_SIZE(blends); b++) {
|
||||
// Set the middle dst pixel.
|
||||
@@ -220,14 +211,14 @@ test_wuffs_pixel_swizzler_swizzle() {
|
||||
CHECK_STATUS(
|
||||
"prepare",
|
||||
wuffs_base__pixel_swizzler__prepare(
|
||||
&swizzler, dst_pixfmt, dst_palette,
|
||||
&swizzler, dst_pixfmt,
|
||||
wuffs_base__pixel_buffer__palette(&dst_pixbuf),
|
||||
wuffs_base__make_pixel_format(srcs[s].pixfmt_repr),
|
||||
wuffs_base__pixel_buffer__palette(&src_pixbuf), blends[b]));
|
||||
wuffs_base__pixel_swizzler__swizzle_interleaved(
|
||||
&swizzler,
|
||||
wuffs_base__table_u8__row(
|
||||
wuffs_base__pixel_buffer__plane(&dst_pixbuf, 0), height / 2),
|
||||
dst_palette,
|
||||
wuffs_base__table_u8__row(
|
||||
wuffs_base__pixel_buffer__plane(&src_pixbuf, 0), height / 2));
|
||||
|
||||
|
||||
Reference in new issue
Block a user