mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 08:47:56 +01:00
Add "(a - b) < c: a < c; 0 <= b" axiom
wuffs_png_decode_19k_8bpp/clang9 95.7MB/s ± 1% 95.5MB/s ± 0% ~ (p=0.151 n=5+5) wuffs_png_decode_40k_24bpp/clang9 112MB/s ± 0% 115MB/s ± 0% +2.23% (p=0.008 n=5+5) wuffs_png_decode_77k_8bpp/clang9 357MB/s ± 0% 358MB/s ± 0% ~ (p=0.222 n=5+5) wuffs_png_decode_552k_32bpp/clang9 119MB/s ± 1% 124MB/s ± 0% +4.89% (p=0.008 n=5+5) wuffs_png_decode_4002k_24bpp/clang9 114MB/s ± 0% 116MB/s ± 0% +1.95% (p=0.008 n=5+5) wuffs_png_decode_filter_1_sub/clang9 919MB/s ± 1% 924MB/s ± 0% +0.57% (p=0.008 n=5+5) wuffs_png_decode_filter_2_up/clang9 13.3GB/s ± 1% 13.1GB/s ± 0% -2.02% (p=0.008 n=5+5) wuffs_png_decode_filter_3_average/clang9 554MB/s ± 0% 640MB/s ± 0% +15.61% (p=0.008 n=5+5) wuffs_png_decode_filter_4_paeth/clang9 61.9MB/s ± 1% 64.8MB/s ± 0% +4.59% (p=0.008 n=5+5) wuffs_png_decode_19k_8bpp/gcc10 100MB/s ± 1% 99MB/s ± 0% -0.92% (p=0.008 n=5+5) wuffs_png_decode_40k_24bpp/gcc10 114MB/s ± 0% 114MB/s ± 1% ~ (p=0.548 n=5+5) wuffs_png_decode_77k_8bpp/gcc10 325MB/s ± 0% 320MB/s ± 0% -1.45% (p=0.016 n=4+5) wuffs_png_decode_552k_32bpp/gcc10 160MB/s ± 0% 141MB/s ± 0% -11.59% (p=0.016 n=4+5) wuffs_png_decode_4002k_24bpp/gcc10 117MB/s ± 0% 118MB/s ± 0% +0.91% (p=0.008 n=5+5) wuffs_png_decode_filter_1_sub/gcc10 979MB/s ± 0% 1109MB/s ± 0% +13.30% (p=0.008 n=5+5) wuffs_png_decode_filter_2_up/gcc10 11.5GB/s ± 1% 11.1GB/s ± 0% -3.88% (p=0.008 n=5+5) wuffs_png_decode_filter_3_average/gcc10 644MB/s ± 0% 751MB/s ± 0% +16.69% (p=0.008 n=5+5) wuffs_png_decode_filter_4_paeth/gcc10 84.3MB/s ± 1% 76.9MB/s ± 0% -8.74% (p=0.008 n=5+5)
This commit is contained in:
1 parent
b7b39e34d8
commit
be00ccf61f
4 files changed
+78
-57
No files matched your search
@@ -30052,9 +30052,7 @@ wuffs_png__decoder__filter_3(
|
||||
v_i = 0;
|
||||
while (v_i < v_n) {
|
||||
if (v_i >= v_filter_distance) {
|
||||
if ((v_i - v_filter_distance) < ((uint64_t)(a_curr.len))) {
|
||||
a_curr.ptr[v_i] += ((uint8_t)(((((uint32_t)(a_curr.ptr[(v_i - v_filter_distance)])) + ((uint32_t)(a_prev.ptr[v_i]))) / 2)));
|
||||
}
|
||||
a_curr.ptr[v_i] += ((uint8_t)(((((uint32_t)(a_curr.ptr[(v_i - v_filter_distance)])) + ((uint32_t)(a_prev.ptr[v_i]))) / 2)));
|
||||
} else {
|
||||
a_curr.ptr[v_i] += (a_prev.ptr[v_i] / 2);
|
||||
}
|
||||
@@ -30089,30 +30087,28 @@ wuffs_png__decoder__filter_4(
|
||||
if (v_i < v_filter_distance) {
|
||||
a_curr.ptr[v_i] += a_prev.ptr[v_i];
|
||||
} else {
|
||||
if (((v_i - v_filter_distance) < ((uint64_t)(a_curr.len))) && ((v_i - v_filter_distance) < ((uint64_t)(a_prev.len)))) {
|
||||
v_fa = ((uint32_t)(a_curr.ptr[(v_i - v_filter_distance)]));
|
||||
v_fb = ((uint32_t)(a_prev.ptr[v_i]));
|
||||
v_fc = ((uint32_t)(a_prev.ptr[(v_i - v_filter_distance)]));
|
||||
v_pp = ((v_fa + v_fb) - v_fc);
|
||||
v_pa = (v_pp - v_fa);
|
||||
if (v_pa >= 2147483648) {
|
||||
v_pa = (0 - v_pa);
|
||||
}
|
||||
v_pb = (v_pp - v_fb);
|
||||
if (v_pb >= 2147483648) {
|
||||
v_pb = (0 - v_pb);
|
||||
}
|
||||
v_pc = (v_pp - v_fc);
|
||||
if (v_pc >= 2147483648) {
|
||||
v_pc = (0 - v_pc);
|
||||
}
|
||||
if ((v_pa <= v_pb) && (v_pa <= v_pc)) {
|
||||
a_curr.ptr[v_i] += ((uint8_t)((v_fa & 255)));
|
||||
} else if (v_pb <= v_pc) {
|
||||
a_curr.ptr[v_i] += ((uint8_t)((v_fb & 255)));
|
||||
} else {
|
||||
a_curr.ptr[v_i] += ((uint8_t)((v_fc & 255)));
|
||||
}
|
||||
v_fa = ((uint32_t)(a_curr.ptr[(v_i - v_filter_distance)]));
|
||||
v_fb = ((uint32_t)(a_prev.ptr[v_i]));
|
||||
v_fc = ((uint32_t)(a_prev.ptr[(v_i - v_filter_distance)]));
|
||||
v_pp = ((v_fa + v_fb) - v_fc);
|
||||
v_pa = (v_pp - v_fa);
|
||||
if (v_pa >= 2147483648) {
|
||||
v_pa = (0 - v_pa);
|
||||
}
|
||||
v_pb = (v_pp - v_fb);
|
||||
if (v_pb >= 2147483648) {
|
||||
v_pb = (0 - v_pb);
|
||||
}
|
||||
v_pc = (v_pp - v_fc);
|
||||
if (v_pc >= 2147483648) {
|
||||
v_pc = (0 - v_pc);
|
||||
}
|
||||
if ((v_pa <= v_pb) && (v_pa <= v_pc)) {
|
||||
a_curr.ptr[v_i] += ((uint8_t)((v_fa & 255)));
|
||||
} else if (v_pb <= v_pc) {
|
||||
a_curr.ptr[v_i] += ((uint8_t)((v_fb & 255)));
|
||||
} else {
|
||||
a_curr.ptr[v_i] += ((uint8_t)((v_fc & 255)));
|
||||
}
|
||||
}
|
||||
v_i += 1;
|
||||
|
||||
Reference in new issue
Block a user