AuburnSounds / gamut

Image encoding and decoding library for D. Detailed layout control. Experimental codec QOIX.
Boost Software License 1.0
41 stars 2 forks source link

Possibly better predictor than qoi2avg #30

Closed p0nce closed 1 year ago

p0nce commented 1 year ago

image

That would changes qoix bitstream, how many bits does it win?

p0nce commented 1 year ago

Ugh, need to change qoi2avg without introducing that a new diff though :(

p0nce commented 1 year ago

Quite spectacular:

Before TOTAL decode mpps encode mpps bit-per-pixel 165.00 108.39 8.29501

TOTAL time = 2.56777 secs

After TOTAL decode mpps encode mpps bit-per-pixel 150.65 96.30 7.94081

TOTAL time = 2.67702 secs

That's a 4.2% bitrate reduction for a 10% slowdown.

p0nce commented 1 year ago

Can push it further by having a different predictor for first pixel in each row.

TOTAL decode mpps encode mpps bit-per-pixel 145.97 97.22 7.93607

TOTAL time = 2.74237 secs

p0nce commented 1 year ago

With a few obvious optimizations:

TOTAL decode mpps encode mpps bit-per-pixel 166.17 91.49 7.93607

TOTAL time = 2.68148 secs

p0nce commented 1 year ago