Traverse-Research / Traverse-Research/ispc-downsampler

Critically missing linearization

Open
#25 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
15
Forks
1
PR merge metrics
No merged PRs in 30d

Description

I briefly looked at the code and seems there is no linearization happening before downsampling. u8/channel color data will always have some gamma for obvious reasons.

I.e. the results of the downsampling using this crate are just always wrong (as there are no u16/f16 or f32 images supported where there is enough bits to store data linearly in the pixel buffer).

See http://www.ericbrasseur.org/gamma.html for a detailed explanation.

This is the test image from above website:
gamma_dalai_lama_gray

The expected result:
gamma_dalai_lama_gray_good

And what the code in this crate produces instead:
gamma_dalai_lama_gray_result

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the crate's downsampling path and compare its output with the linked gamma test image and expected result. Confirm how u8/channel data is handled before filtering; done means downsampling accounts for the missing linearization and produces the expected image.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.