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 a119f0fd16b039ddefc831c5be2fef71e14837de..f20e488b9a7b5ece41cfd2d314b92c95367a93c5 100644 |
--- a/media/gpu/vaapi_video_decode_accelerator.cc |
+++ b/media/gpu/vaapi_video_decode_accelerator.cc |
@@ -41,7 +41,10 @@ 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; |
+// gfx::BufferFormat::UYVY_422; |
+// gfx::BufferFormat::BGRA_8888; |
+const gfx::BufferFormat kAllocatePictureFormat = gfx::BufferFormat::YUYV_422; |
+ |
const gfx::BufferFormat kImportPictureFormat = gfx::BufferFormat::YVU_420; |
} |
@@ -433,6 +436,7 @@ void VaapiVideoDecodeAccelerator::OutputPicture( |
// (crbug.com/402760). Passing (0, 0) results in the client using the |
// visible size extracted from the container instead. |
// TODO(hubbe): Use the correct color space. http://crbug.com/647725 |
+ PLOG(ERROR) << "Video decoder ready with format "; |
if (client_) |
client_->PictureReady(Picture(output_id, input_id, gfx::Rect(0, 0), |
gfx::ColorSpace(), picture->AllowOverlay())); |
@@ -668,6 +672,12 @@ static VideoPixelFormat BufferFormatToVideoPixelFormat( |
case gfx::BufferFormat::YVU_420: |
return PIXEL_FORMAT_YV12; |
+ case gfx::BufferFormat::UYVY_422: |
+ return PIXEL_FORMAT_UYVY; |
+ |
+ case gfx::BufferFormat::YUYV_422: |
+ return PIXEL_FORMAT_YUY2; |
+ |
default: |
LOG(FATAL) << "Add more cases as needed"; |
return PIXEL_FORMAT_UNKNOWN; |
@@ -714,6 +724,7 @@ void VaapiVideoDecodeAccelerator::TryFinishSurfaceSetChange() { |
<< " pictures of size: " << requested_pic_size_.ToString(); |
VideoPixelFormat format = BufferFormatToVideoPixelFormat(output_format_); |
+ PLOG(ERROR) << "Request video pixel buffer " << format; |
task_runner_->PostTask( |
FROM_HERE, base::Bind(&Client::ProvidePictureBuffers, client_, |
requested_num_pics_, format, 1, requested_pic_size_, |