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

Side by Side Diff: media/blink/video_frame_compositor.cc

Issue 591313008: Add support for Rec709 color space videos in software YUV convert path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add enum to mojom Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « media/base/yuv_convert_unittest.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/video_frame_compositor.h" 5 #include "media/blink/video_frame_compositor.h"
6 6
7 #include "media/base/video_frame.h" 7 #include "media/base/video_frame.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 static bool IsOpaque(const scoped_refptr<VideoFrame>& frame) { 11 static bool IsOpaque(const scoped_refptr<VideoFrame>& frame) {
12 switch (frame->format()) { 12 switch (frame->format()) {
13 case VideoFrame::UNKNOWN: 13 case VideoFrame::UNKNOWN:
14 case VideoFrame::YV12: 14 case VideoFrame::YV12:
15 case VideoFrame::YV12J: 15 case VideoFrame::YV12J:
16 case VideoFrame::YV12HD:
16 case VideoFrame::YV16: 17 case VideoFrame::YV16:
17 case VideoFrame::I420: 18 case VideoFrame::I420:
18 case VideoFrame::YV24: 19 case VideoFrame::YV24:
19 case VideoFrame::NV12: 20 case VideoFrame::NV12:
20 return true; 21 return true;
21 22
22 case VideoFrame::YV12A: 23 case VideoFrame::YV12A:
23 #if defined(VIDEO_HOLE) 24 #if defined(VIDEO_HOLE)
24 case VideoFrame::HOLE: 25 case VideoFrame::HOLE:
25 #endif // defined(VIDEO_HOLE) 26 #endif // defined(VIDEO_HOLE)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 opacity_changed_cb_.Run(IsOpaque(frame)); 70 opacity_changed_cb_.Run(IsOpaque(frame));
70 } 71 }
71 72
72 current_frame_ = frame; 73 current_frame_ = frame;
73 74
74 if (client_) 75 if (client_)
75 client_->DidReceiveFrame(); 76 client_->DidReceiveFrame();
76 } 77 }
77 78
78 } // namespace media 79 } // namespace media
OLDNEW
« no previous file with comments | « media/base/yuv_convert_unittest.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698