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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file, 2 obsolete files)

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: nobody → sotaro.ikeda.g
Version: 49 Branch → Trunk
Blocks: 1210357
Attached patch patch - Update YuvConstants of BT.709 YUV (obsolete) (deleted) — Splinter Review
Attachment #8793261 - Flags: review?(jmuizelaar)
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 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+
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.
Thanks!
Attached patch patch - Update YuvConstants of BT.709 YUV (obsolete) (deleted) — Splinter Review
Attachment #8793261 - Attachment is obsolete: true
Attachment #8795576 - Flags: review+
Update a comment.
Attachment #8795576 - Attachment is obsolete: true
Attachment #8795959 - Flags: review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Blocks: 1284803
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: