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

Unified Diff: content/common/gpu/media/exynos_video_decode_accelerator.h

Issue 23526070: Remove GSC usage from ExynosVideoDecodeAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: 7e4634ee Functional. Created 7 years, 3 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: content/common/gpu/media/exynos_video_decode_accelerator.h
diff --git a/content/common/gpu/media/exynos_video_decode_accelerator.h b/content/common/gpu/media/exynos_video_decode_accelerator.h
index 7bb41bba94be84b8194ae05aa0c59188d2e3dff4..a4a9fe09900a216eb612d40cd8f07308715f4b83 100644
--- a/content/common/gpu/media/exynos_video_decode_accelerator.h
+++ b/content/common/gpu/media/exynos_video_decode_accelerator.h
@@ -30,7 +30,7 @@ namespace content {
class H264Parser;
// This class handles Exynos video acceleration directly through the V4L2
-// devices exported by the Multi Format Codec and GScaler hardware blocks.
+// device exported by the Multi Format Codec hardware block.
//
// The threading model of this class is driven by the fact that it needs to
// interface two fundamentally different event queues -- the one Chromium
@@ -81,13 +81,6 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
// VideoDecodeAcceleratorImpl implementation.
virtual bool CanDecodeOnIOThread() OVERRIDE;
- // Do any necessary initialization before the sandbox is enabled.
- static void PreSandboxInitialization();
-
- // Lazily initialize static data after sandbox is enabled. Return false on
- // init failure.
- static bool PostSandboxInitialization();
-
private:
// These are rather subjectively tuned.
enum {
@@ -95,7 +88,6 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
// TODO(posciak): determine MFC input buffer size based on level limits.
// See http://crbug.com/255116.
kMfcInputBufferMaxSize = 1024 * 1024,
- kGscInputBufferCount = 4,
// Number of output buffers to use for each VDA stage above what's required
// by the decoder (e.g. DPB size, in H264). We need
// media::limits::kMaxVideoFrames to fill up the GpuVideoDecode pipeline,
@@ -122,7 +114,6 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
// File descriptors we need to poll.
enum PollFds {
kPollMfc = (1 << 0),
- kPollGsc = (1 << 1),
};
// Auto-destruction reference for BitstreamBuffer, for message-passing from
@@ -140,43 +131,23 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
struct MfcInputRecord {
MfcInputRecord();
~MfcInputRecord();
- bool at_device; // held by device.
- void* address; // mmap() address.
- size_t length; // mmap() length.
- off_t bytes_used; // bytes filled in the mmap() segment.
- int32 input_id; // triggering input_id as given to Decode().
+ bool at_device; // held by device.
+ void* address; // mmap() address.
+ size_t length; // mmap() length.
+ off_t bytes_used; // bytes filled in the mmap() segment.
+ int32 input_id; // triggering input_id as given to Decode().
};
// Record for MFC output buffers.
struct MfcOutputRecord {
MfcOutputRecord();
~MfcOutputRecord();
- bool at_device; // held by device.
- size_t bytes_used[2]; // bytes used in each dmabuf.
- void* address[2]; // mmap() address for each plane.
- size_t length[2]; // mmap() length for each plane.
- int32 input_id; // triggering input_id as given to Decode().
- };
-
- // Record for GSC input buffers.
- struct GscInputRecord {
- GscInputRecord();
- ~GscInputRecord();
- bool at_device; // held by device.
- int mfc_output; // MFC output buffer index to recycle when this input
- // is complete.
- };
-
- // Record for GSC output buffers.
- struct GscOutputRecord {
- GscOutputRecord();
- ~GscOutputRecord();
- bool at_device; // held by device.
- bool at_client; // held by client.
- int fd; // file descriptor from backing EGLImage.
- EGLImageKHR egl_image; // backing EGLImage.
- EGLSyncKHR egl_sync; // sync the compositor's use of the EGLImage.
- int32 picture_id; // picture buffer id as returned to PictureReady().
+ bool at_device; // held by device.
+ bool at_client; // held by client.
+ int fds[2]; // file descriptors for each plane.
+ EGLImageKHR egl_image; // EGLImageKHR for the output buffer.
+ EGLSyncKHR egl_sync; // sync the compositor's use of the EGLImage.
+ int32 picture_id; // picture buffer id as returned to PictureReady().
};
//
@@ -220,15 +191,11 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
// Handle the various device queues.
void EnqueueMfc();
void DequeueMfc();
- void EnqueueGsc();
- void DequeueGsc();
// Handle incoming MFC events.
void DequeueMfcEvents();
// Enqueue a buffer on the corresponding queue.
bool EnqueueMfcInputRecord();
bool EnqueueMfcOutputRecord();
- bool EnqueueGscInputRecord();
- bool EnqueueGscOutputRecord();
// Process a ReusePictureBuffer() API call. The API call create an EGLSync
// object on the main (GPU process) thread; we will record this object so we
@@ -302,8 +269,6 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
// Create the buffers we need.
bool CreateMfcInputBuffers();
bool CreateMfcOutputBuffers();
- bool CreateGscInputBuffers();
- bool CreateGscOutputBuffers();
//
// Methods run on child thread.
@@ -312,8 +277,6 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
// Destroy buffers.
void DestroyMfcInputBuffers();
void DestroyMfcOutputBuffers();
- void DestroyGscInputBuffers();
- void DestroyGscOutputBuffers();
void ResolutionChangeDestroyBuffers();
// Our original calling message loop for the child thread.
@@ -403,8 +366,8 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
bool mfc_output_streamon_;
// MFC output buffers enqueued to device.
int mfc_output_buffer_queued_count_;
- // Output buffers ready to use, as a LIFO since we don't care about ordering.
- std::vector<int> mfc_free_output_buffers_;
+ // Output buffers ready to use, as a FIFO since we want oldest-first.
Pawel Osciak 2013/09/30 05:16:25 Document why oldest-first please.
sheu 2013/10/04 23:25:56 Done.
+ std::list<int> mfc_free_output_buffers_;
Pawel Osciak 2013/09/30 05:16:25 std::queue?
sheu 2013/10/04 23:25:56 Can't clear() them.
Pawel Osciak 2013/10/05 00:06:33 https://code.google.com/p/chromium/codesearch#chro
sheu 2013/11/07 02:37:27 Seems kind of... inefficient?
Pawel Osciak 2013/11/07 03:48:46 Seems kind of an... overoptimization? ;) Especiall
// Mapping of int index to MFC output buffer record.
std::vector<MfcOutputRecord> mfc_output_buffer_map_;
// Required size of MFC output buffers. Two sizes for two planes.
@@ -413,30 +376,6 @@ class CONTENT_EXPORT ExynosVideoDecodeAccelerator
// Required size of DPB for decoding.
int mfc_output_dpb_size_;
- // Completed MFC outputs, waiting for GSC.
- std::list<int> mfc_output_gsc_input_queue_;
-
- // GSC decode device.
- int gsc_fd_;
-
- // GSC input buffer state.
- bool gsc_input_streamon_;
- // GSC input buffers enqueued to device.
- int gsc_input_buffer_queued_count_;
- // Input buffers ready to use, as a LIFO since we don't care about ordering.
- std::vector<int> gsc_free_input_buffers_;
- // Mapping of int index to GSC input buffer record.
- std::vector<GscInputRecord> gsc_input_buffer_map_;
-
- // GSC output buffer state.
- bool gsc_output_streamon_;
- // GSC output buffers enqueued to device.
- int gsc_output_buffer_queued_count_;
- // Output buffers ready to use. We need a FIFO here.
- std::list<int> gsc_free_output_buffers_;
- // Mapping of int index to GSC output buffer record.
- std::vector<GscOutputRecord> gsc_output_buffer_map_;
-
// Output picture size.
gfx::Size frame_buffer_size_;

Powered by Google App Engine
This is Rietveld 408576698