-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(DASH): Add video transfer characteristics. #1210
Conversation
Closing due to inactivity. If the author would like to continue this PR, they can reopen it (preferred) or start a new one (if needed). |
The robot is not smart enough to recognize new commits as activity. I'll update it soon. Reopening the PR. |
packager/mpd/base/mpd_utils.cc
Outdated
@@ -162,6 +162,16 @@ std::string GetAdaptationSetKey(const MediaInfo& media_info, | |||
if (!ignore_codec) { | |||
key.append(":"); | |||
key.append(GetBaseCodec(media_info)); | |||
|
|||
if (media_info.video_info().has_transfer_characteristics()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sr1990, I added a comment to the Dolby section of this, and made it so that explicit transfer characteristics take priority over the assumption of PQ for Dolby. Please take a look, and let me know if you agree.
packager/mpd/base/period.cc
Outdated
// - Common CCIP values. | ||
// Dolby vision: | ||
// https://professionalsupport.dolby.com/s/article/How-to-signal-Dolby-Vision-in-MPEG-DASH | ||
if (media_info.video_info().has_transfer_characteristics()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sr1990, I made the same change here. Please take a look.
@sr1990, I will merge this if you approve of my edits. If not, we can discuss it further. Thanks! |
My change caused a test failure where the golden output changed from transfer characteristics of 16 to 2. Why is that? |
@joeyparrish Thanks for reviewing. Found https://developer.apple.com/av-foundation/High-Dynamic-Range-Metadata-for-Apple-Devices.pdf which mentions that for DV Profile 5: Looks like HLS's GetVideoRange method was written based on the above reasoning.
I think we should give the codec string higher priority over transfer characteristics in case of Dolby. What do you think? |
Okay, then this is a peculiarity of Dolby, and Dolby codec strings really should have higher priority. But we should add a comment to the code in those places to explain it, because it's not at all obvious. I suggest something like: // Apple's docs for DV profile 5 state: "Color Transfer Function Index shall
// be set to 2 (Unspecified) in the colr atom." So we can't trust the colr
// atom for Dolby inputs, and must set the transfer function based on the
// codec string alone. |
@joeyparrish Sounds good. Right now we are getting the transfer characteristics from SPS VUI and not colr atom. Looks like #1205 and #1251 are working on reading and writing the colr atom. For adding the colr box for dolby p5 content, in
|
@joeyparrish, based on conversation at #1255
I think we should keep the original code and add the above comment w/o writing the colr atom. |
Sounds good. |
This reverts commit 77fbcb16d25e69439b0ead6a4aaab29219a08536.
This reverts commit 00f2890566b71c4c143bccbc3c37e8da1a1f8d23.
This reverts commit 783f70b8a114fa7af81e417795b3ea2cba2bdcbe.
This reverts commit c5a6009c03188e393e6ada0f5bb61da10b57f27e.
413c945
to
9f44b11
Compare
Updated. |
@sr1990, thank you for your patience and persistence! |
This PR is related to #1035