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

Unified Diff: media/filters/h264_parser.cc

Issue 2697863003: color: Clarify default behaviors (Closed)
Patch Set: Incorporate review feedback 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
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/h264_parser.cc
diff --git a/media/filters/h264_parser.cc b/media/filters/h264_parser.cc
index 052f441d258bc77a38f9e313ceb84bcffd5e584c..9b178081fbb31a49dd837a23679601ccd913db4d 100644
--- a/media/filters/h264_parser.cc
+++ b/media/filters/h264_parser.cc
@@ -125,17 +125,17 @@ base::Optional<gfx::Rect> H264SPS::GetVisibleRect() const {
// available from http://www.itu.int/rec/T-REC-H.264.
gfx::ColorSpace H264SPS::GetColorSpace() const {
if (colour_description_present_flag) {
- return gfx::ColorSpace(
+ return gfx::ColorSpace::CreateVideo(
colour_primaries, transfer_characteristics, matrix_coefficients,
video_full_range_flag ? gfx::ColorSpace::RangeID::FULL
: gfx::ColorSpace::RangeID::LIMITED);
} else {
- return gfx::ColorSpace(gfx::ColorSpace::PrimaryID::UNSPECIFIED,
- gfx::ColorSpace::TransferID::UNSPECIFIED,
- gfx::ColorSpace::MatrixID::UNSPECIFIED,
- video_full_range_flag
- ? gfx::ColorSpace::RangeID::FULL
- : gfx::ColorSpace::RangeID::LIMITED);
+ // TODO(ccameron/hubbe): Add a uniform way to handle default video frames.
+ return gfx::ColorSpace(
+ gfx::ColorSpace::PrimaryID::BT709, gfx::ColorSpace::TransferID::BT709,
+ gfx::ColorSpace::MatrixID::BT709,
+ video_full_range_flag ? gfx::ColorSpace::RangeID::FULL
+ : gfx::ColorSpace::RangeID::LIMITED);
}
}
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698