New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 592074 link

Starred by 4 users

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocking:
issue 597693



Sign in to add a comment

Add support for different VP9 profiles

Project Member Reported by servolk@chromium.org, Mar 4 2016

Issue description

Currently media/ code doesn't handle any of the VP9 profiles, it just ignores the existence of different VP9 bitstream profiles and bundles them all together under VP9PROFILE_ANY.
We know that there are actually 4 different VP9 profiles:
https://chromium.googlesource.com/webm/libvpx/+/master/vp9/common/vp9_enums.h#29

So at the very least we should provide 4 values in the media::VideoCodecProfile enum to be able to distinguish different VP9 profiles.
 
Cc: fgalligan@chromium.org vigneshv@chromium.org
+vp9 folk for commentary.
Cc: jzern@chromium.org jaikk@chromium.org
Components: Internals>Media>Codecs
Labels: -Type-Bug Type-Feature OS-All
The tricky part will be ensuring we know which profile we have, such as when demuxing media. Also, we need to update MimeUtil.
FWIW WebM spec says there's no codec private data for VP9 in WebM (see http://www.webmproject.org/docs/container/), so I think we'll need to parse bitstream header to extract profile information.
Re MimeUtil: currently there is no code for dealing with VP8/VP9 profiles in MimeUtil, because AFAIK there's no standard way to encode VP9 profile in the vp9 codec id string (unlike H.264/HEVC codec ids). Even when vp9 codec id is in the form of vp9.X, the X represents bitstream version, but there's no profile info. So there's no immediate need to update MimeUtil.
No immediate need, but if the goal is to "Add support for different VP9 profiles," updating MimeUtil would be included. I agree that this will depend on guidance/specification on how to detect this.

Comment 6 by jzern@chromium.org, Mar 4 2016

The profile number is available at the beginning of the frame header [1][2][3]. There is some work being done to define private data to describe just this. Frank is working on that.

[1] https://chromium.googlesource.com/webm/libvpx/+/master/vp9/decoder/vp9_decodeframe.c#1868
[2] https://chromium.googlesource.com/webm/libvpx/+/master/vp9/decoder/vp9_decodeframe.c#2148
[3] https://chromium.googlesource.com/webm/webm-tools/+/master/webm_info/webm_info.cc#546
I've prepared a CL that adds VP9 profiles to most of the Chromium code:
https://codereview.chromium.org/1769593002/
I think we'll also need to add new profiles to media/cdm/api/content_decryption_module.h, but it looks like the whole media/cdm/api directory is in a separate git repo, so it would need to be a separate CL.
Blocking: 597693
Project Member

Comment 9 by bugdroid1@chromium.org, Apr 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dca5e254ee5598671a3c8dab8f27b7b26626bf36

commit dca5e254ee5598671a3c8dab8f27b7b26626bf36
Author: servolk <servolk@chromium.org>
Date: Fri Apr 01 01:33:23 2016

Add 4 VP9 profiles to the media::VideoCodecProfile enum.

Currently media/ code doesn't handle any of the VP9 profiles, it just
ignores the existence of different VP9 bitstream profiles and bundles
them all together under VP9PROFILE_ANY.
We know that there are actually 4 different VP9 profiles (see enum
BITSTREAM_PROFILE definition in vp9_enums.h). So at the very least we
should provide 4 values in the media::VideoCodecProfile enum to be able
to distinguish different VP9 profiles.

BUG=592074
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review URL: https://codereview.chromium.org/1769593002

Cr-Commit-Position: refs/heads/master@{#384464}

[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/chromecast/media/cma/base/decoder_config_adapter.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/chromecast/public/media/decoder_config.h
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/common/gpu/media/android_video_decode_accelerator.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/common/gpu/media/gpu_video_accelerator_util.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/common/gpu/media/v4l2_video_encode_accelerator.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/common/gpu/media/vaapi_wrapper.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/renderer/pepper/content_decryptor_delegate.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/renderer/pepper/pepper_video_decoder_host.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/renderer/pepper/pepper_video_encoder_host.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/content/renderer/pepper/video_encoder_shim.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/gpu/config/gpu_info.h
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/media/base/video_codecs.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/media/base/video_codecs.h
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/media/base/video_decoder_config.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/media/cdm/cdm_adapter.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/media/ffmpeg/ffmpeg_common.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/media/formats/webm/webm_video_client.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/media/mojo/common/media_type_converters.cc
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/media/mojo/interfaces/media_types.mojom
[modify] https://crrev.com/dca5e254ee5598671a3c8dab8f27b7b26626bf36/tools/metrics/histograms/histograms.xml

Comment 10 by hubbe@chromium.org, Feb 27 2017

Servolk; I don't suppose you have a CL sitting around for implementing this?
It would be helpful if the the profiles were accurate to support Youtube HDR.

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e811a3e57cef042000fd6bed13f1e8aa76601302

commit e811a3e57cef042000fd6bed13f1e8aa76601302
Author: Miguel Casas <mcasas@chromium.org>
Date: Tue Nov 28 01:56:11 2017

WebM: Parse VP9 Profile out of CodecPrivate

This CL teaches WebMVideoClient to parse the |codec_private|
field, if present, to figure out the VP9 Profile if any. This
is a necessary step to support VP9.2 10b on Vaapi.

TEST=crosvideo.appspot.com/?codec=vp9.2&loop=true and newly
added unittests.

Bug:  778093 , 592074
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic62519b32818fe409d15f54b6ddb9798deea88da
Reviewed-on: https://chromium-review.googlesource.com/786211
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Sergey Volk <servolk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519519}
[modify] https://crrev.com/e811a3e57cef042000fd6bed13f1e8aa76601302/media/formats/BUILD.gn
[modify] https://crrev.com/e811a3e57cef042000fd6bed13f1e8aa76601302/media/formats/webm/webm_video_client.cc
[modify] https://crrev.com/e811a3e57cef042000fd6bed13f1e8aa76601302/media/formats/webm/webm_video_client.h
[add] https://crrev.com/e811a3e57cef042000fd6bed13f1e8aa76601302/media/formats/webm/webm_video_client_unittest.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec068ad57ec3fe3d558564aa4e4fc8df5cafd2d4

commit ec068ad57ec3fe3d558564aa4e4fc8df5cafd2d4
Author: Xiaohan Wang <xhwang@chromium.org>
Date: Fri Sep 21 20:26:44 2018

media: Support VP9 profiles in CdmAdapter

- Fixes ToCdmVideoCodecProfile() to handle VP9 profiles.
- Add ToCdmVideoDecoderConfig() helper function.

Bug: 592074
Change-Id: I7142fbf8d21e6710f84326235ba1e3b8c52036ee
Reviewed-on: https://chromium-review.googlesource.com/1236503
Reviewed-by: John Rummell <jrummell@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593321}
[modify] https://crrev.com/ec068ad57ec3fe3d558564aa4e4fc8df5cafd2d4/media/cdm/cdm_adapter.cc

Comment 14 by chcunningham@chromium.org, Today (11 hours ago)

I _think_ perhaps this is fixed? Any remaining work?

Sign in to add a comment