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

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: Address comments (other than unittesting). 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
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..10dc319e895120983872b286603d41087827dd4c 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator.h
+++ b/content/common/gpu/media/vt_video_decode_accelerator.h
@@ -16,7 +16,7 @@
#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/h264_poc.h"
#include "content/common/gpu/media/vt.h"
#include "media/filters/h264_parser.h"
#include "media/video/video_decode_accelerator.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_;
+ H264POC poc_;
//
// Shared state (set up and torn down on GPU thread).

Powered by Google App Engine
This is Rietveld 408576698