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

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: Fix matrix error 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
Index: media/base/video_frame.cc
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index acdc5a2475bbe8695d78fcfe745b40f24b93dd2a..0841728064effe732870577814cc294f2ad3856c 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:
@@ -159,6 +160,8 @@ std::string VideoFrame::FormatToString(VideoFrame::Format format) {
return "NV12";
case VideoFrame::YV24:
return "YV24";
+ case VideoFrame::YV12HD:
+ return "YV12HD";
}
NOTREACHED() << "Invalid videoframe format provided: " << format;
return "";
@@ -201,6 +204,7 @@ bool VideoFrame::IsValidConfig(VideoFrame::Format format,
case VideoFrame::I420:
case VideoFrame::YV12A:
case VideoFrame::NV12:
+ case VideoFrame::YV12HD:
case VideoFrame::YV16:
// Check that software-allocated buffer formats are aligned correctly and
// not empty.
@@ -528,6 +532,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:
@@ -591,7 +596,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') | media/base/yuv_convert.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698