]> git.sesse.net Git - movit/commit
Fix a double scaling issue in Y'CbCr conversion.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 13 Dec 2015 12:26:01 +0000 (13:26 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 13 Dec 2015 13:13:58 +0000 (14:13 +0100)
commitf71dd67f6a2abca2bb95eb3e0902f9fdcf8e8ed9
treeffb73881229679fa5e7de8b69381212cd1836e18
parent825c90789c229f502520bf0b665596d473f2636d
Fix a double scaling issue in Y'CbCr conversion.

We multiplied by 224/219 once too many, causing some small accuracy issues.
Furthermore, we also did this for full-range Y'CbCr, which obviously is wrong.
The issue was so small that the unit tests kept on passing (its investigation
was prompted by a test that failed on AMD cards, which is a separate issue).

After this, the Rec. 601 matrices match Wikipedia exactly, both for limited
and full range. Added unit tests for this.
ycbcr.cpp
ycbcr_input_test.cpp