|
|
Created:
4 years, 10 months ago by servolk Modified:
4 years, 8 months ago Reviewers:
sandersd (OOO until July 31), piman, Alexei Svitkine (slow), no sievers, wolenetz, raymes, xhwang, ddorwin, DaleCurtis CC:
DaleCurtis, chromium-reviews, feature-media-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@parse-codec-id Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionImplemented parsing of HEVC codec ids
BUG=482761
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel
Committed: https://crrev.com/b36186ff03599c360e1c536f968aa7022105d3d0
Cr-Commit-Position: refs/heads/master@{#388827}
Patch Set 1 #Patch Set 2 : rebase #Patch Set 3 : wip #Patch Set 4 : rebase #Patch Set 5 : wip #Patch Set 6 : Added profile/level params #Patch Set 7 : rebase #Patch Set 8 : Update mojo video profiles #Patch Set 9 : buildfix #Patch Set 10 : Fixed unit test #
Total comments: 15
Patch Set 11 : Fixed enum values #Patch Set 12 : Restored enum value ordering #Patch Set 13 : Restored explicit enum value numbering in video_codecs.h #Patch Set 14 : Added new values to histograms.xml #Patch Set 15 : Added ppapi video profile values #Patch Set 16 : rebase #Patch Set 17 : Buildfix #Patch Set 18 : Updated comments about VideoCodecProfile enum #
Total comments: 15
Patch Set 19 : Reserved 4 profile values for VP9 profiles #
Total comments: 8
Patch Set 20 : CR feedback #Patch Set 21 : buildfixes #Patch Set 22 : rebase #Patch Set 23 : Better formatting in ppapi #
Total comments: 2
Patch Set 24 : Added vp9 reserved profiles to histograms.xml #
Total comments: 13
Patch Set 25 : rebase #Patch Set 26 : Rebase + remove PPAPI changes #
Total comments: 9
Patch Set 27 : Moved ParseHEVCCodecId invocation below ParseAVCCodecId #Patch Set 28 : rebase #Patch Set 29 : Set is_ambiguous to true for most HEVC codec ids #Patch Set 30 : buildfix #Patch Set 31 : Set is_ambiguous to false #
Total comments: 4
Patch Set 32 : rebase #Patch Set 33 : cr #Patch Set 34 : rebase #
Total comments: 6
Patch Set 35 : CR feedback (DCHECK, newline) #
Total comments: 2
Patch Set 36 : nit #
Total comments: 2
Patch Set 37 : Added a runtume check for number of element in HEVC codec id #
Total comments: 10
Patch Set 38 : Fixed handling of empty elements + added test cases with empty elements #
Total comments: 4
Messages
Total messages: 87 (15 generated)
Description was changed from ========== Implemented parsing of HEVC codec ids BUG=482761 ========== to ========== Implemented parsing of HEVC codec ids BUG=482761 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Implemented parsing of HEVC codec ids BUG=482761 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Implemented parsing of HEVC codec ids BUG=482761 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ==========
servolk@chromium.org changed reviewers: + ddorwin@chromium.org, sandersd@chromium.org, wolenetz@chromium.org
I only reviewed at a high level. https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, All other codecs follow this format: MIN FOO=MIN BAR MAX=BAR https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:61: HEVCPROFILE_MAIN_STILL_PICTURE, This is just an image right? Do you have plans to support it? Would it be supported in <video> or <img>? https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:81: MEDIA_EXPORT bool ParseHEVCCodecId(const std::string& codec_id, Why have these been moved from mime_util and exposed not just outside the internal.cc file but outside media.lib?
https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, On 2016/02/18 17:30:02, ddorwin wrote: > All other codecs follow this format: > MIN > FOO=MIN > BAR > MAX=BAR Done (I've also removed unnecessary explicit assignment of values for individual enum members, as currently changing this enum is quite painful, I think we should be ok with having static asserts to ensure the media::VideoCodecProfile enum values match mojo and gpu enums). https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:61: HEVCPROFILE_MAIN_STILL_PICTURE, On 2016/02/18 17:30:02, ddorwin wrote: > This is just an image right? Do you have plans to support it? Would it be > supported in <video> or <img>? Yes, this is a single video frame, i.e. essentially just an image, only encoded with the same compression techniques as video. According to the HEVC standard the 'main still picture' profile is a subset of the main profile, so at least in theory it should be automatically supported by the video element if it supports the main HEVC video profile. There's no immediate plans to support that for <img>. I'm mainly adding it here because 'main still picture' is one of the three v1 general profiles described in HEVC standard (https://www.itu.int/rec/T-REC-H.265) section A.3.1 There is also a bunch of format range extensions profiles described in section A.3.5, but I haven't yet looked into how to support those best, while this one is straightforward. https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:81: MEDIA_EXPORT bool ParseHEVCCodecId(const std::string& codec_id, On 2016/02/18 17:30:03, ddorwin wrote: > Why have these been moved from mime_util and exposed not just outside the > internal.cc file but outside media.lib? I've exposed them as media_export to make them accessible to third-party vendor code in chromecast. Re moving from mime_util - this file seemed like a more appropriate place for this, since it defines various video codec profiles and also deals with video codecs/profiles and their string representations. But I can move the parsing functions back to mime_util, if you think that would be a better place for this code.
dalecurtis, please see the discussions in https://codereview.chromium.org/1677133003/patch/180001/190007 https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, On 2016/02/18 19:16:20, servolk wrote: > On 2016/02/18 17:30:02, ddorwin wrote: > > All other codecs follow this format: > > MIN > > FOO=MIN > > BAR > > MAX=BAR > > Done (I've also removed unnecessary explicit assignment of values for individual > enum members, as currently changing this enum is quite painful, I think we > should be ok with having static asserts to ensure the media::VideoCodecProfile > enum values match mojo and gpu enums). +dalecurtis to confirm there are not any problems with this. https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:81: MEDIA_EXPORT bool ParseHEVCCodecId(const std::string& codec_id, On 2016/02/18 19:16:20, servolk wrote: > On 2016/02/18 17:30:03, ddorwin wrote: > > Why have these been moved from mime_util and exposed not just outside the > > internal.cc file but outside media.lib? > > I've exposed them as media_export to make them accessible to third-party vendor > code in chromecast. Re moving from mime_util - this file seemed like a more > appropriate place for this, since it defines various video codec profiles and > also deals with video codecs/profiles and their string representations. But I > can move the parsing functions back to mime_util, if you think that would be a > better place for this code. I'd like to understand more about that usage - not necessarily here. As previously discussed, having one parser is better than multiple, but my initial reactions is that: a) We shouldn't be passing such strings to third-party code, so it shouldn't be necessary for that. b) If it is for other reasons, it's strange that vendor code would need to do this and that they would rely on our code. I would also be concerned that they might then come to rely on bugs in our code, making it harder for us to fix them for all other platforms.
dalecurtis@chromium.org changed reviewers: + dalecurtis@chromium.org
https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, On 2016/02/18 21:52:22, ddorwin wrote: > On 2016/02/18 19:16:20, servolk wrote: > > On 2016/02/18 17:30:02, ddorwin wrote: > > > All other codecs follow this format: > > > MIN > > > FOO=MIN > > > BAR > > > MAX=BAR > > > > Done (I've also removed unnecessary explicit assignment of values for > individual > > enum members, as currently changing this enum is quite painful, I think we > > should be ok with having static asserts to ensure the media::VideoCodecProfile > > enum values match mojo and gpu enums). > > +dalecurtis to confirm there are not any problems with this. You can't do this since these are logged to UMA, they must be put on the end. They should also be protected by the build flag.
https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, On 2016/02/18 22:04:55, DaleCurtis wrote: > On 2016/02/18 21:52:22, ddorwin wrote: > > On 2016/02/18 19:16:20, servolk wrote: > > > On 2016/02/18 17:30:02, ddorwin wrote: > > > > All other codecs follow this format: > > > > MIN > > > > FOO=MIN > > > > BAR > > > > MAX=BAR > > > > > > Done (I've also removed unnecessary explicit assignment of values for > > individual > > > enum members, as currently changing this enum is quite painful, I think we > > > should be ok with having static asserts to ensure the > media::VideoCodecProfile > > > enum values match mojo and gpu enums). > > > > +dalecurtis to confirm there are not any problems with this. > > You can't do this since these are logged to UMA, they must be put on the end. > They should also be protected by the build flag. Ahh, thanks. I checked one of the other enums for the histogram note and didn't see it, but it is here (line 16). We should make it more prominent. Having these MIN and MAX values in an enum we can't change is problematic. If we decided to add an H264 profile or HEVC profile (as it sounds like servolk intends to in his comment below), we could not add it. We may need to refactor out these MIN/MAX and find another way to determine this.
https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, On 2016/02/18 22:04:55, DaleCurtis wrote: > On 2016/02/18 21:52:22, ddorwin wrote: > > On 2016/02/18 19:16:20, servolk wrote: > > > On 2016/02/18 17:30:02, ddorwin wrote: > > > > All other codecs follow this format: > > > > MIN > > > > FOO=MIN > > > > BAR > > > > MAX=BAR > > > > > > Done (I've also removed unnecessary explicit assignment of values for > > individual > > > enum members, as currently changing this enum is quite painful, I think we > > > should be ok with having static asserts to ensure the > media::VideoCodecProfile > > > enum values match mojo and gpu enums). > > > > +dalecurtis to confirm there are not any problems with this. > > You can't do this since these are logged to UMA, they must be put on the end. > They should also be protected by the build flag. Ok, I'll move the HEVC profiles after VP8/VP9, but are we absolutely sure that there's never gonna be more than one vp8/vp9 profile? If they ever introduce the concept of profiles, are we going to have them interspersed in this enum? https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:81: MEDIA_EXPORT bool ParseHEVCCodecId(const std::string& codec_id, On 2016/02/18 21:52:22, ddorwin wrote: > On 2016/02/18 19:16:20, servolk wrote: > > On 2016/02/18 17:30:03, ddorwin wrote: > > > Why have these been moved from mime_util and exposed not just outside the > > > internal.cc file but outside media.lib? > > > > I've exposed them as media_export to make them accessible to third-party > vendor > > code in chromecast. Re moving from mime_util - this file seemed like a more > > appropriate place for this, since it defines various video codec profiles and > > also deals with video codecs/profiles and their string representations. But I > > can move the parsing functions back to mime_util, if you think that would be a > > better place for this code. > > I'd like to understand more about that usage - not necessarily here. As > previously discussed, having one parser is better than multiple, but my initial > reactions is that: > a) We shouldn't be passing such strings to third-party code, so it shouldn't be > necessary for that. > b) If it is for other reasons, it's strange that vendor code would need to do > this and that they would rely on our code. I would also be concerned that they > might then come to rely on bugs in our code, making it harder for us to fix them > for all other platforms. Sure, we can probably move that discussion to a separate mail thread. But in short: currently Chromecast codec checks are done via string codec ids since, as I've explained before, the enums are simply not enough to express the richness of the information encoded in codec id string (all the various profiles/levels/tiers/etc). We are planning to keep working with you on getting to a common upstreamable solution that satisfies everybody, but we needed those codec checks to be done sooner rather than later, so I've created a couple of downstream CLs to unblock Chromecast development.
https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, On 2016/02/18 at 22:28:51, servolk wrote: > On 2016/02/18 22:04:55, DaleCurtis wrote: > > On 2016/02/18 21:52:22, ddorwin wrote: > > > On 2016/02/18 19:16:20, servolk wrote: > > > > On 2016/02/18 17:30:02, ddorwin wrote: > > > > > All other codecs follow this format: > > > > > MIN > > > > > FOO=MIN > > > > > BAR > > > > > MAX=BAR > > > > > > > > Done (I've also removed unnecessary explicit assignment of values for > > > individual > > > > enum members, as currently changing this enum is quite painful, I think we > > > > should be ok with having static asserts to ensure the > > media::VideoCodecProfile > > > > enum values match mojo and gpu enums). > > > > > > +dalecurtis to confirm there are not any problems with this. > > > > You can't do this since these are logged to UMA, they must be put on the end. > > They should also be protected by the build flag. > > Ok, I'll move the HEVC profiles after VP8/VP9, but are we absolutely sure that there's never gonna be more than one vp8/vp9 profile? If they ever introduce the concept of profiles, are we going to have them interspersed in this enum? Doesn't really matter if we're sure or not; these values are already logged to a histogram, so unless we want to create a new UMA stat, old values must remain the same.
https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, On 2016/02/19 23:15:17, DaleCurtis wrote: > On 2016/02/18 at 22:28:51, servolk wrote: > > On 2016/02/18 22:04:55, DaleCurtis wrote: > > > On 2016/02/18 21:52:22, ddorwin wrote: > > > > On 2016/02/18 19:16:20, servolk wrote: > > > > > On 2016/02/18 17:30:02, ddorwin wrote: > > > > > > All other codecs follow this format: > > > > > > MIN > > > > > > FOO=MIN > > > > > > BAR > > > > > > MAX=BAR > > > > > > > > > > Done (I've also removed unnecessary explicit assignment of values for > > > > individual > > > > > enum members, as currently changing this enum is quite painful, I think > we > > > > > should be ok with having static asserts to ensure the > > > media::VideoCodecProfile > > > > > enum values match mojo and gpu enums). > > > > > > > > +dalecurtis to confirm there are not any problems with this. > > > > > > You can't do this since these are logged to UMA, they must be put on the > end. > > > They should also be protected by the build flag. > > > > Ok, I'll move the HEVC profiles after VP8/VP9, but are we absolutely sure that > there's never gonna be more than one vp8/vp9 profile? If they ever introduce the > concept of profiles, are we going to have them interspersed in this enum? > > Doesn't really matter if we're sure or not; these values are already logged to a > histogram, so unless we want to create a new UMA stat, old values must remain > the same. Done (I've also restored the explicit value numbering in this enum, to ensure values don't ever change). Re guarding with a build flag - I think I've been told earlier that values in the enum that are reported to UMA shouldn't be guarded (e.g. take a look at VideoCodec::kCodecHEVC above - it's not protected by the buildflag).
https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... media/base/video_codecs.h:58: HEVCPROFILE_MAIN, On 2016/02/19 23:47:55, servolk wrote: > On 2016/02/19 23:15:17, DaleCurtis wrote: > > On 2016/02/18 at 22:28:51, servolk wrote: > > > On 2016/02/18 22:04:55, DaleCurtis wrote: > > > > On 2016/02/18 21:52:22, ddorwin wrote: > > > > > On 2016/02/18 19:16:20, servolk wrote: > > > > > > On 2016/02/18 17:30:02, ddorwin wrote: > > > > > > > All other codecs follow this format: > > > > > > > MIN > > > > > > > FOO=MIN > > > > > > > BAR > > > > > > > MAX=BAR > > > > > > > > > > > > Done (I've also removed unnecessary explicit assignment of values for > > > > > individual > > > > > > enum members, as currently changing this enum is quite painful, I > think > > we > > > > > > should be ok with having static asserts to ensure the > > > > media::VideoCodecProfile > > > > > > enum values match mojo and gpu enums). > > > > > > > > > > +dalecurtis to confirm there are not any problems with this. > > > > > > > > You can't do this since these are logged to UMA, they must be put on the > > end. > > > > They should also be protected by the build flag. > > > > > > Ok, I'll move the HEVC profiles after VP8/VP9, but are we absolutely sure > that > > there's never gonna be more than one vp8/vp9 profile? If they ever introduce > the > > concept of profiles, are we going to have them interspersed in this enum? > > > > Doesn't really matter if we're sure or not; these values are already logged to > a > > histogram, so unless we want to create a new UMA stat, old values must remain > > the same. > > Done (I've also restored the explicit value numbering in this enum, to ensure > values don't ever change). > Re guarding with a build flag - I think I've been told earlier that values in > the enum that are reported to UMA shouldn't be guarded (e.g. take a look at > VideoCodec::kCodecHEVC above - it's not protected by the buildflag). Btw, I've also just noticed that there's a mismatch between these values and PPAPI values (despite the comments at lines 36-38 above). https://bugs.chromium.org/p/chromium/issues/detail?id=588336
On 2016/02/19 23:57:31, servolk wrote: > https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codecs.h > File media/base/video_codecs.h (right): > > https://codereview.chromium.org/1677133003/diff/180001/media/base/video_codec... > media/base/video_codecs.h:58: HEVCPROFILE_MAIN, > On 2016/02/19 23:47:55, servolk wrote: > > On 2016/02/19 23:15:17, DaleCurtis wrote: > > > On 2016/02/18 at 22:28:51, servolk wrote: > > > > On 2016/02/18 22:04:55, DaleCurtis wrote: > > > > > On 2016/02/18 21:52:22, ddorwin wrote: > > > > > > On 2016/02/18 19:16:20, servolk wrote: > > > > > > > On 2016/02/18 17:30:02, ddorwin wrote: > > > > > > > > All other codecs follow this format: > > > > > > > > MIN > > > > > > > > FOO=MIN > > > > > > > > BAR > > > > > > > > MAX=BAR > > > > > > > > > > > > > > Done (I've also removed unnecessary explicit assignment of values > for > > > > > > individual > > > > > > > enum members, as currently changing this enum is quite painful, I > > think > > > we > > > > > > > should be ok with having static asserts to ensure the > > > > > media::VideoCodecProfile > > > > > > > enum values match mojo and gpu enums). > > > > > > > > > > > > +dalecurtis to confirm there are not any problems with this. > > > > > > > > > > You can't do this since these are logged to UMA, they must be put on the > > > end. > > > > > They should also be protected by the build flag. > > > > > > > > Ok, I'll move the HEVC profiles after VP8/VP9, but are we absolutely sure > > that > > > there's never gonna be more than one vp8/vp9 profile? If they ever introduce > > the > > > concept of profiles, are we going to have them interspersed in this enum? > > > > > > Doesn't really matter if we're sure or not; these values are already logged > to > > a > > > histogram, so unless we want to create a new UMA stat, old values must > remain > > > the same. > > > > Done (I've also restored the explicit value numbering in this enum, to ensure > > values don't ever change). > > Re guarding with a build flag - I think I've been told earlier that values in > > the enum that are reported to UMA shouldn't be guarded (e.g. take a look at > > VideoCodec::kCodecHEVC above - it's not protected by the buildflag). > > Btw, I've also just noticed that there's a mismatch between these values and > PPAPI values (despite the comments at lines 36-38 above). > https://bugs.chromium.org/p/chromium/issues/detail?id=588336 ping
dalecurtis: Should we reserve UMA values for VP9 profiles and potentially other HEVC profiles? servolk: Please specify who you intend to review what. Pick one person to review the entire thing in detail. Dale and I will continue the discussions we've been having. https://codereview.chromium.org/1677133003/diff/330001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/330001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:43: H264PROFILE_MAIN, If this must match, shouldn't we leave the literals? https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codec... media/base/video_codecs.h:40: // NOTE: These values are histogrammed over time in UMA so the values must Since this note is so important, I would put it first and maybe offset it somehow https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codec... media/base/video_codecs.h:65: VP9PROFILE_ANY = VP9PROFILE_MIN, Should we reserve 3 or 4 values for VP9 profiles? https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codec... media/base/video_codecs.h:70: HEVCPROFILE_MAIN_STILL_PICTURE = 15, If you plan to add other HEVC profiles, should we reserve some space? https://codereview.chromium.org/1677133003/diff/330001/media/mojo/interfaces/... File media/mojo/interfaces/media_types.mojom (right): https://codereview.chromium.org/1677133003/diff/330001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:151: H264PROFILE_MAIN, ditto https://codereview.chromium.org/1677133003/diff/330001/ppapi/api/dev/pp_video... File ppapi/api/dev/pp_video_dev.idl (right): https://codereview.chromium.org/1677133003/diff/330001/ppapi/api/dev/pp_video... ppapi/api/dev/pp_video_dev.idl:37: PP_VIDEODECODER_HEVCPROFILE_MAIN = 14, Does it matter that we have no plans to support certain codecs from Pepper (because Pepper is not supported on platforms that support them)? https://codereview.chromium.org/1677133003/diff/330001/ppapi/c/dev/pp_video_d... File ppapi/c/dev/pp_video_dev.h (right): https://codereview.chromium.org/1677133003/diff/330001/ppapi/c/dev/pp_video_d... ppapi/c/dev/pp_video_dev.h:6: /* From dev/pp_video_dev.idl modified Tue Apr 30 14:58:38 2013. */ This should have been generated, not manually edited. https://codereview.chromium.org/1677133003/diff/330001/tools/metrics/histogra... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1677133003/diff/330001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:82150: + <int value="13" label="HEVC Main"/> See comment about reserving values.
Do we really care about alphabetical order that much? Or are there pieces of code that are doing range based comparisons?
On 2016/02/26 19:29:18, DaleCurtis wrote: > Do we really care about alphabetical order that much? Or are there pieces of > code that are doing range based comparisons? VideoCodecProfile has _MIN and _MAX values that are used in comparisons. We could refactor to avoid this.
Yeah, for example for VP9 we have range checks in a couple of places: https://code.google.com/p/chromium/codesearch#chromium/src/content/common/gpu... https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/p... But it's easy to change to an explicit function (e.g. IsVP9Profile) if we choose to. On Fri, Feb 26, 2016 at 11:48 AM, <ddorwin@chromium.org> wrote: > On 2016/02/26 19:29:18, DaleCurtis wrote: > > Do we really care about alphabetical order that much? Or are there > pieces of > > code that are doing range based comparisons? > > VideoCodecProfile has _MIN and _MAX values that are used in comparisons. We > could refactor to avoid this. > > https://codereview.chromium.org/1677133003/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
https://codereview.chromium.org/1677133003/diff/330001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/330001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:43: H264PROFILE_MAIN, On 2016/02/26 18:54:17, ddorwin wrote: > If this must match, shouldn't we leave the literals? I think that's redundant. Values in this enum must match media::VideoProfile, but AFAIK there's no direct requirement for the values here to remain unchanged, since they are not logged into UMA. So I think it's sufficient to have just static asserts for ensuring values match the media::VideoProfile and have a single source of truth in media::VideoProfile with explicitly specified values. https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codec... media/base/video_codecs.h:65: VP9PROFILE_ANY = VP9PROFILE_MIN, On 2016/02/26 18:54:17, ddorwin wrote: > Should we reserve 3 or 4 values for VP9 profiles? Yeah, I think we probably should. According to wikipedia vp9 has 4 profiles (although there's a full byte for encoding profile value in the bitstream, so at least in theory there could be more added later, but I hope VP9 is pretty stable now and not gonna change much anymore, new development is gonna happen in VP10). https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codec... media/base/video_codecs.h:70: HEVCPROFILE_MAIN_STILL_PICTURE = 15, On 2016/02/26 18:54:17, ddorwin wrote: > If you plan to add other HEVC profiles, should we reserve some space? Currently (and I don't expect that to change for a while) HEVC is the last codec anyway, so we don't need to reserve any space, although we could, I guess. https://codereview.chromium.org/1677133003/diff/330001/ppapi/api/dev/pp_video... File ppapi/api/dev/pp_video_dev.idl (right): https://codereview.chromium.org/1677133003/diff/330001/ppapi/api/dev/pp_video... ppapi/api/dev/pp_video_dev.idl:37: PP_VIDEODECODER_HEVCPROFILE_MAIN = 14, On 2016/02/26 18:54:17, ddorwin wrote: > Does it matter that we have no plans to support certain codecs from Pepper > (because Pepper is not supported on platforms that support them)? I think that doesn't matter, as that can easily change in the future (we actually have limited support for Pepper on Chromecast now), and I don't see any downsides in having these values accessible in Pepper.
Ah, yeah I forgot about those, reserving a couple sgtm.
servolk@chromium.org changed reviewers: - dalecurtis@chromium.org
https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/330001/media/base/video_codec... media/base/video_codecs.h:65: VP9PROFILE_ANY = VP9PROFILE_MIN, On 2016/02/26 18:54:17, ddorwin wrote: > Should we reserve 3 or 4 values for VP9 profiles? Done. https://codereview.chromium.org/1677133003/diff/330001/ppapi/c/dev/pp_video_d... File ppapi/c/dev/pp_video_dev.h (right): https://codereview.chromium.org/1677133003/diff/330001/ppapi/c/dev/pp_video_d... ppapi/c/dev/pp_video_dev.h:6: /* From dev/pp_video_dev.idl modified Tue Apr 30 14:58:38 2013. */ On 2016/02/26 18:54:17, ddorwin wrote: > This should have been generated, not manually edited. Ok, I've re-ran the PPAPI generator, but it looks like nobody has ran it in a while, it generated changes in more than ~30 files besides this one! For now I've added only changes in this file into my CL, to avoid accidentally breaking something else. https://codereview.chromium.org/1677133003/diff/330001/tools/metrics/histogra... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1677133003/diff/330001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:82150: + <int value="13" label="HEVC Main"/> On 2016/02/26 18:54:17, ddorwin wrote: > See comment about reserving values. Done.
https://codereview.chromium.org/1677133003/diff/350001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/350001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = 16, This needs to be relative since it's very difficult to say whether this is correct without literals for the other values. IOW: VP9PROFILE_ANY + 4 https://codereview.chromium.org/1677133003/diff/350001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/350001/media/base/video_codec... media/base/video_codecs.h:67: // 4 profile values are reserved for VP9 profiles. ditto https://codereview.chromium.org/1677133003/diff/350001/media/mojo/interfaces/... File media/mojo/interfaces/media_types.mojom (right): https://codereview.chromium.org/1677133003/diff/350001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:169: HEVCPROFILE_MIN = 16, ditto https://codereview.chromium.org/1677133003/diff/350001/tools/metrics/histogra... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1677133003/diff/350001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:82476: + Remove the empty line?
https://codereview.chromium.org/1677133003/diff/350001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/350001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = 16, On 2016/02/26 22:29:32, ddorwin wrote: > This needs to be relative since it's very difficult to say whether this is > correct without literals for the other values. > IOW: VP9PROFILE_ANY + 4 Done. https://codereview.chromium.org/1677133003/diff/350001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/350001/media/base/video_codec... media/base/video_codecs.h:67: // 4 profile values are reserved for VP9 profiles. On 2016/02/26 22:29:32, ddorwin wrote: > ditto Done. https://codereview.chromium.org/1677133003/diff/350001/media/mojo/interfaces/... File media/mojo/interfaces/media_types.mojom (right): https://codereview.chromium.org/1677133003/diff/350001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:169: HEVCPROFILE_MIN = 16, On 2016/02/26 22:29:32, ddorwin wrote: > ditto Done. https://codereview.chromium.org/1677133003/diff/350001/tools/metrics/histogra... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1677133003/diff/350001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:82476: + On 2016/02/26 22:29:32, ddorwin wrote: > Remove the empty line? That's how tools/metrics/histograms/pretty_print.py formatted it and it will complain in presubmit phase if the empty line is removed.
On 2016/02/26 22:56:06, servolk wrote: > https://codereview.chromium.org/1677133003/diff/350001/gpu/config/gpu_info.h > File gpu/config/gpu_info.h (right): > > https://codereview.chromium.org/1677133003/diff/350001/gpu/config/gpu_info.h#... > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = 16, > On 2016/02/26 22:29:32, ddorwin wrote: > > This needs to be relative since it's very difficult to say whether this is > > correct without literals for the other values. > > IOW: VP9PROFILE_ANY + 4 > > Done. > > https://codereview.chromium.org/1677133003/diff/350001/media/base/video_codecs.h > File media/base/video_codecs.h (right): > > https://codereview.chromium.org/1677133003/diff/350001/media/base/video_codec... > media/base/video_codecs.h:67: // 4 profile values are reserved for VP9 profiles. > On 2016/02/26 22:29:32, ddorwin wrote: > > ditto > > Done. > > https://codereview.chromium.org/1677133003/diff/350001/media/mojo/interfaces/... > File media/mojo/interfaces/media_types.mojom (right): > > https://codereview.chromium.org/1677133003/diff/350001/media/mojo/interfaces/... > media/mojo/interfaces/media_types.mojom:169: HEVCPROFILE_MIN = 16, > On 2016/02/26 22:29:32, ddorwin wrote: > > ditto > > Done. > > https://codereview.chromium.org/1677133003/diff/350001/tools/metrics/histogra... > File tools/metrics/histograms/histograms.xml (right): > > https://codereview.chromium.org/1677133003/diff/350001/tools/metrics/histogra... > tools/metrics/histograms/histograms.xml:82476: + > On 2016/02/26 22:29:32, ddorwin wrote: > > Remove the empty line? > > That's how tools/metrics/histograms/pretty_print.py formatted it and it will > complain in presubmit phase if the empty line is removed. ping
servolk@chromium.org changed reviewers: + asvitkine@chromium.org, raymes@chromium.org, sievers@chromium.org
On 2016/03/01 02:10:48, servolk wrote: > On 2016/02/26 22:56:06, servolk wrote: > > https://codereview.chromium.org/1677133003/diff/350001/gpu/config/gpu_info.h > > File gpu/config/gpu_info.h (right): > > > > > https://codereview.chromium.org/1677133003/diff/350001/gpu/config/gpu_info.h#... > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = 16, > > On 2016/02/26 22:29:32, ddorwin wrote: > > > This needs to be relative since it's very difficult to say whether this is > > > correct without literals for the other values. > > > IOW: VP9PROFILE_ANY + 4 > > > > Done. > > > > > https://codereview.chromium.org/1677133003/diff/350001/media/base/video_codecs.h > > File media/base/video_codecs.h (right): > > > > > https://codereview.chromium.org/1677133003/diff/350001/media/base/video_codec... > > media/base/video_codecs.h:67: // 4 profile values are reserved for VP9 > profiles. > > On 2016/02/26 22:29:32, ddorwin wrote: > > > ditto > > > > Done. > > > > > https://codereview.chromium.org/1677133003/diff/350001/media/mojo/interfaces/... > > File media/mojo/interfaces/media_types.mojom (right): > > > > > https://codereview.chromium.org/1677133003/diff/350001/media/mojo/interfaces/... > > media/mojo/interfaces/media_types.mojom:169: HEVCPROFILE_MIN = 16, > > On 2016/02/26 22:29:32, ddorwin wrote: > > > ditto > > > > Done. > > > > > https://codereview.chromium.org/1677133003/diff/350001/tools/metrics/histogra... > > File tools/metrics/histograms/histograms.xml (right): > > > > > https://codereview.chromium.org/1677133003/diff/350001/tools/metrics/histogra... > > tools/metrics/histograms/histograms.xml:82476: + > > On 2016/02/26 22:29:32, ddorwin wrote: > > > Remove the empty line? > > > > That's how tools/metrics/histograms/pretty_print.py formatted it and it will > > complain in presubmit phase if the empty line is removed. > > ping + asvitkine@ for tools/metrics/histograms/histograms.xml + sievers@ for gpu/config/gpu_info.h + raymes@ for ppapi/ and content/renderer/pepper/ppb_video_decoder_impl.cc
lgtm https://codereview.chromium.org/1677133003/diff/430001/tools/metrics/histogra... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1677133003/diff/430001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:82807: +<!-- 4 profile values are reserved for VP9 profiles, --> Nit: Instead of a comment, I'd just add the entries here and mention "(reserved for vp9)" in the label.
https://codereview.chromium.org/1677133003/diff/430001/tools/metrics/histogra... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1677133003/diff/430001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:82807: +<!-- 4 profile values are reserved for VP9 profiles, --> On 2016/03/01 15:30:34, Alexei Svitkine (slow) wrote: > Nit: Instead of a comment, I'd just add the entries here and mention "(reserved > for vp9)" in the label. Done.
ppapi lgtm but please wait for the main reviewer for this CL (it's a bit unclear who that is?)
https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 Just remove the 16 entirely. It could rot (although that is more unlikely in this case. https://codereview.chromium.org/1677133003/diff/450001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/450001/media/base/video_codec... media/base/video_codecs.h:68: HEVCPROFILE_MIN = VP9PROFILE_ANY + 4, //=16 ditto https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... File media/mojo/interfaces/media_types.mojom (right): https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:151: H264PROFILE_MAIN, Since this is a MOJO API definition, I wonder whether values are allowed to change. It seems we have a mix. I wonder why. https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:169: HEVCPROFILE_MIN = 16, not done. There are no other literals here.
https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 On 2016/03/02 01:36:38, ddorwin wrote: > Just remove the 16 entirely. It could rot (although that is more unlikely in > this case. I'm starting to think that maybe it would be best to just add the 4 VP9 profiles in various enum already, even if they are going to be just reserved, but unused for now (kinda like I did in histograms.xml per asvitkine@ suggestion). WDYT? https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... File media/mojo/interfaces/media_types.mojom (right): https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:151: H264PROFILE_MAIN, On 2016/03/02 01:36:38, ddorwin wrote: > Since this is a MOJO API definition, I wonder whether values are allowed to > change. It seems we have a mix. I wonder why. Is there a requirement that constants never change in Mojo API? I assumed Mojo values might change, although of course that would make it necessary to rebuild also clients that use this .mojom file. https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:169: HEVCPROFILE_MIN = 16, On 2016/03/02 01:36:38, ddorwin wrote: > not done. There are no other literals here. I think this is the best we can do. I've tried to have HEVCPROFILE_MIN = VP9PROFILE_ANY + 4 here in patchset #20. But that caused a number of build failures. Apparently mojom files don't allow expressions, so I've changed this to an explicit value for now. Here is the build error from PS #20: FAILED: python ../../mojo/public/tools/bindings/mojom_bindings_generator.py --use_bundled_pylibs generate ../../media/mojo/interfaces/renderer.mojom -d ../../ -I ../../ -o /b/build/slave/linux_clobber/build/src/out/Release/gen --bytecode_path /b/build/slave/linux_clobber/build/src/out/Release/gen/mojo/public/tools/bindings -g c++,javascript,java ../../media/mojo/interfaces/media_types.mojom:169: Error: Unexpected '+': HEVCPROFILE_MIN = VP9PROFILE_ANY + 4, //=16
xhwang@chromium.org changed reviewers: + xhwang@chromium.org
https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... File media/mojo/interfaces/media_types.mojom (right): https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:151: H264PROFILE_MAIN, On 2016/03/02 01:47:45, servolk wrote: > On 2016/03/02 01:36:38, ddorwin wrote: > > Since this is a MOJO API definition, I wonder whether values are allowed to > > change. It seems we have a mix. I wonder why. > > Is there a requirement that constants never change in Mojo API? I assumed Mojo > values might change, although of course that would make it necessary to rebuild > also clients that use this .mojom file. At this point mojo is pretty much just a transport layer to replace the hassle of IPC. The mojo media app is shipped within Chrome and is not a standalone binary, so we can change these constants freely. This may not be true in the future where the mojo media app (or some other app that uses this) becomes a separate binary.
sandersd and dalecurtis: What are your thoughts on whether VP9PROFILE_ANY would be the same as profile 0 and whether to define these values now? https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 On 2016/03/02 01:47:45, servolk wrote: > On 2016/03/02 01:36:38, ddorwin wrote: > > Just remove the 16 entirely. It could rot (although that is more unlikely in > > this case. > > I'm starting to think that maybe it would be best to just add the 4 VP9 profiles > in various enum already, even if they are going to be just reserved, but unused > for now (kinda like I did in histograms.xml per asvitkine@ suggestion). WDYT? I'm hesitant to define things we don't use, though +4 is also weird. I also wonder whether we would want ANY to be separate from PROFILE0. That might vary based on the API. Perhaps sandersd or dalecurtis@ have thoughts. https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... File media/mojo/interfaces/media_types.mojom (right): https://codereview.chromium.org/1677133003/diff/450001/media/mojo/interfaces/... media/mojo/interfaces/media_types.mojom:169: HEVCPROFILE_MIN = 16, On 2016/03/02 01:47:45, servolk wrote: > On 2016/03/02 01:36:38, ddorwin wrote: > > not done. There are no other literals here. > > I think this is the best we can do. I've tried to have HEVCPROFILE_MIN = > VP9PROFILE_ANY + 4 here in patchset #20. But that caused a number of build > failures. Apparently mojom files don't allow expressions, so I've changed this > to an explicit value for now. > > Here is the build error from PS #20: > FAILED: python ../../mojo/public/tools/bindings/mojom_bindings_generator.py > --use_bundled_pylibs generate ../../media/mojo/interfaces/renderer.mojom -d > ../../ -I ../../ -o /b/build/slave/linux_clobber/build/src/out/Release/gen > --bytecode_path > /b/build/slave/linux_clobber/build/src/out/Release/gen/mojo/public/tools/bindings > -g c++,javascript,java > ../../media/mojo/interfaces/media_types.mojom:169: Error: Unexpected '+': > HEVCPROFILE_MIN = VP9PROFILE_ANY + 4, //=16 Longshot - does it work if you use parentheses? That looks like a tooling bug. I suggest filing a bug in the Internals>Mojo component. For now, we can define RESERVED1-4 and add a comment referencing that bug.
dalecurtis@chromium.org changed reviewers: + dalecurtis@chromium.org
https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 On 2016/03/03 at 22:00:21, ddorwin wrote: > On 2016/03/02 01:47:45, servolk wrote: > > On 2016/03/02 01:36:38, ddorwin wrote: > > > Just remove the 16 entirely. It could rot (although that is more unlikely in > > > this case. > > > > I'm starting to think that maybe it would be best to just add the 4 VP9 profiles > > in various enum already, even if they are going to be just reserved, but unused > > for now (kinda like I did in histograms.xml per asvitkine@ suggestion). WDYT? > > I'm hesitant to define things we don't use, though +4 is also weird. I also wonder whether we would want ANY to be separate from PROFILE0. That might vary based on the API. > > Perhaps sandersd or dalecurtis@ have thoughts. Sergey, you say "the 4 VP9 profiles" above. Do we know those are set in stone? Or did you just make that value up? Does the vp9 team have any insight for us? If those are legit, I'm fine with adding them here now and removing the _ANY designator in place of MIN/MAX variants if endpoints don't want to check the values explicitly.
On 2016/03/03 22:05:32, DaleCurtis wrote: > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > File gpu/config/gpu_info.h (right): > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 > On 2016/03/03 at 22:00:21, ddorwin wrote: > > On 2016/03/02 01:47:45, servolk wrote: > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > Just remove the 16 entirely. It could rot (although that is more unlikely > in > > > > this case. > > > > > > I'm starting to think that maybe it would be best to just add the 4 VP9 > profiles > > > in various enum already, even if they are going to be just reserved, but > unused > > > for now (kinda like I did in histograms.xml per asvitkine@ suggestion). > WDYT? > > > > I'm hesitant to define things we don't use, though +4 is also weird. I also > wonder whether we would want ANY to be separate from PROFILE0. That might vary > based on the API. > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set in stone? > Or did you just make that value up? Does the vp9 team have any insight for us? > > If those are legit, I'm fine with adding them here now and removing the _ANY > designator in place of MIN/MAX variants if endpoints don't want to check the > values explicitly. Well, take a look at https://chromium.googlesource.com/webm/libvpx/+/master/vp9/common/vp9_enums.h#29 I guess it's not set in stone, and could potentially change at some point in the future, but if more profiles were added that would be a significant breaking change from API point of view, so I'd say it's very unlikely. I would expect such a change to be done in VP10, since it's in active development.
https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 On 2016/03/03 at 22:05:32, DaleCurtis wrote: > On 2016/03/03 at 22:00:21, ddorwin wrote: > > On 2016/03/02 01:47:45, servolk wrote: > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > Just remove the 16 entirely. It could rot (although that is more unlikely in > > > > this case. > > > > > > I'm starting to think that maybe it would be best to just add the 4 VP9 profiles > > > in various enum already, even if they are going to be just reserved, but unused > > > for now (kinda like I did in histograms.xml per asvitkine@ suggestion). WDYT? > > > > I'm hesitant to define things we don't use, though +4 is also weird. I also wonder whether we would want ANY to be separate from PROFILE0. That might vary based on the API. > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set in stone? Or did you just make that value up? Does the vp9 team have any insight for us? > > If those are legit, I'm fine with adding them here now and removing the _ANY designator in place of MIN/MAX variants if endpoints don't want to check the values explicitly. Thanks for the link. Lets just include those here then.
https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h File gpu/config/gpu_info.h (right): https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 On 2016/03/03 22:17:20, DaleCurtis wrote: > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > On 2016/03/02 01:47:45, servolk wrote: > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > Just remove the 16 entirely. It could rot (although that is more > unlikely in > > > > > this case. > > > > > > > > I'm starting to think that maybe it would be best to just add the 4 VP9 > profiles > > > > in various enum already, even if they are going to be just reserved, but > unused > > > > for now (kinda like I did in histograms.xml per asvitkine@ suggestion). > WDYT? > > > > > > I'm hesitant to define things we don't use, though +4 is also weird. I also > wonder whether we would want ANY to be separate from PROFILE0. That might vary > based on the API. > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set in stone? > Or did you just make that value up? Does the vp9 team have any insight for us? > > > > If those are legit, I'm fine with adding them here now and removing the _ANY > designator in place of MIN/MAX variants if endpoints don't want to check the > values explicitly. > > Thanks for the link. Lets just include those here then. VP9PROFILE_ANY appears 23 times [1]. We should probably add these as a separate CL and make sure we get the code correct. For example, some are just be the these definitions, but I worry about demuxers, etc. (i.e. webm_video_client.cc). [1] https://code.google.com/p/chromium/codesearch#search/&q=VP9PROFILE_ANY&sq=pac...
On 2016/03/03 22:17:20, DaleCurtis wrote: > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > File gpu/config/gpu_info.h (right): > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > On 2016/03/02 01:47:45, servolk wrote: > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > Just remove the 16 entirely. It could rot (although that is more > unlikely in > > > > > this case. > > > > > > > > I'm starting to think that maybe it would be best to just add the 4 VP9 > profiles > > > > in various enum already, even if they are going to be just reserved, but > unused > > > > for now (kinda like I did in histograms.xml per asvitkine@ suggestion). > WDYT? > > > > > > I'm hesitant to define things we don't use, though +4 is also weird. I also > wonder whether we would want ANY to be separate from PROFILE0. That might vary > based on the API. > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set in stone? > Or did you just make that value up? Does the vp9 team have any insight for us? > > > > If those are legit, I'm fine with adding them here now and removing the _ANY > designator in place of MIN/MAX variants if endpoints don't want to check the > values explicitly. > > Thanks for the link. Lets just include those here then. Ok, just to confirm that I got it right: so I'll replace the vp9profile_any with vp9profile_0..vp9profile_3 and will introduce the corresponding values in other matching enums and ppapi, right? What are we going to do about UMA? Should we just rename the vp9profile_any value in there into profile0 and just keep in mind to ourselves the fact that previously we reported any vp9 profile as profile0 (speaking pragmatically, that's probably ok for now, there's not a lot of vp9 content yet, and I guess most of it is really in profile0). Or do we want to point out the fact that previously reported values of vp9_any could include other profiles, besides profile0?
On 2016/03/03 22:23:22, servolk wrote: > On 2016/03/03 22:17:20, DaleCurtis wrote: > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > > File gpu/config/gpu_info.h (right): > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 > > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > > On 2016/03/02 01:47:45, servolk wrote: > > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > > Just remove the 16 entirely. It could rot (although that is more > > unlikely in > > > > > > this case. > > > > > > > > > > I'm starting to think that maybe it would be best to just add the 4 VP9 > > profiles > > > > > in various enum already, even if they are going to be just reserved, but > > unused > > > > > for now (kinda like I did in histograms.xml per asvitkine@ suggestion). > > WDYT? > > > > > > > > I'm hesitant to define things we don't use, though +4 is also weird. I > also > > wonder whether we would want ANY to be separate from PROFILE0. That might vary > > based on the API. > > > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set in > stone? > > Or did you just make that value up? Does the vp9 team have any insight for us? > > > > > > If those are legit, I'm fine with adding them here now and removing the _ANY > > designator in place of MIN/MAX variants if endpoints don't want to check the > > values explicitly. > > > > Thanks for the link. Lets just include those here then. > > Ok, just to confirm that I got it right: so I'll replace the vp9profile_any with > vp9profile_0..vp9profile_3 and will introduce the corresponding values in other > matching enums and ppapi, right? What are we going to do about UMA? Should we > just rename the vp9profile_any value in there into profile0 and just keep in > mind to ourselves the fact that previously we reported any vp9 profile as > profile0 (speaking pragmatically, that's probably ok for now, there's not a lot > of vp9 content yet, and I guess most of it is really in profile0). Or do we want > to point out the fact that previously reported values of vp9_any could include > other profiles, besides profile0? I've created a separate bug and a separate CL for adding the 4 VP9 profiles: https://codereview.chromium.org/1677133003 Let's keep this CL focused on HEVC and move the VP9 discussion there.
On 2016/03/04 19:48:05, servolk wrote: > On 2016/03/03 22:23:22, servolk wrote: > > On 2016/03/03 22:17:20, DaleCurtis wrote: > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > > > File gpu/config/gpu_info.h (right): > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 > > > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > > > On 2016/03/02 01:47:45, servolk wrote: > > > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > > > Just remove the 16 entirely. It could rot (although that is more > > > unlikely in > > > > > > > this case. > > > > > > > > > > > > I'm starting to think that maybe it would be best to just add the 4 > VP9 > > > profiles > > > > > > in various enum already, even if they are going to be just reserved, > but > > > unused > > > > > > for now (kinda like I did in histograms.xml per asvitkine@ > suggestion). > > > WDYT? > > > > > > > > > > I'm hesitant to define things we don't use, though +4 is also weird. I > > also > > > wonder whether we would want ANY to be separate from PROFILE0. That might > vary > > > based on the API. > > > > > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set in > > stone? > > > Or did you just make that value up? Does the vp9 team have any insight for > us? > > > > > > > > If those are legit, I'm fine with adding them here now and removing the > _ANY > > > designator in place of MIN/MAX variants if endpoints don't want to check the > > > values explicitly. > > > > > > Thanks for the link. Lets just include those here then. > > > > Ok, just to confirm that I got it right: so I'll replace the vp9profile_any > with > > vp9profile_0..vp9profile_3 and will introduce the corresponding values in > other > > matching enums and ppapi, right? What are we going to do about UMA? Should we > > just rename the vp9profile_any value in there into profile0 and just keep in > > mind to ourselves the fact that previously we reported any vp9 profile as > > profile0 (speaking pragmatically, that's probably ok for now, there's not a > lot > > of vp9 content yet, and I guess most of it is really in profile0). Or do we > want > > to point out the fact that previously reported values of vp9_any could include > > other profiles, besides profile0? > > I've created a separate bug and a separate CL for adding the 4 VP9 profiles: > https://codereview.chromium.org/1677133003 > Let's keep this CL focused on HEVC and move the VP9 discussion there. ping
On 2016/03/10 01:00:34, servolk wrote: > On 2016/03/04 19:48:05, servolk wrote: > > On 2016/03/03 22:23:22, servolk wrote: > > > On 2016/03/03 22:17:20, DaleCurtis wrote: > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > > > > File gpu/config/gpu_info.h (right): > > > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > > > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 > > > > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > > > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > > > > On 2016/03/02 01:47:45, servolk wrote: > > > > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > > > > Just remove the 16 entirely. It could rot (although that is more > > > > unlikely in > > > > > > > > this case. > > > > > > > > > > > > > > I'm starting to think that maybe it would be best to just add the 4 > > VP9 > > > > profiles > > > > > > > in various enum already, even if they are going to be just reserved, > > but > > > > unused > > > > > > > for now (kinda like I did in histograms.xml per asvitkine@ > > suggestion). > > > > WDYT? > > > > > > > > > > > > I'm hesitant to define things we don't use, though +4 is also weird. I > > > also > > > > wonder whether we would want ANY to be separate from PROFILE0. That might > > vary > > > > based on the API. > > > > > > > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > > > > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set in > > > stone? > > > > Or did you just make that value up? Does the vp9 team have any insight for > > us? > > > > > > > > > > If those are legit, I'm fine with adding them here now and removing the > > _ANY > > > > designator in place of MIN/MAX variants if endpoints don't want to check > the > > > > values explicitly. > > > > > > > > Thanks for the link. Lets just include those here then. > > > > > > Ok, just to confirm that I got it right: so I'll replace the vp9profile_any > > with > > > vp9profile_0..vp9profile_3 and will introduce the corresponding values in > > other > > > matching enums and ppapi, right? What are we going to do about UMA? Should > we > > > just rename the vp9profile_any value in there into profile0 and just keep in > > > mind to ourselves the fact that previously we reported any vp9 profile as > > > profile0 (speaking pragmatically, that's probably ok for now, there's not a > > lot > > > of vp9 content yet, and I guess most of it is really in profile0). Or do we > > want > > > to point out the fact that previously reported values of vp9_any could > include > > > other profiles, besides profile0? > > > > I've created a separate bug and a separate CL for adding the 4 VP9 profiles: > > https://codereview.chromium.org/1677133003 > > Let's keep this CL focused on HEVC and move the VP9 discussion there. > > ping ping
On 2016/03/11 01:45:46, servolk wrote: > On 2016/03/10 01:00:34, servolk wrote: > > On 2016/03/04 19:48:05, servolk wrote: > > > On 2016/03/03 22:23:22, servolk wrote: > > > > On 2016/03/03 22:17:20, DaleCurtis wrote: > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > > > > > File gpu/config/gpu_info.h (right): > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > > > > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 > > > > > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > > > > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > > > > > On 2016/03/02 01:47:45, servolk wrote: > > > > > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > > > > > Just remove the 16 entirely. It could rot (although that is more > > > > > unlikely in > > > > > > > > > this case. > > > > > > > > > > > > > > > > I'm starting to think that maybe it would be best to just add the > 4 > > > VP9 > > > > > profiles > > > > > > > > in various enum already, even if they are going to be just > reserved, > > > but > > > > > unused > > > > > > > > for now (kinda like I did in histograms.xml per asvitkine@ > > > suggestion). > > > > > WDYT? > > > > > > > > > > > > > > I'm hesitant to define things we don't use, though +4 is also weird. > I > > > > also > > > > > wonder whether we would want ANY to be separate from PROFILE0. That > might > > > vary > > > > > based on the API. > > > > > > > > > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > > > > > > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set > in > > > > stone? > > > > > Or did you just make that value up? Does the vp9 team have any insight > for > > > us? > > > > > > > > > > > > If those are legit, I'm fine with adding them here now and removing > the > > > _ANY > > > > > designator in place of MIN/MAX variants if endpoints don't want to check > > the > > > > > values explicitly. > > > > > > > > > > Thanks for the link. Lets just include those here then. > > > > > > > > Ok, just to confirm that I got it right: so I'll replace the > vp9profile_any > > > with > > > > vp9profile_0..vp9profile_3 and will introduce the corresponding values in > > > other > > > > matching enums and ppapi, right? What are we going to do about UMA? Should > > we > > > > just rename the vp9profile_any value in there into profile0 and just keep > in > > > > mind to ourselves the fact that previously we reported any vp9 profile as > > > > profile0 (speaking pragmatically, that's probably ok for now, there's not > a > > > lot > > > > of vp9 content yet, and I guess most of it is really in profile0). Or do > we > > > want > > > > to point out the fact that previously reported values of vp9_any could > > include > > > > other profiles, besides profile0? > > > > > > I've created a separate bug and a separate CL for adding the 4 VP9 profiles: > > > https://codereview.chromium.org/1677133003 > > > Let's keep this CL focused on HEVC and move the VP9 discussion there. > > > > ping > > ping Can you be more specific about what you are pinging for? It seems that most of the latest discussion around VP9 has moved to https://codereview.chromium.org/1769593002. The previous suggestion was to implement the VP9 values first, which would mean this is blocked on that CL. If you think otherwise, you should say so.
On 2016/03/11 17:37:10, ddorwin wrote: > On 2016/03/11 01:45:46, servolk wrote: > > On 2016/03/10 01:00:34, servolk wrote: > > > On 2016/03/04 19:48:05, servolk wrote: > > > > On 2016/03/03 22:23:22, servolk wrote: > > > > > On 2016/03/03 22:17:20, DaleCurtis wrote: > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > > > > > > File gpu/config/gpu_info.h (right): > > > > > > > > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > > > > > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, //=16 > > > > > > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > > > > > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > > > > > > On 2016/03/02 01:47:45, servolk wrote: > > > > > > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > > > > > > Just remove the 16 entirely. It could rot (although that is > more > > > > > > unlikely in > > > > > > > > > > this case. > > > > > > > > > > > > > > > > > > I'm starting to think that maybe it would be best to just add > the > > 4 > > > > VP9 > > > > > > profiles > > > > > > > > > in various enum already, even if they are going to be just > > reserved, > > > > but > > > > > > unused > > > > > > > > > for now (kinda like I did in histograms.xml per asvitkine@ > > > > suggestion). > > > > > > WDYT? > > > > > > > > > > > > > > > > I'm hesitant to define things we don't use, though +4 is also > weird. > > I > > > > > also > > > > > > wonder whether we would want ANY to be separate from PROFILE0. That > > might > > > > vary > > > > > > based on the API. > > > > > > > > > > > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > > > > > > > > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are set > > in > > > > > stone? > > > > > > Or did you just make that value up? Does the vp9 team have any insight > > for > > > > us? > > > > > > > > > > > > > > If those are legit, I'm fine with adding them here now and removing > > the > > > > _ANY > > > > > > designator in place of MIN/MAX variants if endpoints don't want to > check > > > the > > > > > > values explicitly. > > > > > > > > > > > > Thanks for the link. Lets just include those here then. > > > > > > > > > > Ok, just to confirm that I got it right: so I'll replace the > > vp9profile_any > > > > with > > > > > vp9profile_0..vp9profile_3 and will introduce the corresponding values > in > > > > other > > > > > matching enums and ppapi, right? What are we going to do about UMA? > Should > > > we > > > > > just rename the vp9profile_any value in there into profile0 and just > keep > > in > > > > > mind to ourselves the fact that previously we reported any vp9 profile > as > > > > > profile0 (speaking pragmatically, that's probably ok for now, there's > not > > a > > > > lot > > > > > of vp9 content yet, and I guess most of it is really in profile0). Or do > > we > > > > want > > > > > to point out the fact that previously reported values of vp9_any could > > > include > > > > > other profiles, besides profile0? > > > > > > > > I've created a separate bug and a separate CL for adding the 4 VP9 > profiles: > > > > https://codereview.chromium.org/1677133003 > > > > Let's keep this CL focused on HEVC and move the VP9 discussion there. > > > > > > ping > > > > ping > > Can you be more specific about what you are pinging for? > It seems that most of the latest discussion around VP9 has moved to > https://codereview.chromium.org/1769593002. > The previous suggestion was to implement the VP9 values first, which would mean > this is blocked on that CL. If you think otherwise, you should say so. I'm pinging to get approvals for content/, gpu/ and media/ changes. So far I only got approvals for ppapi/ from raymes@ and tools/ from asvitkine@. content/ and gpu/ could be approved by sievers@. media/ could be any of the media folks on the reviewer list. I've initially added sandersd@ and you for media/ and content/browser/media/media_canplaytype_browsertest.cc changes, but I have just noticed that somebody also added wolenetz@ and xhwang@ (I guess it was Dale?). As I've explained in https://codereview.chromium.org/1769593002#msg7 currently VP9 CL is based on HEVC CL. The HEVC CL (this one) is ready to land, I think, and I don't know if we need to hold it to wait for VP9 CL to land first. I think the order doesn't matter, as the end result will be the same anyway and it would allow me to start using the new HEVC codec parsing functions for further Chromecast work without waiting for VP9 CL to go in (which is still waiting for VP9 folks to look at). Since nobody responded to my comments about VP9 CL being based on HEVC CL at https://codereview.chromium.org/1769593002#msg7, I assumed everybody agreed (or didn't care) about the ordering. If that's not the case, please let me know, I can rebase.
On 2016/03/11 20:04:51, servolk wrote: > On 2016/03/11 17:37:10, ddorwin wrote: > > On 2016/03/11 01:45:46, servolk wrote: > > > On 2016/03/10 01:00:34, servolk wrote: > > > > On 2016/03/04 19:48:05, servolk wrote: > > > > > On 2016/03/03 22:23:22, servolk wrote: > > > > > > On 2016/03/03 22:17:20, DaleCurtis wrote: > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > > > > > > > File gpu/config/gpu_info.h (right): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > > > > > > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, > //=16 > > > > > > > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > > > > > > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > > > > > > > On 2016/03/02 01:47:45, servolk wrote: > > > > > > > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > > > > > > > Just remove the 16 entirely. It could rot (although that is > > more > > > > > > > unlikely in > > > > > > > > > > > this case. > > > > > > > > > > > > > > > > > > > > I'm starting to think that maybe it would be best to just add > > the > > > 4 > > > > > VP9 > > > > > > > profiles > > > > > > > > > > in various enum already, even if they are going to be just > > > reserved, > > > > > but > > > > > > > unused > > > > > > > > > > for now (kinda like I did in histograms.xml per asvitkine@ > > > > > suggestion). > > > > > > > WDYT? > > > > > > > > > > > > > > > > > > I'm hesitant to define things we don't use, though +4 is also > > weird. > > > I > > > > > > also > > > > > > > wonder whether we would want ANY to be separate from PROFILE0. That > > > might > > > > > vary > > > > > > > based on the API. > > > > > > > > > > > > > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > > > > > > > > > > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are > set > > > in > > > > > > stone? > > > > > > > Or did you just make that value up? Does the vp9 team have any > insight > > > for > > > > > us? > > > > > > > > > > > > > > > > If those are legit, I'm fine with adding them here now and > removing > > > the > > > > > _ANY > > > > > > > designator in place of MIN/MAX variants if endpoints don't want to > > check > > > > the > > > > > > > values explicitly. > > > > > > > > > > > > > > Thanks for the link. Lets just include those here then. > > > > > > > > > > > > Ok, just to confirm that I got it right: so I'll replace the > > > vp9profile_any > > > > > with > > > > > > vp9profile_0..vp9profile_3 and will introduce the corresponding values > > in > > > > > other > > > > > > matching enums and ppapi, right? What are we going to do about UMA? > > Should > > > > we > > > > > > just rename the vp9profile_any value in there into profile0 and just > > keep > > > in > > > > > > mind to ourselves the fact that previously we reported any vp9 profile > > as > > > > > > profile0 (speaking pragmatically, that's probably ok for now, there's > > not > > > a > > > > > lot > > > > > > of vp9 content yet, and I guess most of it is really in profile0). Or > do > > > we > > > > > want > > > > > > to point out the fact that previously reported values of vp9_any could > > > > include > > > > > > other profiles, besides profile0? > > > > > > > > > > I've created a separate bug and a separate CL for adding the 4 VP9 > > profiles: > > > > > https://codereview.chromium.org/1677133003 > > > > > Let's keep this CL focused on HEVC and move the VP9 discussion there. > > > > > > > > ping > > > > > > ping > > > > Can you be more specific about what you are pinging for? > > It seems that most of the latest discussion around VP9 has moved to > > https://codereview.chromium.org/1769593002. > > The previous suggestion was to implement the VP9 values first, which would > mean > > this is blocked on that CL. If you think otherwise, you should say so. > > I'm pinging to get approvals for content/, gpu/ and media/ changes. So far I > only got approvals for ppapi/ from raymes@ and tools/ from asvitkine@. content/ > and gpu/ could be approved by sievers@. media/ could be any of the media folks > on the reviewer list. I've initially added sandersd@ and you for media/ and > content/browser/media/media_canplaytype_browsertest.cc changes, but I have just > noticed that somebody also added wolenetz@ and xhwang@ (I guess it was Dale?). > As I've explained in https://codereview.chromium.org/1769593002#msg7 currently > VP9 CL is based on HEVC CL. The HEVC CL (this one) is ready to land, I think, > and I don't know if we need to hold it to wait for VP9 CL to land first. I think > the order doesn't matter, as the end result will be the same anyway and it would > allow me to start using the new HEVC codec parsing functions for further > Chromecast work without waiting for VP9 CL to go in (which is still waiting for > VP9 folks to look at). Since nobody responded to my comments about VP9 CL being > based on HEVC CL at https://codereview.chromium.org/1769593002#msg7, I assumed > everybody agreed (or didn't care) about the ordering. If that's not the case, > please let me know, I can rebase. Okay, if you have multiple reviewers, you're more likely to get the attention you need if you include their ID. As for the order, I think we should make sure that "+4" is the correct number and that we don't need a separate ANY to deal with ambiguity in the container. Thus, I think we should resolve the other CL first.
On 2016/03/11 20:11:52, ddorwin wrote: > On 2016/03/11 20:04:51, servolk wrote: > > On 2016/03/11 17:37:10, ddorwin wrote: > > > On 2016/03/11 01:45:46, servolk wrote: > > > > On 2016/03/10 01:00:34, servolk wrote: > > > > > On 2016/03/04 19:48:05, servolk wrote: > > > > > > On 2016/03/03 22:23:22, servolk wrote: > > > > > > > On 2016/03/03 22:17:20, DaleCurtis wrote: > > > > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > > > > > > > > File gpu/config/gpu_info.h (right): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > > > > > > > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, > > //=16 > > > > > > > > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > > > > > > > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > > > > > > > > On 2016/03/02 01:47:45, servolk wrote: > > > > > > > > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > > > > > > > > Just remove the 16 entirely. It could rot (although that > is > > > more > > > > > > > > unlikely in > > > > > > > > > > > > this case. > > > > > > > > > > > > > > > > > > > > > > I'm starting to think that maybe it would be best to just > add > > > the > > > > 4 > > > > > > VP9 > > > > > > > > profiles > > > > > > > > > > > in various enum already, even if they are going to be just > > > > reserved, > > > > > > but > > > > > > > > unused > > > > > > > > > > > for now (kinda like I did in histograms.xml per asvitkine@ > > > > > > suggestion). > > > > > > > > WDYT? > > > > > > > > > > > > > > > > > > > > I'm hesitant to define things we don't use, though +4 is also > > > weird. > > > > I > > > > > > > also > > > > > > > > wonder whether we would want ANY to be separate from PROFILE0. > That > > > > might > > > > > > vary > > > > > > > > based on the API. > > > > > > > > > > > > > > > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > > > > > > > > > > > > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those are > > set > > > > in > > > > > > > stone? > > > > > > > > Or did you just make that value up? Does the vp9 team have any > > insight > > > > for > > > > > > us? > > > > > > > > > > > > > > > > > > If those are legit, I'm fine with adding them here now and > > removing > > > > the > > > > > > _ANY > > > > > > > > designator in place of MIN/MAX variants if endpoints don't want to > > > check > > > > > the > > > > > > > > values explicitly. > > > > > > > > > > > > > > > > Thanks for the link. Lets just include those here then. > > > > > > > > > > > > > > Ok, just to confirm that I got it right: so I'll replace the > > > > vp9profile_any > > > > > > with > > > > > > > vp9profile_0..vp9profile_3 and will introduce the corresponding > values > > > in > > > > > > other > > > > > > > matching enums and ppapi, right? What are we going to do about UMA? > > > Should > > > > > we > > > > > > > just rename the vp9profile_any value in there into profile0 and just > > > keep > > > > in > > > > > > > mind to ourselves the fact that previously we reported any vp9 > profile > > > as > > > > > > > profile0 (speaking pragmatically, that's probably ok for now, > there's > > > not > > > > a > > > > > > lot > > > > > > > of vp9 content yet, and I guess most of it is really in profile0). > Or > > do > > > > we > > > > > > want > > > > > > > to point out the fact that previously reported values of vp9_any > could > > > > > include > > > > > > > other profiles, besides profile0? > > > > > > > > > > > > I've created a separate bug and a separate CL for adding the 4 VP9 > > > profiles: > > > > > > https://codereview.chromium.org/1677133003 > > > > > > Let's keep this CL focused on HEVC and move the VP9 discussion there. > > > > > > > > > > ping > > > > > > > > ping > > > > > > Can you be more specific about what you are pinging for? > > > It seems that most of the latest discussion around VP9 has moved to > > > https://codereview.chromium.org/1769593002. > > > The previous suggestion was to implement the VP9 values first, which would > > mean > > > this is blocked on that CL. If you think otherwise, you should say so. > > > > I'm pinging to get approvals for content/, gpu/ and media/ changes. So far I > > only got approvals for ppapi/ from raymes@ and tools/ from asvitkine@. > content/ > > and gpu/ could be approved by sievers@. media/ could be any of the media folks > > on the reviewer list. I've initially added sandersd@ and you for media/ and > > content/browser/media/media_canplaytype_browsertest.cc changes, but I have > just > > noticed that somebody also added wolenetz@ and xhwang@ (I guess it was Dale?). > > As I've explained in https://codereview.chromium.org/1769593002#msg7 currently > > VP9 CL is based on HEVC CL. The HEVC CL (this one) is ready to land, I think, > > and I don't know if we need to hold it to wait for VP9 CL to land first. I > think > > the order doesn't matter, as the end result will be the same anyway and it > would > > allow me to start using the new HEVC codec parsing functions for further > > Chromecast work without waiting for VP9 CL to go in (which is still waiting > for > > VP9 folks to look at). Since nobody responded to my comments about VP9 CL > being > > based on HEVC CL at https://codereview.chromium.org/1769593002#msg7, I assumed > > everybody agreed (or didn't care) about the ordering. If that's not the case, > > please let me know, I can rebase. > > Okay, if you have multiple reviewers, you're more likely to get the attention > you need if you include their ID. > > As for the order, I think we should make sure that "+4" is the correct number > and that we don't need a separate ANY to deal with ambiguity in the container. > Thus, I think we should resolve the other CL first. Ok, I've rebased the VP9 CL on top of Chromium master branch.
On 2016/03/11 23:12:35, servolk wrote: > On 2016/03/11 20:11:52, ddorwin wrote: > > On 2016/03/11 20:04:51, servolk wrote: > > > On 2016/03/11 17:37:10, ddorwin wrote: > > > > On 2016/03/11 01:45:46, servolk wrote: > > > > > On 2016/03/10 01:00:34, servolk wrote: > > > > > > On 2016/03/04 19:48:05, servolk wrote: > > > > > > > On 2016/03/03 22:23:22, servolk wrote: > > > > > > > > On 2016/03/03 22:17:20, DaleCurtis wrote: > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h > > > > > > > > > File gpu/config/gpu_info.h (right): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/1677133003/diff/450001/gpu/config/gpu_info.h#... > > > > > > > > > gpu/config/gpu_info.h:56: HEVCPROFILE_MAIN = VP9PROFILE_ANY + 4, > > > //=16 > > > > > > > > > On 2016/03/03 at 22:05:32, DaleCurtis wrote: > > > > > > > > > > On 2016/03/03 at 22:00:21, ddorwin wrote: > > > > > > > > > > > On 2016/03/02 01:47:45, servolk wrote: > > > > > > > > > > > > On 2016/03/02 01:36:38, ddorwin wrote: > > > > > > > > > > > > > Just remove the 16 entirely. It could rot (although that > > is > > > > more > > > > > > > > > unlikely in > > > > > > > > > > > > > this case. > > > > > > > > > > > > > > > > > > > > > > > > I'm starting to think that maybe it would be best to just > > add > > > > the > > > > > 4 > > > > > > > VP9 > > > > > > > > > profiles > > > > > > > > > > > > in various enum already, even if they are going to be just > > > > > reserved, > > > > > > > but > > > > > > > > > unused > > > > > > > > > > > > for now (kinda like I did in histograms.xml per asvitkine@ > > > > > > > suggestion). > > > > > > > > > WDYT? > > > > > > > > > > > > > > > > > > > > > > I'm hesitant to define things we don't use, though +4 is > also > > > > weird. > > > > > I > > > > > > > > also > > > > > > > > > wonder whether we would want ANY to be separate from PROFILE0. > > That > > > > > might > > > > > > > vary > > > > > > > > > based on the API. > > > > > > > > > > > > > > > > > > > > > > Perhaps sandersd or dalecurtis@ have thoughts. > > > > > > > > > > > > > > > > > > > > Sergey, you say "the 4 VP9 profiles" above. Do we know those > are > > > set > > > > > in > > > > > > > > stone? > > > > > > > > > Or did you just make that value up? Does the vp9 team have any > > > insight > > > > > for > > > > > > > us? > > > > > > > > > > > > > > > > > > > > If those are legit, I'm fine with adding them here now and > > > removing > > > > > the > > > > > > > _ANY > > > > > > > > > designator in place of MIN/MAX variants if endpoints don't want > to > > > > check > > > > > > the > > > > > > > > > values explicitly. > > > > > > > > > > > > > > > > > > Thanks for the link. Lets just include those here then. > > > > > > > > > > > > > > > > Ok, just to confirm that I got it right: so I'll replace the > > > > > vp9profile_any > > > > > > > with > > > > > > > > vp9profile_0..vp9profile_3 and will introduce the corresponding > > values > > > > in > > > > > > > other > > > > > > > > matching enums and ppapi, right? What are we going to do about > UMA? > > > > Should > > > > > > we > > > > > > > > just rename the vp9profile_any value in there into profile0 and > just > > > > keep > > > > > in > > > > > > > > mind to ourselves the fact that previously we reported any vp9 > > profile > > > > as > > > > > > > > profile0 (speaking pragmatically, that's probably ok for now, > > there's > > > > not > > > > > a > > > > > > > lot > > > > > > > > of vp9 content yet, and I guess most of it is really in profile0). > > Or > > > do > > > > > we > > > > > > > want > > > > > > > > to point out the fact that previously reported values of vp9_any > > could > > > > > > include > > > > > > > > other profiles, besides profile0? > > > > > > > > > > > > > > I've created a separate bug and a separate CL for adding the 4 VP9 > > > > profiles: > > > > > > > https://codereview.chromium.org/1677133003 > > > > > > > Let's keep this CL focused on HEVC and move the VP9 discussion > there. > > > > > > > > > > > > ping > > > > > > > > > > ping > > > > > > > > Can you be more specific about what you are pinging for? > > > > It seems that most of the latest discussion around VP9 has moved to > > > > https://codereview.chromium.org/1769593002. > > > > The previous suggestion was to implement the VP9 values first, which would > > > mean > > > > this is blocked on that CL. If you think otherwise, you should say so. > > > > > > I'm pinging to get approvals for content/, gpu/ and media/ changes. So far I > > > only got approvals for ppapi/ from raymes@ and tools/ from asvitkine@. > > content/ > > > and gpu/ could be approved by sievers@. media/ could be any of the media > folks > > > on the reviewer list. I've initially added sandersd@ and you for media/ and > > > content/browser/media/media_canplaytype_browsertest.cc changes, but I have > > just > > > noticed that somebody also added wolenetz@ and xhwang@ (I guess it was > Dale?). > > > As I've explained in https://codereview.chromium.org/1769593002#msg7 > currently > > > VP9 CL is based on HEVC CL. The HEVC CL (this one) is ready to land, I > think, > > > and I don't know if we need to hold it to wait for VP9 CL to land first. I > > think > > > the order doesn't matter, as the end result will be the same anyway and it > > would > > > allow me to start using the new HEVC codec parsing functions for further > > > Chromecast work without waiting for VP9 CL to go in (which is still waiting > > for > > > VP9 folks to look at). Since nobody responded to my comments about VP9 CL > > being > > > based on HEVC CL at https://codereview.chromium.org/1769593002#msg7, I > assumed > > > everybody agreed (or didn't care) about the ordering. If that's not the > case, > > > please let me know, I can rebase. > > > > Okay, if you have multiple reviewers, you're more likely to get the attention > > you need if you include their ID. > > > > As for the order, I think we should make sure that "+4" is the correct number > > and that we don't need a separate ANY to deal with ambiguity in the container. > > Thus, I think we should resolve the other CL first. > > Ok, I've rebased the VP9 CL on top of Chromium master branch. Now that VP9 profiles CL has landed, we can get back to this. I have rebased the latest patchset + removed PPAPI changes like we did in VP9 CL. Please take a look. David, I know this will probably conflict with https://codereview.chromium.org/1728193004/ (in content/browser/media/media_canplaytype_browsertest.cc). I'll rebase this one as soon as that one lands.
I did not review the HEVC details in: content/browser/media/media_canplaytype_browsertest.cc media/base/video_codecs.cc Please get someone to specifically review that code. https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:517: #if BUILDFLAG(ENABLE_HEVC_DEMUXING) I believe there was a reason this was originally added before AVC, but should we move it after? (It's also less likely than AVC.) https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:519: *is_ambiguous = false; This assumes that only supported profiles are returned (at least DCHECK that) AND that the level is valid. Is the latter a safe assumption?
https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:517: #if BUILDFLAG(ENABLE_HEVC_DEMUXING) On 2016/04/02 00:09:06, ddorwin wrote: > I believe there was a reason this was originally added before AVC, but should we > move it after? (It's also less likely than AVC.) Yes, we used to have 'return ParseH264CodecId' at the end of this function in the past, so HEVC was inserted above ParseH264. Now that this code looks differently we can move HEVC below. https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:519: *is_ambiguous = false; On 2016/04/02 00:09:06, ddorwin wrote: > This assumes that only supported profiles are returned (at least DCHECK that) > AND that the level is valid. Is the latter a safe assumption? Well, HEVC codec ids contain enough information to be unambiguous, so I've set it to false here. And yes, there are already a few CHECKs inside ParseHEVCCodecId function that ensure that returned values are within valid ranges. The actual issue here is that this is_ambiguous flag is actually used to decide whether we need to return 'maybe' or 'probably' as CanPlayType result, but the problem is that we don't have enough information here to decide that. We'll need to ask actual platform/decoder whether this combination of profile/level is supported or not. That part is not implemented yet.
https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:502: bool* is_ambiguous) const { As you mentioned below, this is confusing. Perhaps (in a separate CL) we should change to is_unsure, is_maybe, or something like that. (It's the opposite of "is known supported.) The only case where anything is actually _ambiguous_ now is in kAmbiguousCodecStringMap. https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:519: *is_ambiguous = false; On 2016/04/02 00:35:04, servolk wrote: > On 2016/04/02 00:09:06, ddorwin wrote: > > This assumes that only supported profiles are returned (at least DCHECK that) > > AND that the level is valid. Is the latter a safe assumption? > > Well, HEVC codec ids contain enough information to be unambiguous, so I've set > it to false here. And yes, there are already a few CHECKs inside > ParseHEVCCodecId function that ensure that returned values are within valid > ranges. The actual issue here is that this is_ambiguous flag is actually used to > decide whether we need to return 'maybe' or 'probably' as CanPlayType result, > but the problem is that we don't have enough information here to decide that. > We'll need to ask actual platform/decoder whether this combination of > profile/level is supported or not. That part is not implemented yet. See above. Ambiguous no longer makes sense, BUT we should prefer "maybe" for things we are unsure about. In this case, until the platform checking is added. This should not affect most apps. This will cause the DCHECK in AddContainerWithCodecs() to fire, but, especially since we want to eliminate this call there (https://crbug.com/461009), you could just add "|| codec==HEVC".
https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:519: *is_ambiguous = false; On 2016/04/02 00:56:09, ddorwin wrote: > On 2016/04/02 00:35:04, servolk wrote: > > On 2016/04/02 00:09:06, ddorwin wrote: > > > This assumes that only supported profiles are returned (at least DCHECK > that) > > > AND that the level is valid. Is the latter a safe assumption? > > > > Well, HEVC codec ids contain enough information to be unambiguous, so I've set > > it to false here. And yes, there are already a few CHECKs inside > > ParseHEVCCodecId function that ensure that returned values are within valid > > ranges. The actual issue here is that this is_ambiguous flag is actually used > to > > decide whether we need to return 'maybe' or 'probably' as CanPlayType result, > > but the problem is that we don't have enough information here to decide that. > > We'll need to ask actual platform/decoder whether this combination of > > profile/level is supported or not. That part is not implemented yet. > > See above. Ambiguous no longer makes sense, BUT we should prefer "maybe" for > things we are unsure about. In this case, until the platform checking is added. > This should not affect most apps. > > This will cause the DCHECK in AddContainerWithCodecs() to fire, but, especially > since we want to eliminate this call there (https://crbug.com/461009), you could > just add "|| codec==HEVC". That bug is now fixed, so you don't need to worry about the DCHECK. https://codereview.chromium.org/1864743002/
https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:502: bool* is_ambiguous) const { On 2016/04/02 00:56:09, ddorwin wrote: > As you mentioned below, this is confusing. Perhaps (in a separate CL) we should > change to is_unsure, is_maybe, or something like that. (It's the opposite of "is > known supported.) > > The only case where anything is actually _ambiguous_ now is in > kAmbiguousCodecStringMap. Acknowledged. https://codereview.chromium.org/1677133003/diff/490001/media/base/mime_util_i... media/base/mime_util_internal.cc:519: *is_ambiguous = false; On 2016/04/06 01:43:56, ddorwin wrote: > On 2016/04/02 00:56:09, ddorwin wrote: > > On 2016/04/02 00:35:04, servolk wrote: > > > On 2016/04/02 00:09:06, ddorwin wrote: > > > > This assumes that only supported profiles are returned (at least DCHECK > > that) > > > > AND that the level is valid. Is the latter a safe assumption? > > > > > > Well, HEVC codec ids contain enough information to be unambiguous, so I've > set > > > it to false here. And yes, there are already a few CHECKs inside > > > ParseHEVCCodecId function that ensure that returned values are within valid > > > ranges. The actual issue here is that this is_ambiguous flag is actually > used > > to > > > decide whether we need to return 'maybe' or 'probably' as CanPlayType > result, > > > but the problem is that we don't have enough information here to decide > that. > > > We'll need to ask actual platform/decoder whether this combination of > > > profile/level is supported or not. That part is not implemented yet. > > > > See above. Ambiguous no longer makes sense, BUT we should prefer "maybe" for > > things we are unsure about. In this case, until the platform checking is > added. > > This should not affect most apps. > > > > This will cause the DCHECK in AddContainerWithCodecs() to fire, but, > especially > > since we want to eliminate this call there (https://crbug.com/461009), you > could > > just add "|| codec==HEVC". > > That bug is now fixed, so you don't need to worry about the DCHECK. > https://codereview.chromium.org/1864743002/ Done.
https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... media/base/mime_util_internal.cc:576: // tests expect. We'll need to add platform level checks to ensure that the What tests expect 'probably'? Can't we just update these? The point is that we should err on the side of underpromising, which is 'maybe'.
https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... media/base/mime_util_internal.cc:576: // tests expect. We'll need to add platform level checks to ensure that the On 2016/04/07 20:29:46, ddorwin wrote: > What tests expect 'probably'? Can't we just update these? > The point is that we should err on the side of underpromising, which is 'maybe'. The MediaCanPlayTypeTest.CodecSupportTest_HEVCVariants test that I've added in content/browser/media/media_canplaytype_browsertest.cc in this CL (see cast_shell trybot failure in PS #30). I guess we can update that test to expect 'maybe', but then it would fail on platforms that do actually support HEVC. Since Chromecast is the only platform that enables HEVC I think it's ok to overpromise here for the time being, while we are working on better platform-level checks.
https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... media/base/mime_util_internal.cc:576: // tests expect. We'll need to add platform level checks to ensure that the On 2016/04/07 20:44:03, servolk wrote: > On 2016/04/07 20:29:46, ddorwin wrote: > > What tests expect 'probably'? Can't we just update these? > > The point is that we should err on the side of underpromising, which is > 'maybe'. > > The MediaCanPlayTypeTest.CodecSupportTest_HEVCVariants test that I've added in > content/browser/media/media_canplaytype_browsertest.cc in this CL (see > cast_shell trybot failure in PS #30). I guess we can update that test to expect > 'maybe', but then it would fail on platforms that do actually support HEVC. > Since Chromecast is the only platform that enables HEVC I think it's ok to > overpromise here for the time being, while we are working on better > platform-level checks. If there are profiles, level, etc. combinations that will always be supported when this build flag is enabled, you could report "probably" for those, but currently this would make requests for 12-bit and whatever else return "probably". If the results are meaningless, authors will learn to ignore them. As for the tests, you can change kHevcSupported to "maybe" with a TODO noting this should be "probably" for some, preferably with a crbug ID. We are going to need to come up with a new solution for those tests when we add platform querying anyway.
https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... File media/base/mime_util_internal.cc (right): https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... media/base/mime_util_internal.cc:576: // tests expect. We'll need to add platform level checks to ensure that the On 2016/04/08 20:43:24, ddorwin wrote: > On 2016/04/07 20:44:03, servolk wrote: > > On 2016/04/07 20:29:46, ddorwin wrote: > > > What tests expect 'probably'? Can't we just update these? > > > The point is that we should err on the side of underpromising, which is > > 'maybe'. > > > > The MediaCanPlayTypeTest.CodecSupportTest_HEVCVariants test that I've added in > > content/browser/media/media_canplaytype_browsertest.cc in this CL (see > > cast_shell trybot failure in PS #30). I guess we can update that test to > expect > > 'maybe', but then it would fail on platforms that do actually support HEVC. > > Since Chromecast is the only platform that enables HEVC I think it's ok to > > overpromise here for the time being, while we are working on better > > platform-level checks. > > If there are profiles, level, etc. combinations that will always be supported > when this build flag is enabled, you could report "probably" for those, but > currently this would make requests for 12-bit and whatever else return > "probably". If the results are meaningless, authors will learn to ignore them. > > As for the tests, you can change kHevcSupported to "maybe" with a TODO noting > this should be "probably" for some, preferably with a crbug ID. > > We are going to need to come up with a new solution for those tests when we add > platform querying anyway. Done.
On 2016/04/08 22:11:45, servolk wrote: > https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... > File media/base/mime_util_internal.cc (right): > > https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... > media/base/mime_util_internal.cc:576: // tests expect. We'll need to add > platform level checks to ensure that the > On 2016/04/08 20:43:24, ddorwin wrote: > > On 2016/04/07 20:44:03, servolk wrote: > > > On 2016/04/07 20:29:46, ddorwin wrote: > > > > What tests expect 'probably'? Can't we just update these? > > > > The point is that we should err on the side of underpromising, which is > > > 'maybe'. > > > > > > The MediaCanPlayTypeTest.CodecSupportTest_HEVCVariants test that I've added > in > > > content/browser/media/media_canplaytype_browsertest.cc in this CL (see > > > cast_shell trybot failure in PS #30). I guess we can update that test to > > expect > > > 'maybe', but then it would fail on platforms that do actually support HEVC. > > > Since Chromecast is the only platform that enables HEVC I think it's ok to > > > overpromise here for the time being, while we are working on better > > > platform-level checks. > > > > If there are profiles, level, etc. combinations that will always be supported > > when this build flag is enabled, you could report "probably" for those, but > > currently this would make requests for 12-bit and whatever else return > > "probably". If the results are meaningless, authors will learn to ignore them. > > > > As for the tests, you can change kHevcSupported to "maybe" with a TODO noting > > this should be "probably" for some, preferably with a crbug ID. > > > > We are going to need to come up with a new solution for those tests when we > add > > platform querying anyway. > > Done. Ping. sanders@ could you please take a look at media/ changes? Or recommend somebody else from media/OWNERS who could take a look at this?
On 2016/04/11 19:56:39, servolk wrote: > On 2016/04/08 22:11:45, servolk wrote: > > > https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... > > File media/base/mime_util_internal.cc (right): > > > > > https://codereview.chromium.org/1677133003/diff/590001/media/base/mime_util_i... > > media/base/mime_util_internal.cc:576: // tests expect. We'll need to add > > platform level checks to ensure that the > > On 2016/04/08 20:43:24, ddorwin wrote: > > > On 2016/04/07 20:44:03, servolk wrote: > > > > On 2016/04/07 20:29:46, ddorwin wrote: > > > > > What tests expect 'probably'? Can't we just update these? > > > > > The point is that we should err on the side of underpromising, which is > > > > 'maybe'. > > > > > > > > The MediaCanPlayTypeTest.CodecSupportTest_HEVCVariants test that I've > added > > in > > > > content/browser/media/media_canplaytype_browsertest.cc in this CL (see > > > > cast_shell trybot failure in PS #30). I guess we can update that test to > > > expect > > > > 'maybe', but then it would fail on platforms that do actually support > HEVC. > > > > Since Chromecast is the only platform that enables HEVC I think it's ok to > > > > overpromise here for the time being, while we are working on better > > > > platform-level checks. > > > > > > If there are profiles, level, etc. combinations that will always be > supported > > > when this build flag is enabled, you could report "probably" for those, but > > > currently this would make requests for 12-bit and whatever else return > > > "probably". If the results are meaningless, authors will learn to ignore > them. > > > > > > As for the tests, you can change kHevcSupported to "maybe" with a TODO > noting > > > this should be "probably" for some, preferably with a crbug ID. > > > > > > We are going to need to come up with a new solution for those tests when we > > add > > > platform querying anyway. > > > > Done. > > Ping. sanders@ could you please take a look at media/ changes? Or recommend > somebody else from media/OWNERS who could take a look at this? Ping. sandersd@ could you take a look please?
Looking good, just some media/ style nits. https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codec... media/base/video_codecs.cc:212: CHECK(general_profile_space >= 0 && general_profile_space <= 3); These CHECKs seem to be statically guaranteed, and I don't see that anything actually goes wrong later if they are violated. Perhaps they should be DCHECKs? https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codec... media/base/video_codecs.cc:264: // Remove everything up to the first constraint_flags byte Newline before comment. https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codec... media/base/video_codecs.h:41: // never ever change (add new values to tools/metrics/histograms/histograms.xml) FYI: I filed crbug.com/605194 about this situation.
https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codec... media/base/video_codecs.cc:212: CHECK(general_profile_space >= 0 && general_profile_space <= 3); On 2016/04/20 18:13:54, sandersd wrote: > These CHECKs seem to be statically guaranteed, and I don't see that anything > actually goes wrong later if they are violated. Perhaps they should be DCHECKs? Yes, good point. Done. https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codec... media/base/video_codecs.cc:264: // Remove everything up to the first constraint_flags byte On 2016/04/20 18:13:54, sandersd wrote: > Newline before comment. Done. https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codecs.h File media/base/video_codecs.h (right): https://codereview.chromium.org/1677133003/diff/650001/media/base/video_codec... media/base/video_codecs.h:41: // never ever change (add new values to tools/metrics/histograms/histograms.xml) On 2016/04/20 18:13:54, sandersd wrote: > FYI: I filed crbug.com/605194 about this situation. Acknowledged. Thanks for filing the bug!
LGTM % nit. https://codereview.chromium.org/1677133003/diff/670001/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/670001/media/base/video_codec... media/base/video_codecs.cc:250: CHECK(general_tier_flag == 0 || general_tier_flag == 1); Sorry, the above comment was meant to include this CHECK as well.
https://codereview.chromium.org/1677133003/diff/670001/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/670001/media/base/video_codec... media/base/video_codecs.cc:250: CHECK(general_tier_flag == 0 || general_tier_flag == 1); On 2016/04/20 18:23:02, sandersd wrote: > Sorry, the above comment was meant to include this CHECK as well. Done.
servolk@chromium.org changed reviewers: + piman@chromium.org
On 2016/04/20 18:24:16, servolk wrote: > https://codereview.chromium.org/1677133003/diff/670001/media/base/video_codec... > File media/base/video_codecs.cc (right): > > https://codereview.chromium.org/1677133003/diff/670001/media/base/video_codec... > media/base/video_codecs.cc:250: CHECK(general_tier_flag == 0 || > general_tier_flag == 1); > On 2016/04/20 18:23:02, sandersd wrote: > > Sorry, the above comment was meant to include this CHECK as well. > > Done. +piman@ for gpu/config/gpu_info.h
lgtm
https://codereview.chromium.org/1677133003/diff/690001/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/690001/media/base/video_codec... media/base/video_codecs.cc:208: if (elem[1][0] == 'A' || elem[1][0] == 'B' || elem[1][0] == 'C') { Are the number of elements checked somewhere? If so, that should be a DCHECK here. But it's probably better to have a runtime check since this is called from multiple places.
https://codereview.chromium.org/1677133003/diff/690001/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/690001/media/base/video_codec... media/base/video_codecs.cc:208: if (elem[1][0] == 'A' || elem[1][0] == 'B' || elem[1][0] == 'C') { On 2016/04/20 21:10:56, ddorwin wrote: > Are the number of elements checked somewhere? If so, that should be a DCHECK > here. But it's probably better to have a runtime check since this is called from > multiple places. Yeah, good point. Added that and a couple of new test cases.
https://codereview.chromium.org/1677133003/diff/710001/content/browser/media/... File content/browser/media/media_canplaytype_browsertest.cc (right): https://codereview.chromium.org/1677133003/diff/710001/content/browser/media/... content/browser/media/media_canplaytype_browsertest.cc:1263: EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=hvc1.'")); Add this test without the extra dot. Actually, if anything, having a trailing dot after the third element (l1265 + '.') makes the most sense. https://codereview.chromium.org/1677133003/diff/710001/content/browser/media/... content/browser/media/media_canplaytype_browsertest.cc:1266: Test consecutive periods (a lot). These are allowed by the VP9 in MP4 proposal, which makes me think they might be allowed here. Our parsing at least makes this something we should test. Examples: hvc1... hvc1.... hvc1.1.. hvc1.1.6.. hvc1.1.6.L93. hvc1.1.6.L93.. hvc1..6.L93 hvc1...6.L93 hvc1...L93 hvc1....L93 hvc1.1..L93 hvc1.1...L93 Do similar for the constraint bytes: hvc1.1.6.L0.0. hvc1.1.6.L0.0.. hvc1.1.6.L0.0..0 hvc1.1.6.L0.0..0.0.0.0 hvc1.1.6.L0.0.0.0.0.0.0. hvc1.1.6.L0......0 hvc1.1.6.L0...... https://codereview.chromium.org/1677133003/diff/710001/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/710001/media/base/video_codec... media/base/video_codecs.cc:204: codec_id, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); What happens with consecutive periods? If it creates an empty element, is that handled correctly? Let's add tests. https://codereview.chromium.org/1677133003/diff/710001/media/base/video_codec... media/base/video_codecs.cc:270: // Remove everything up to the first constraint_flags byte This seems a little strange when we could just change the starting position. Also, there is unnecessary modification of the data. Could we instead use an iterator in the for loop? https://codereview.chromium.org/1677133003/diff/710001/media/base/video_codec... media/base/video_codecs.cc:272: if (elem.size() > 6) { In particular, it's not immediately clear that this is really allowing up to 10 elements (nine periods). This is minor, though it does require a little more thought.
https://codereview.chromium.org/1677133003/diff/710001/content/browser/media/... File content/browser/media/media_canplaytype_browsertest.cc (right): https://codereview.chromium.org/1677133003/diff/710001/content/browser/media/... content/browser/media/media_canplaytype_browsertest.cc:1263: EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=hvc1.'")); On 2016/04/20 22:28:15, ddorwin wrote: > Add this test without the extra dot. > Actually, if anything, having a trailing dot after the third element (l1265 + > '.') makes the most sense. Done. https://codereview.chromium.org/1677133003/diff/710001/content/browser/media/... content/browser/media/media_canplaytype_browsertest.cc:1266: On 2016/04/20 22:28:15, ddorwin wrote: > Test consecutive periods (a lot). These are allowed by the VP9 in MP4 proposal, > which makes me think they might be allowed here. Our parsing at least makes this > something we should test. > > Examples: > hvc1... > hvc1.... > hvc1.1.. > hvc1.1.6.. > hvc1.1.6.L93. > hvc1.1.6.L93.. > hvc1..6.L93 > hvc1...6.L93 > hvc1...L93 > hvc1....L93 > hvc1.1..L93 > hvc1.1...L93 > > Do similar for the constraint bytes: > hvc1.1.6.L0.0. > hvc1.1.6.L0.0.. > hvc1.1.6.L0.0..0 > hvc1.1.6.L0.0..0.0.0.0 > hvc1.1.6.L0.0.0.0.0.0.0. > hvc1.1.6.L0......0 > hvc1.1.6.L0...... Done. https://codereview.chromium.org/1677133003/diff/710001/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/710001/media/base/video_codec... media/base/video_codecs.cc:204: codec_id, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); On 2016/04/20 22:28:15, ddorwin wrote: > What happens with consecutive periods? If it creates an empty element, is that > handled correctly? > > Let's add tests. Yes, base::SPLIT_WANT_ALL means we get empty elements if there's nothing in between two dots. Done. https://codereview.chromium.org/1677133003/diff/710001/media/base/video_codec... media/base/video_codecs.cc:270: // Remove everything up to the first constraint_flags byte On 2016/04/20 22:28:15, ddorwin wrote: > This seems a little strange when we could just change the starting position. > Also, there is unnecessary modification of the data. Could we instead use an > iterator in the for loop? Done. https://codereview.chromium.org/1677133003/diff/710001/media/base/video_codec... media/base/video_codecs.cc:272: if (elem.size() > 6) { On 2016/04/20 22:28:15, ddorwin wrote: > In particular, it's not immediately clear that this is really allowing up to 10 > elements (nine periods). This is minor, though it does require a little more > thought. Since we no longer remove the first elements, the number 10 is more explicit now.
Thanks. LGTM (for the files I reviewed*) with question. * As before, I did not review the HEVC details in: content/browser/media/media_canplaytype_browsertest.cc media/base/video_codecs.cc https://codereview.chromium.org/1677133003/diff/700013/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/700013/media/base/video_codec... media/base/video_codecs.cc:218: DCHECK(general_profile_space >= 0 && general_profile_space <= 3); Should we be doing anything with general_profile_space?
Thanks for the reviews, everyone. https://codereview.chromium.org/1677133003/diff/700013/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/700013/media/base/video_codec... media/base/video_codecs.cc:218: DCHECK(general_profile_space >= 0 && general_profile_space <= 3); On 2016/04/20 23:32:41, ddorwin wrote: > Should we be doing anything with general_profile_space? No, general_profile_space is expected to be 0 for now. Here is what the spec says about it: The value of general_profile_space shall be equal to 0 in bitstreams conforming to this version of this Specification. Other values for general_profile_space are reserved for future use by ITU-T | ISO/IEC.
https://codereview.chromium.org/1677133003/diff/700013/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/700013/media/base/video_codec... media/base/video_codecs.cc:218: DCHECK(general_profile_space >= 0 && general_profile_space <= 3); On 2016/04/20 23:57:48, servolk wrote: > On 2016/04/20 23:32:41, ddorwin wrote: > > Should we be doing anything with general_profile_space? > > No, general_profile_space is expected to be 0 for now. Here is what the spec > says about it: > The value of > general_profile_space shall be equal to 0 in bitstreams conforming to this > version of this Specification. Other values for > general_profile_space are reserved for future use by ITU-T | ISO/IEC. Then why do we allow 1, 2, and 3? To the original point, I guess like most of these values we've extracted, we would need to check them against the client in the future.
https://codereview.chromium.org/1677133003/diff/700013/media/base/video_codec... File media/base/video_codecs.cc (right): https://codereview.chromium.org/1677133003/diff/700013/media/base/video_codec... media/base/video_codecs.cc:218: DCHECK(general_profile_space >= 0 && general_profile_space <= 3); On 2016/04/21 00:00:31, ddorwin wrote: > On 2016/04/20 23:57:48, servolk wrote: > > On 2016/04/20 23:32:41, ddorwin wrote: > > > Should we be doing anything with general_profile_space? > > > > No, general_profile_space is expected to be 0 for now. Here is what the spec > > says about it: > > The value of > > general_profile_space shall be equal to 0 in bitstreams conforming to this > > version of this Specification. Other values for > > general_profile_space are reserved for future use by ITU-T | ISO/IEC. > > Then why do we allow 1, 2, and 3? > > To the original point, I guess like most of these values we've extracted, we > would need to check them against the client in the future. Well, let me clarify. What I quoted above is from ITU H.265 recommendation (https://www.itu.int/rec/T-REC-H.265 section 7.4.4), which specifies interpretation of those parameters. But the actual HEVC codec id string syntax is defined in ISO/IEC 14496-15:2013. Here is another quote from ISO/IEC FDIS 14496-15:2013 explaining the syntax: the general_profile_space, encoded as no character (general_profile_space == 0), or ‘A’, ‘B’, ‘C’ for general_profile_space 1, 2, 3, followed by the general_profile_idc encoded as a decimal number; For this function we probably want to be able to parse all the values (0..3), but I guess we could either return general_profile_space to the caller, or error out here if it's not 0.
The CQ bit was checked by servolk@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from asvitkine@chromium.org, raymes@chromium.org, sandersd@chromium.org, piman@chromium.org Link to the patchset: https://codereview.chromium.org/1677133003/#ps700013 (title: "Fixed handling of empty elements + added test cases with empty elements")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1677133003/700013 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1677133003/700013
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_optional_gpu_tests_rel on tryserver.chromium.win (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by servolk@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1677133003/700013 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1677133003/700013
Message was sent while issue was closed.
Description was changed from ========== Implemented parsing of HEVC codec ids BUG=482761 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Implemented parsing of HEVC codec ids BUG=482761 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Message was sent while issue was closed.
Committed patchset #38 (id:700013)
Message was sent while issue was closed.
Description was changed from ========== Implemented parsing of HEVC codec ids BUG=482761 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Implemented parsing of HEVC codec ids BUG=482761 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/b36186ff03599c360e1c536f968aa7022105d3d0 Cr-Commit-Position: refs/heads/master@{#388827} ==========
Message was sent while issue was closed.
Patchset 38 (id:??) landed as https://crrev.com/b36186ff03599c360e1c536f968aa7022105d3d0 Cr-Commit-Position: refs/heads/master@{#388827} |