Closed
Bug 1304330
Opened 8 years ago
Closed 8 years ago
BT.709 YUV to RGB of libyuv seems not correct
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
I faced this during Bug 1210357. libyuv::H420ToARGB() result seemed not correct.
The formula in the following seems not correct.
https://dxr.mozilla.org/mozilla-central/source/media/libyuv/source/row_common.cc#1145
But libyuv master is still same.
https://chromium.googlesource.com/libyuv/libyuv/+/master/source/row_common.cc#1145
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → sotaro.ikeda.g
Version: 49 Branch → Trunk
Assignee | ||
Comment 1•8 years ago
|
||
The chromium source of the followings use different calculation than comment 0.
https://chromium.googlesource.com/chromium/src.git/+/master/media/base/yuv_convert.cc#298
https://chromium.googlesource.com/chromium/src.git/+/master/cc/output/gl_renderer.cc#2347
The following is referenced from the yuv_convert.cc.
http://www.equasys.de/colorconversion.html
Assignee | ||
Comment 2•8 years ago
|
||
Assignee | ||
Comment 3•8 years ago
|
||
attachment 8793261 [details] [diff] [review] mimics "BT.601 YUV to RGB reference".
https://dxr.mozilla.org/mozilla-central/source/media/libyuv/source/row_common.cc#971
Assignee | ||
Updated•8 years ago
|
Attachment #8793261 -
Flags: review?(jmuizelaar)
Comment 4•8 years ago
|
||
Comment on attachment 8793261 [details] [diff] [review]
patch - Update YuvConstants of BT.709 YUV
Review of attachment 8793261 [details] [diff] [review]:
-----------------------------------------------------------------
Randal is probably a more appropriate reviewer than me.
Attachment #8793261 -
Flags: review?(jmuizelaar) → review?(rjesup)
Comment 5•8 years ago
|
||
Comment on attachment 8793261 [details] [diff] [review]
patch - Update YuvConstants of BT.709 YUV
Review of attachment 8793261 [details] [diff] [review]:
-----------------------------------------------------------------
Please file and issue and patch for upstream as well. Thanks!
Attachment #8793261 -
Flags: review?(rjesup) → review+
Assignee | ||
Comment 6•8 years ago
|
||
Opened the issues https://bugs.chromium.org/p/libyuv/issues/detail?id=639
Comment 7•8 years ago
|
||
The difference comes from full range vs constrained range.
Looking into the chromium media code (which I wrote), they choose to do constrained range BT709. erg. Can't we move forward to a good colorspace?!
Internally its implemented via a matrix, so you could define a custom matrix and call the low levels.
But I agree we should update the constants to match.
Your patch only updated the constants for YUV to RGB, but not RGB to YUV. So the unittests fail. I'll follow up in the libyuv bug report.
Assignee | ||
Comment 8•8 years ago
|
||
Thanks!
Assignee | ||
Comment 9•8 years ago
|
||
Apply the comment in https://bugs.chromium.org/p/libyuv/issues/detail?id=639.
Attachment #8793261 -
Attachment is obsolete: true
Attachment #8795576 -
Flags: review+
Assignee | ||
Comment 10•8 years ago
|
||
Update a comment.
Attachment #8795576 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8795959 -
Flags: review+
Assignee | ||
Comment 11•8 years ago
|
||
The problem was fixed in libyuv.
https://chromium.googlesource.com/libyuv/libyuv/+/c11e9b7fb7c03f3480e43faa9a906aba48fec466%5E!/
Comment 12•8 years ago
|
||
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c15a77349bc7
Update YuvConstants of BT.709 YUV r=jesup
Comment 13•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Assignee | ||
Updated•8 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•