Skip to content

vqa: fix cinematic comparison tool — _read_png_rgb PNG filter handling - #230

Merged
hughobrien merged 1 commit into
masterfrom
fix-vqa-png-reader
May 18, 2026
Merged

vqa: fix cinematic comparison tool — _read_png_rgb PNG filter handling#230
hughobrien merged 1 commit into
masterfrom
fix-vqa-png-reader

Conversation

@hughobrien

Copy link
Copy Markdown
Owner

The _read_png_rgb function in scripts/cinematic-compare.py never applied PNG reconstruction filters (Sub/Up/Average/Paeth). For filter types 3 and 4 it also skipped the first bpp bytes per row.

This caused all 8 cinematic VQA comparisons to fail with p99=244 when the decoder was actually pixel-perfect (p99=0 after fix).

…NG filters

The _read_png_rgb function in scripts/cinematic-compare.py read only the
first bpp bytes of each row correctly. For filter types 3 (Average) and
4 (Paeth), it skipped the first pixel, producing corrupted pixel data
that made the VQA decoder look like it was failing (p99=244 vs ground
truth). All 8 cinematic VQAs now pass with p99=0.

Also fixed: the function never applied Sub/Up/Average/Paeth reconstruction
filters. Bytes 0-bpp were always left as literal for all filter types.
Now properly handles all 5 PNG filter types.
@hughobrien
hughobrien enabled auto-merge May 18, 2026 00:31
@hughobrien
hughobrien merged commit a95eb94 into master May 18, 2026
6 checks passed
@hughobrien
hughobrien deleted the fix-vqa-png-reader branch May 18, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant