Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Trying to understand context coding #3

@exilef

Description

@exilef

Hi Christoph, I was trying to understand how IZ does its magic and stumbled upon the code in table.cpp that I found interesting and struggle to understand completely.

I understood that you use CONTEXT_BITS = 4 to store the integer values 0..8 (so CONTEXT_COUNT = 9) that encode how many bits are used to code each color channel of a given pixel.

But what I struggle to understand is the meaning of MAX_CODE_LENGTH = 6, and how are the entries of staticdCount are chosen and then used to calculate the entries of staticdBits (for encoding) and decodeTable (for decoding). I figured out that you code the current context depending on the last one, but why and how exactly is this done?

Is this a standard approach that I am not aware of? Or have you explained the idea somewhere else?

Any further information is appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions