Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1910)

Unified Diff: content/renderer/media/render_media_client.cc

Issue 2723833002: WebM support for new multipart VP9 string. (Closed)
Patch Set: Use latest ordering (9 parts), Plumb eotf to media client Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/render_media_client.cc
diff --git a/content/renderer/media/render_media_client.cc b/content/renderer/media/render_media_client.cc
index b720b4e9da9d675d61abb10e7e7034c55cbff94e..ce839ddc9c92c5f05231fc265cf90ec983eed6ac 100644
--- a/content/renderer/media/render_media_client.cc
+++ b/content/renderer/media/render_media_client.cc
@@ -89,13 +89,38 @@ void RenderMediaClient::RecordRapporURL(const std::string& metric,
GetContentClient()->renderer()->RecordRapporURL(metric, url);
}
-bool RenderMediaClient::IsSupportedVideoConfig(media::VideoCodec codec,
- media::VideoCodecProfile profile,
- int level) {
+bool IsHdrColorManagementEnabled() {
hubbe 2017/03/02 23:37:11 Remove this function for now.
chcunningham 2017/03/07 02:27:56 Done.
+ // TODO(hubbe): Wire this up.
+ return false;
+}
+
+bool IsSdrTransferFunction(gfx::ColorSpace::TransferID eotf) {
hubbe 2017/03/02 23:37:11 Make this IsTransferFunctionSupported().
chcunningham 2017/03/07 02:27:56 Done.
+ switch (eotf) {
+ case gfx::ColorSpace::TransferID::GAMMA22:
+ case gfx::ColorSpace::TransferID::BT709:
+ case gfx::ColorSpace::TransferID::SMPTE170M:
+ case gfx::ColorSpace::TransferID::BT2020_10:
+ case gfx::ColorSpace::TransferID::BT2020_12:
+ case gfx::ColorSpace::TransferID::IEC61966_2_1:
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool RenderMediaClient::IsSupportedVideoConfig(
+ media::VideoCodec codec,
+ media::VideoCodecProfile profile,
+ int level,
+ gfx::ColorSpace::TransferID eotf) {
+ // TODO(chcunningham): Query decoders for codec profile support.
switch (codec) {
+ case media::kCodecVP9:
+ // Color management required for HDR to not look terrible.
+ return IsSdrTransferFunction(eotf) || IsHdrColorManagementEnabled();
servolk 2017/03/02 18:56:36 VP9 profile 0 is SDR, profile 2 is HDR. I believe
chcunningham 2017/03/02 23:13:08 My understanding from hubbe is that profile 2 does
hubbe 2017/03/02 23:37:11 Just call IsTransferFunctionSupported() here.
hubbe 2017/03/02 23:37:11 Profile 2 is just more bits per channel, and has n
+
case media::kCodecH264:
case media::kCodecVP8:
- case media::kCodecVP9:
case media::kCodecTheora:
return true;

Powered by Google App Engine
This is Rietveld 408576698