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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 2113243003: media: Introduce Y8 and Y16 video pixel format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: error handling when bits_per_channel == 16 Created 4 years, 5 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 | « no previous file | media/base/video_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index ae02820d071d3d7042ab4d0f15ba50caa59da656..2a3cb4700e6f74f8909d13f6c5334c4765b8ab15 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -83,6 +83,8 @@ VideoFrameExternalResources::ResourceType ResourceTypeForVideoFrame(
case media::PIXEL_FORMAT_YUV420P10:
case media::PIXEL_FORMAT_YUV422P10:
case media::PIXEL_FORMAT_YUV444P10:
+ case media::PIXEL_FORMAT_Y8:
+ case media::PIXEL_FORMAT_Y16:
case media::PIXEL_FORMAT_UNKNOWN:
break;
}
@@ -270,6 +272,7 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
case media::PIXEL_FORMAT_RGB32:
case media::PIXEL_FORMAT_MJPEG:
case media::PIXEL_FORMAT_MT21:
+ case media::PIXEL_FORMAT_Y8:
bits_per_channel = 8;
break;
case media::PIXEL_FORMAT_YUV420P9:
@@ -282,6 +285,15 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
case media::PIXEL_FORMAT_YUV444P10:
bits_per_channel = 10;
break;
+ case media::PIXEL_FORMAT_Y16:
+ bits_per_channel = 16;
+ break;
+ }
+
+ // TODO(dshwang): support PIXEL_FORMAT_Y16. crbug.com/624436
+ if (bits_per_channel == 16) {
+ NOTREACHED();
+ return VideoFrameExternalResources();
}
dshwang 2016/07/07 18:11:38 Add error handling code.
// Only YUV software video frames are supported.
« no previous file with comments | « no previous file | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698