Benchmarking Webp format (draft)

Bensuperpc February 16, 2025 [Software] #Features #Benchmarking #avif #webp #png #jpegxl #Format

Introduction

Webp is a modern image format created by Google, in this article, we will benchmark it against others lossless formats like avif, png, jpegxl.

The benchmark is done using the PNG format as input, and the output formats are Webp, Avif, and JpegXL.

Setup

SpecificationValue
CPUAMD Ryzen 7 5700X 8c16t (3.4 GHz / 4.6 GHz)
GPUNVIDIA GeForce RTX 3060 Ti 8GB GDDR6
RAM64GB DDR4 3200MHz
OSManjaro
CompilerGCC 14.2.1
cwebp1.5.0
avifenc1.2.0
cjxl0.11.1
ffmpeg7.1.0
Docker Imagedocker.io/bensuperpc/multimedia:1.0.0-archlinux-base-20250329

Lossless compression

The dataset for the lossless benchmark is:

The PNG to Webp lossless compression command is:

cwebp -quiet -metadata all -lossless -exact -z <Compression> <Input> -o <Output>

The options are:

For PNG to Avif lossless compression:

avifenc --jobs 1 --lossless --speed <Compression> --codec <codec> <Input> --output <Output>

The options are:

For PNG to JPGXL lossless compression:

cjxl --num_threads 1 --quiet --effort <Compression> --distance 0.0 --brotli_effort 11 <Input> <Output>

The options are:

Results

Desktop applications (901 Mo):

FormatCompressionSize (Mo)Ratio (%)Time (s)
png-901100.0-
webp087997.5150
webp166072.2176
webp263770.7178
webp360266.8181
webp460166.7185
webp559866.3198
webp658865.2206
webp758564.9211
webp857563.8283
webp956062.11017
jpegxl1956106.1215
jpegxl290099.8261
jpegxl384894.1492
jpegxl477886.3735
jpegxl565973.1713
jpegxl664071.0762
jpegxl760467.0780
jpegxl857964.21407
jpegxl956963.12450

Cleanup

find . -type f -name "*.webp" -delete

Sources