| Index: media/base/video_decoder_config.cc
|
| diff --git a/media/base/video_decoder_config.cc b/media/base/video_decoder_config.cc
|
| index 8825e2d615dad96440497fed74f27c236d9c365e..b4802f8b50c74a77d015cb586de7c5366309768b 100644
|
| --- a/media/base/video_decoder_config.cc
|
| +++ b/media/base/video_decoder_config.cc
|
| @@ -9,6 +9,18 @@
|
|
|
| namespace media {
|
|
|
| +VideoFrame::ColorSpace VideoDecoderConfig::DefaultMseColorSpace() {
|
| + return VideoFrame::COLOR_SPACE_HD_REC709;
|
| +}
|
| +
|
| +VideoFrame::ColorSpace VideoDecoderConfig::DefaultSrcColorSpace(
|
| + const gfx::Size& natural_size) {
|
| + if (natural_size.height() < 720)
|
| + return VideoFrame::COLOR_SPACE_SD_REC601;
|
| + else
|
| + return VideoFrame::COLOR_SPACE_HD_REC709;
|
| +}
|
| +
|
| VideoDecoderConfig::VideoDecoderConfig()
|
| : codec_(kUnknownVideoCodec),
|
| profile_(VIDEO_CODEC_PROFILE_UNKNOWN),
|
| @@ -19,13 +31,14 @@ VideoDecoderConfig::VideoDecoderConfig()
|
| VideoDecoderConfig::VideoDecoderConfig(VideoCodec codec,
|
| VideoCodecProfile profile,
|
| VideoFrame::Format format,
|
| + VideoFrame::ColorSpace color_space,
|
| const gfx::Size& coded_size,
|
| const gfx::Rect& visible_rect,
|
| const gfx::Size& natural_size,
|
| const uint8* extra_data,
|
| size_t extra_data_size,
|
| bool is_encrypted) {
|
| - Initialize(codec, profile, format, VideoFrame::COLOR_SPACE_UNSPECIFIED,
|
| + Initialize(codec, profile, format, color_space,
|
| coded_size, visible_rect, natural_size, extra_data,
|
| extra_data_size, is_encrypted, true);
|
| }
|
| @@ -87,6 +100,7 @@ void VideoDecoderConfig::Initialize(VideoCodec codec,
|
| codec_ = codec;
|
| profile_ = profile;
|
| format_ = format;
|
| + color_space_ = color_space;
|
| coded_size_ = coded_size;
|
| visible_rect_ = visible_rect;
|
| natural_size_ = natural_size;
|
| @@ -169,6 +183,10 @@ VideoFrame::Format VideoDecoderConfig::format() const {
|
| return format_;
|
| }
|
|
|
| +VideoFrame::ColorSpace VideoDecoderConfig::color_space() const {
|
| + return color_space_;
|
| +}
|
| +
|
| gfx::Size VideoDecoderConfig::coded_size() const {
|
| return coded_size_;
|
| }
|
|
|