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

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

Issue 742233002: Implement |pic_order_cnt| computation for VTVideoDecode accelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vt_reorder
Patch Set: Rebase. Created 6 years, 1 month 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 | « no previous file | content/common/gpu/media/vt_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vt_video_decode_accelerator.h
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.h b/content/common/gpu/media/vt_video_decode_accelerator.h
index 2a08421b51b1d5eca59c795662352958e8588d46..327ab590e2b74d134d94ac61862a5596dea2c49d 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator.h
+++ b/content/common/gpu/media/vt_video_decode_accelerator.h
@@ -16,9 +16,9 @@
#include "base/message_loop/message_loop.h"
#include "base/threading/thread.h"
#include "base/threading/thread_checker.h"
-#include "content/common/gpu/media/h264_dpb.h"
#include "content/common/gpu/media/vt.h"
#include "media/filters/h264_parser.h"
+#include "media/video/h264_poc.h"
#include "media/video/video_decode_accelerator.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_context_cgl.h"
@@ -77,9 +77,12 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
int32_t bitstream_id;
// Relative presentation order of this frame (see AVC spec).
- // TODO(sandersd): Reorder window size.
int32_t pic_order_cnt;
+ // Nnumber of frames after this one in decode order that can appear before
+ // before it in presentation order.
+ int32_t reorder_window;
+
// Size of the decoded frame.
// TODO(sandersd): visible_rect.
gfx::Size coded_size;
@@ -100,6 +103,13 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
// Methods for interacting with VideoToolbox. Run on |decoder_thread_|.
//
+ // Compute the |pic_order_cnt| for a frame. Returns true or calls
+ // NotifyError() before returning false.
+ bool ComputePicOrderCnt(
+ const media::H264SPS* sps,
+ const media::H264SliceHeader& slice_hdr,
+ Frame* frame);
+
// Set up VideoToolbox using the current SPS and PPS. Returns true or calls
// NotifyError() before returning false.
bool ConfigureDecoder();
@@ -198,6 +208,7 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
std::vector<uint8_t> last_spsext_;
int last_pps_id_;
std::vector<uint8_t> last_pps_;
+ media::H264POC poc_;
//
// Shared state (set up and torn down on GPU thread).
« no previous file with comments | « no previous file | content/common/gpu/media/vt_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698