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

Unified Diff: media/gpu/vaapi_video_decode_accelerator.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_video_decode_accelerator.cc
diff --git a/media/gpu/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi_video_decode_accelerator.cc
index 4c80a0dec1f4f694bcf9971bb874671c9c8c1546..2fd7a46297be3c50636c50da4d1a0d3f2e92e5f2 100644
--- a/media/gpu/vaapi_video_decode_accelerator.cc
+++ b/media/gpu/vaapi_video_decode_accelerator.cc
@@ -41,7 +41,9 @@ enum VAVDADecoderFailure {
// Buffer format to use for output buffers backing PictureBuffers. This is the
// format decoded frames in VASurfaces are converted into.
-const gfx::BufferFormat kAllocatePictureFormat = gfx::BufferFormat::BGRA_8888;
+const gfx::BufferFormat kAllocatePictureFormat =
+ gfx::BufferFormat::YUV_420_BIPLANAR;
+
const gfx::BufferFormat kImportPictureFormat = gfx::BufferFormat::YVU_420;
}
@@ -698,6 +700,9 @@ static VideoPixelFormat BufferFormatToVideoPixelFormat(
case gfx::BufferFormat::YVU_420:
return PIXEL_FORMAT_YV12;
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
+ return PIXEL_FORMAT_NV12;
+
default:
LOG(FATAL) << "Add more cases as needed";
return PIXEL_FORMAT_UNKNOWN;

Powered by Google App Engine
This is Rietveld 408576698