mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 01:01:35 +01:00
std/jpeg: check up-front for sufficient AC bits
The micro-benchmarks are mixed for now, but this sets us up to remove an inner-loop bounds check in a future commit. name old speed new speed delta wuffs_jpeg_decode_19k_8bpp/clang11 226MB/s ± 0% 224MB/s ± 1% -1.03% (p=0.029 n=4+4) wuffs_jpeg_decode_30k_24bpp_progressive/clang11 210MB/s ± 0% 206MB/s ± 0% -1.59% (p=0.029 n=4+4) wuffs_jpeg_decode_30k_24bpp_sequential/clang11 379MB/s ± 0% 374MB/s ± 0% -1.25% (p=0.016 n=4+5) wuffs_jpeg_decode_77k_24bpp/clang11 326MB/s ± 0% 319MB/s ± 0% -2.35% (p=0.029 n=4+4) wuffs_jpeg_decode_552k_24bpp_420/clang11 338MB/s ± 0% 329MB/s ± 0% -2.53% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/clang11 468MB/s ± 0% 465MB/s ± 0% -0.58% (p=0.008 n=5+5) wuffs_jpeg_decode_4002k_24bpp/clang11 347MB/s ± 0% 332MB/s ± 0% -4.41% (p=0.016 n=4+5) wuffs_jpeg_decode_19k_8bpp/gcc10 174MB/s ± 0% 176MB/s ± 0% +1.18% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/gcc10 247MB/s ± 0% 246MB/s ± 0% -0.55% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/gcc10 477MB/s ± 0% 472MB/s ± 0% -0.90% (p=0.008 n=5+5) wuffs_jpeg_decode_77k_24bpp/gcc10 328MB/s ± 0% 334MB/s ± 0% +1.69% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/gcc10 346MB/s ± 0% 351MB/s ± 0% +1.57% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/gcc10 424MB/s ± 0% 425MB/s ± 0% +0.39% (p=0.008 n=5+5) wuffs_jpeg_decode_4002k_24bpp/gcc10 350MB/s ± 0% 349MB/s ± 0% -0.23% (p=0.008 n=5+5)
This commit is contained in:
1 parent
2ca61b521f
commit
143991a301
5 files changed
+46
-8
No files matched your search
@@ -68,7 +68,9 @@ pri func decoder.decode_mcu_progressive_ac_low_bit!(workbuf: slice base.u8, mx:
|
||||
// and processing the ac_value (up to 15 bits).
|
||||
//
|
||||
// After that, it's simpler for this "AC low bit" flavor if we
|
||||
// never suspend for the rest of the while.ac_components loop.
|
||||
// never suspend for the rest of this iteration of the
|
||||
// while.ac_components loop.
|
||||
//
|
||||
// Specifically, we want to have enough bits in the bitstream
|
||||
// so that we don't suspend inside the while.refine_non_zeroes
|
||||
// loop. In the worst case, we need another 8 bytes for
|
||||
|
||||
Reference in new issue
Block a user