phoboslab / qoi

The “Quite OK Image Format” for fast, lossless image compression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proposal to extend usage of [00 Index] OP-Code

zelosos opened this issue · comments

The OP_CODE_INDEX [00 index] is specified to only be used once. OP_CODE_RUN [11 run] should be used instead of OP_CODE_INDEX twice.
This leaves the option [00 ????] [00 ????] unsed.

I propose if the OP_CODE_INDEX [00 index] index is used twice it should be interpreted as a longer version of the index:
[00 Index1] [00 Index2]
with total_index = Index1 + Index2 concatenated. Thus a second hashtable would be used for that.

As an alternative [00 Index] [00 dr dg db] could be used to combine OP_CODE_INDEX with OP_CODE_DIFF for a single pixel.

In both cases O(n) would still apply to the algorithm.
Tests of the usefullness would be necassery.

commented

The spec is final. Check the README under the "Improvements..." header.

ok i am closing this issue then.