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

Unified Diff: media/gpu/vaapi_wrapper.cc

Issue 2678343011: chromeos: decode video into NV12 format instead of RGBA in vaapi decoder (Closed)
Patch Set: decide scanout in runtime Created 3 years, 6 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/gpu/vaapi_wrapper.cc
diff --git a/media/gpu/vaapi_wrapper.cc b/media/gpu/vaapi_wrapper.cc
index 5146f43651a082ba795c3cd2dcc152fa4527ee3b..ec76e5e4b7f7b3872d889ff5f2379eb9783d4eb6 100644
--- a/media/gpu/vaapi_wrapper.cc
+++ b/media/gpu/vaapi_wrapper.cc
@@ -74,6 +74,8 @@ uint32_t BufferFormatToVAFourCC(gfx::BufferFormat fmt) {
return VA_FOURCC_UYVY;
case gfx::BufferFormat::YVU_420:
return VA_FOURCC_YV12;
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
+ return VA_FOURCC_NV12;
default:
NOTREACHED();
return 0;
@@ -88,6 +90,7 @@ uint32_t BufferFormatToVARTFormat(gfx::BufferFormat fmt) {
case gfx::BufferFormat::BGRA_8888:
return VA_RT_FORMAT_RGB32;
case gfx::BufferFormat::YVU_420:
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
return VA_RT_FORMAT_YUV420;
default:
NOTREACHED();
@@ -642,7 +645,7 @@ scoped_refptr<VASurface> VaapiWrapper::CreateVASurfaceForPixmap(
va_attrib_extbuf.buffers = fds.data();
va_attrib_extbuf.num_buffers = fds.size();
- va_attrib_extbuf.flags = 0;
+ va_attrib_extbuf.flags = VA_SURFACE_EXTBUF_DESC_ENABLE_TILING;
va_attrib_extbuf.private_data = NULL;
std::vector<VASurfaceAttrib> va_attribs(2);

Powered by Google App Engine
This is Rietveld 408576698