PGS palette conversion clamps negative chroma

Open Beginner friendly
#85 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
swift

Research direction

Start by reading PDS.yCrCbToRGB and inspect Tests/Resources/ocr-samples.json as the benchmark reference. The issue identifies negative chroma clamping as the cause; verify the conversion against samples with negative chroma and compare OCR contrast after inversion. Done means those colors convert correctly and the benchmark results are checked before merging.

Written by the indexing model from the issue text.

Description

bug

PDS.yCrCbToRGB clamps Cr - 128 and Cb - 128 to >= 0, losing every color with negative chroma (yellow comes out whitish, etc.).

Fixing this changes the contrast OCR sees after inversion, so it should be benchmarked against Tests/Resources/ocr-samples.json before merging.

Dominant language
Swift
Stars
42
Forks
9
Avg merge
9h 30m
Merged PRs (30d)
4

Getting set up

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.

More from ecdye/macSubtitleOCR

All issues in ecdye/macSubtitleOCR

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.