Code Monkey home page Code Monkey logo

Comments (5)

p0nce avatar p0nce commented on August 26, 2024

Basically already beats PNG 16-bit, by virtue of loosing those 6 bits.

from gamut.

p0nce avatar p0nce commented on August 26, 2024

Some optimizations were done:

6 bit of table index
TOTAL  decode mpps   encode mpps      bit-per-pixel
             70.16         33.43           11.64738

8-bit of table index
TOTAL  decode mpps   encode mpps      bit-per-pixel
             68.56         34.16           11.43566

Adapt opcode for greyscale encoding, all opcode depends on number of encoding channels
TOTAL  decode mpps   encode mpps      bit-per-pixel
             74.37         33.33           10.91869

Remove OP_GREY for grey images
TOTAL  decode mpps   encode mpps      bit-per-pixel
             76.60         35.65           10.72299

Enable average prediction
TOTAL  decode mpps   encode mpps      bit-per-pixel
             73.05         35.13           10.56627

from gamut.

p0nce avatar p0nce commented on August 26, 2024

So the current details are:

*** image of size 3651.2 kb: test-images\10-bit images\bois-greyscale.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             64.82         38.17            8.24995        2112.0 kb     0.5784

*** image of size 3581.7 kb: test-images\10-bit images\bois.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             39.69         24.22           16.28629        1431.4 kb     0.3996

*** image of size 338.4 kb: test-images\10-bit images\depth.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
            300.96        100.65            0.87466         187.9 kb     0.5552

*** image of size 1206.3 kb: test-images\10-bit images\from8bit.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             27.84         17.97           21.89158        1050.8 kb     0.8711

*** image of size 7833.0 kb: test-images\10-bit images\glacier.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             52.11         31.38           11.61226        2972.7 kb     0.3795

*** image of size 1912.9 kb: test-images\10-bit images\Marble006_1K_Displacement.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             56.72         32.12           10.05904        1287.6 kb     0.6731

*** image of size 3762.5 kb: test-images\10-bit images\pisa.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             58.07         30.16           10.82508        2771.2 kb     0.7365

*** image of size 3.9 kb: test-images\10-bit images\pnggrad16rgb.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             48.51         27.42            0.14358           6.3 kb     1.6258

*** image of size 21.5 kb: test-images\10-bit images\pnggradHDrgba.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             56.04         34.84            0.07032          17.8 kb     0.8284

*** image of size 5082.8 kb: test-images\10-bit images\what.png
       decode mpps   encode mpps      bit-per-pixel        size        reduction
             25.73         14.37           25.64995        3283.2 kb     0.6459

TOTAL  decode mpps   encode mpps      bit-per-pixel
             73.05         35.13           10.56627

This is versus the PNG encoder in GIMP. QOI-10b can do better quite consistently, but it also drop from 16-bit to 10-bit so the task is easier.

from gamut.

p0nce avatar p0nce commented on August 26, 2024

it is entirely possible to optimize the opcode to have the right number of bits.
Speed can be increased by special casing reading and writing 2 bits at once, since everything can end up being split in groups of two bits.

from gamut.

p0nce avatar p0nce commented on August 26, 2024

Let's do a followup issue

from gamut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.