OSDN Git Service

Katie image format optimization
authorIvailo Monev <xakepa10@gmail.com>
Mon, 28 Feb 2022 22:40:50 +0000 (00:40 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 28 Feb 2022 23:11:30 +0000 (01:11 +0200)
commitf81903f64d96bd234d15617890b359ecdd338114
tree08dc1e4bc1e792c9cb52c1d647fc891455a5f7be
parent3337c33a86185d54dc9ccf948df95ba83667c201
Katie image format optimization

from 2x faster to 3x compared to png, benchmark results bellow:
********* Start testing of tst_QImageReader *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageReader::initTestCase()
RESULT   : tst_QImageReader::readImage():"bench.kat":
     0.452 msecs per iteration (total: 226, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.pbm":
     0.026 msecs per iteration (total: 13, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.png":
     1.82 msecs per iteration (total: 912, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.ppm":
     0.588 msecs per iteration (total: 294, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.svg":
     10.80 msecs per iteration (total: 5,400, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.xpm":
     8.172 msecs per iteration (total: 4,086, iterations: 500)
PASS  : tst_QImageReader::readImage()
RESULT   : tst_QImageReader::setScaledSize():"bench.kat":
     1.95 msecs per iteration (total: 977, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.pbm":
     1.34 msecs per iteration (total: 671, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.png":
     3.328 msecs per iteration (total: 1,664, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.ppm":
     1.44 msecs per iteration (total: 720, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.svg":
     9.304 msecs per iteration (total: 4,652, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.xpm":
     9.730 msecs per iteration (total: 4,865, iterations: 500)
PASS  : tst_QImageReader::setScaledSize()
PASS  : tst_QImageReader::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageReader *********

********* Start testing of tst_QImageWriter *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageWriter::initTestCase()
RESULT   : tst_QImageWriter::writeImage():"kat":
     2.428 msecs per iteration (total: 1,214, iterations: 500)
RESULT   : tst_QImageWriter::writeImage():"png":
     7.798 msecs per iteration (total: 3,899, iterations: 500)
RESULT   : tst_QImageWriter::writeImage():"ppm":
     6.954 msecs per iteration (total: 3,477, iterations: 500)
PASS  : tst_QImageWriter::writeImage()
PASS  : tst_QImageWriter::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageWriter *********

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/image/qkathandler.cpp
tests/benchmarks/gui/image/qimagereader/images/bench.kat