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

Unified Diff: media/gpu/v4l2_device.cc

Issue 2260123002: V4L2VDA: use YV12 as output format if processor supports it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Pawel's comments Created 4 years, 4 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/gpu/generic_v4l2_device.cc ('k') | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/v4l2_device.cc
diff --git a/media/gpu/v4l2_device.cc b/media/gpu/v4l2_device.cc
index 0550438bb71ab4ce3cc08ce796b69aaa2b73ccb5..067bcd0df5ff234ef702888427b990ff6365173e 100644
--- a/media/gpu/v4l2_device.cc
+++ b/media/gpu/v4l2_device.cc
@@ -51,6 +51,9 @@ VideoPixelFormat V4L2Device::V4L2PixFmtToVideoPixelFormat(uint32_t pix_fmt) {
case V4L2_PIX_FMT_YUV420M:
return PIXEL_FORMAT_I420;
+ case V4L2_PIX_FMT_YVU420:
+ return PIXEL_FORMAT_YV12;
+
case V4L2_PIX_FMT_RGB32:
return PIXEL_FORMAT_ARGB;
@@ -72,6 +75,9 @@ uint32_t V4L2Device::VideoPixelFormatToV4L2PixFmt(VideoPixelFormat format) {
case PIXEL_FORMAT_I420:
return V4L2_PIX_FMT_YUV420M;
+ case PIXEL_FORMAT_YV12:
+ return V4L2_PIX_FMT_YVU420;
+
default:
LOG(FATAL) << "Add more cases as needed";
return 0;
@@ -110,6 +116,9 @@ uint32_t V4L2Device::V4L2PixFmtToDrmFormat(uint32_t format) {
case V4L2_PIX_FMT_YUV420M:
return DRM_FORMAT_YUV420;
+ case V4L2_PIX_FMT_YVU420:
+ return DRM_FORMAT_YVU420;
+
case V4L2_PIX_FMT_RGB32:
return DRM_FORMAT_ARGB8888;
« no previous file with comments | « media/gpu/generic_v4l2_device.cc ('k') | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698