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

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: Created 6 years, 2 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
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 opacity_changed_cb_.Run(IsOpaque(frame)); 69 opacity_changed_cb_.Run(IsOpaque(frame));
69 } 70 }
70 71
71 current_frame_ = frame; 72 current_frame_ = frame;
72 73
73 if (client_) 74 if (client_)
74 client_->DidReceiveFrame(); 75 client_->DidReceiveFrame();
75 } 76 }
76 77
77 } // namespace media 78 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698