]> git.ipfire.org Git - thirdparty/zlib-ng.git/commit
Add PNG decode benchmark for narrow image widths
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 26 Mar 2026 19:11:59 +0000 (12:11 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 1 May 2026 12:36:28 +0000 (14:36 +0200)
commit6d13634fc62034e19777d24c3633e17e8ffa899b
treee3e367dd40be6a63388a6aa2208c28f9f4990766
parent802ba9736fadf9c0f4929f69847d95a523aa5e21
Add PNG decode benchmark for narrow image widths

Benchmark libpng row-by-row decoding where avail_out falls
below the 260-byte inflate_fast threshold. Uses a synthetic
gradient-with-noise pixel generator that produces deflate
token distributions representative of real photographs.
Also fix encode_png to use the passed width and height
instead of the hardcoded IMWIDTH and IMHEIGHT constants.
test/benchmarks/CMakeLists.txt
test/benchmarks/benchmark_png_decode_small.cc [new file with mode: 0644]
test/benchmarks/benchmark_png_shared.h