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

Unified Diff: media/base/video_frame.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/video_frame.h ('k') | media/base/yuv_convert.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 32c203ceadb8b0bf67c368899a21129b28507517..629d1a7d3e84bc361270f4cebeb337dabe4f0a22 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -57,6 +57,7 @@ static gfx::Size SampleSize(VideoFrame::Format format, size_t plane) {
case VideoFrame::YV12:
case VideoFrame::YV12J:
+ case VideoFrame::YV12HD:
case VideoFrame::I420:
case VideoFrame::YV12A:
case VideoFrame::NV12:
@@ -123,6 +124,7 @@ scoped_refptr<VideoFrame> VideoFrame::CreateFrame(
case VideoFrame::YV12A:
case VideoFrame::YV12J:
case VideoFrame::YV24:
+ case VideoFrame::YV12HD:
break;
case VideoFrame::UNKNOWN:
@@ -181,6 +183,8 @@ std::string VideoFrame::FormatToString(VideoFrame::Format format) {
return "YV24";
case VideoFrame::ARGB:
return "ARGB";
+ case VideoFrame::YV12HD:
+ return "YV12HD";
}
NOTREACHED() << "Invalid videoframe format provided: " << format;
return "";
@@ -223,6 +227,7 @@ bool VideoFrame::IsValidConfig(VideoFrame::Format format,
case VideoFrame::I420:
case VideoFrame::YV12A:
case VideoFrame::NV12:
+ case VideoFrame::YV12HD:
case VideoFrame::YV16:
case VideoFrame::ARGB:
// Check that software-allocated buffer formats are aligned correctly and
@@ -555,6 +560,7 @@ size_t VideoFrame::NumPlanes(Format format) {
case VideoFrame::YV16:
case VideoFrame::I420:
case VideoFrame::YV12J:
+ case VideoFrame::YV12HD:
case VideoFrame::YV24:
return 3;
case VideoFrame::YV12A:
@@ -628,7 +634,8 @@ static void ReleaseData(uint8* data) {
void VideoFrame::AllocateYUV() {
DCHECK(format_ == YV12 || format_ == YV16 || format_ == YV12A ||
- format_ == I420 || format_ == YV12J || format_ == YV24);
+ format_ == I420 || format_ == YV12J || format_ == YV24 ||
+ format_ == YV12HD);
static_assert(0 == kYPlane, "y plane data must be index 0");
size_t data_size = 0;
« no previous file with comments | « media/base/video_frame.h ('k') | media/base/yuv_convert.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698