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

Unified Diff: media/gpu/v4l2_jpeg_decode_accelerator.h

Issue 2559423002: media/gpu: switch v4l2_jpeg_decode_accelerator to use multi-planar APIs (Closed)
Patch Set: address the review comments Created 4 years 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/v4l2_device.cc ('k') | media/gpu/v4l2_jpeg_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/v4l2_jpeg_decode_accelerator.h
diff --git a/media/gpu/v4l2_jpeg_decode_accelerator.h b/media/gpu/v4l2_jpeg_decode_accelerator.h
index b2824946b9a812bc15c0bc6d8d67071692024417..156585fd8f0d812c36f26d0a9389d5de4a08596f 100644
--- a/media/gpu/v4l2_jpeg_decode_accelerator.h
+++ b/media/gpu/v4l2_jpeg_decode_accelerator.h
@@ -46,8 +46,8 @@ class MEDIA_GPU_EXPORT V4L2JpegDecodeAccelerator
struct BufferRecord {
BufferRecord();
~BufferRecord();
- void* address; // mmap() address.
- size_t length; // mmap() length.
+ void* address[VIDEO_MAX_PLANES]; // mmap() address.
+ size_t length[VIDEO_MAX_PLANES]; // mmap() length.
// Set true during QBUF and DQBUF. |address| will be accessed by hardware.
bool at_device;
@@ -82,6 +82,14 @@ class MEDIA_GPU_EXPORT V4L2JpegDecodeAccelerator
void DestroyInputBuffers();
void DestroyOutputBuffers();
+ // Convert |output_buffer| to I420 and copy the result to |dst_frame|.
+ // The function can convert to I420 from the following formats:
+ // - All splane formats that libyuv::ConvertToI420 can handle.
+ // - V4L2_PIX_FMT_YUV_420M
+ // - V4L2_PIX_FMT_YUV_422M
+ bool ConvertOutputImage(const BufferRecord& output_buffer,
+ const scoped_refptr<VideoFrame>& dst_frame);
+
// Return the number of input/output buffers enqueued to the device.
size_t InputBufferQueuedCount();
size_t OutputBufferQueuedCount();
@@ -127,6 +135,9 @@ class MEDIA_GPU_EXPORT V4L2JpegDecodeAccelerator
// Pixel format of output buffer.
uint32_t output_buffer_pixelformat_;
+ // Number of physical planes the output buffers have.
+ size_t output_buffer_num_planes_;
+
// ChildThread's task runner.
scoped_refptr<base::SingleThreadTaskRunner> child_task_runner_;
« no previous file with comments | « media/gpu/v4l2_device.cc ('k') | media/gpu/v4l2_jpeg_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698