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

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: improve comments Created 4 years, 3 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 1f551669908d6c55923b17005412bd14a49889ab..b91ab06925b697b345098a9321c42c37c096a6d7 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -84,6 +84,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;
}
@@ -322,6 +324,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:
@@ -334,6 +337,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();
danakj 2016/09/22 20:55:20 Please don't both DCHECK and handle the case. Choo
dshwang 2016/09/26 13:02:23 Done. Choose DCHECK
+ return VideoFrameExternalResources();
}
// 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