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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 2697863003: color: Clarify default behaviors (Closed)
Patch Set: color: Remove redundant PrimaryID/TransferID/MatrixID values 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: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 07b1bed0b5cb0ae9807b3cfb54061200cf95195b..bce019226fdb5d8669122e1a308ac1289a04e146 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -604,11 +604,9 @@ bool VpxVideoDecoder::VpxDecode(const scoped_refptr<DecoderBuffer>& buffer,
// bitstream data below.
(*video_frame)->set_color_space(config_.color_space_info());
} else {
- gfx::ColorSpace::PrimaryID primaries =
- gfx::ColorSpace::PrimaryID::UNSPECIFIED;
- gfx::ColorSpace::TransferID transfer =
- gfx::ColorSpace::TransferID::UNSPECIFIED;
- gfx::ColorSpace::MatrixID matrix = gfx::ColorSpace::MatrixID::UNSPECIFIED;
+ gfx::ColorSpace::PrimaryID primaries = gfx::ColorSpace::PrimaryID::BT709;
+ gfx::ColorSpace::TransferID transfer = gfx::ColorSpace::TransferID::BT709;
+ gfx::ColorSpace::MatrixID matrix = gfx::ColorSpace::MatrixID::BT709;
gfx::ColorSpace::RangeID range = vpx_image->range == VPX_CR_FULL_RANGE
? gfx::ColorSpace::RangeID::FULL
: gfx::ColorSpace::RangeID::LIMITED;
@@ -651,11 +649,8 @@ bool VpxVideoDecoder::VpxDecode(const scoped_refptr<DecoderBuffer>& buffer,
break;
}
ccameron 2017/02/15 21:57:23 This is a behavior change. The decision of how to
- if (primaries != gfx::ColorSpace::PrimaryID::UNSPECIFIED) {
- (*video_frame)
- ->set_color_space(
- gfx::ColorSpace(primaries, transfer, matrix, range));
- }
+ (*video_frame)
+ ->set_color_space(gfx::ColorSpace(primaries, transfer, matrix, range));
}
return true;

Powered by Google App Engine
This is Rietveld 408576698