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

Unified Diff: media/video/h264_poc.h

Issue 2661423002: VTVDA: Optimize pic_order_cnt_type == 2. (Closed)
Patch Set: Update unit test. Created 3 years, 9 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
« no previous file with comments | « media/gpu/vt_video_decode_accelerator_mac.cc ('k') | media/video/h264_poc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/h264_poc.h
diff --git a/media/video/h264_poc.h b/media/video/h264_poc.h
index a2319cacd005b2cc6f775a1124973304a2161f31..90d0eb904cf54b71cc85999cce42867b5501cee4 100644
--- a/media/video/h264_poc.h
+++ b/media/video/h264_poc.h
@@ -21,11 +21,21 @@ class MEDIA_EXPORT H264POC {
// Compute the picture order count for a slice, storing the result into
// |*pic_order_cnt|.
+ // TODO(sandersd): Switch to a base::Optional<int32_t> return type.
bool ComputePicOrderCnt(
const H264SPS* sps,
const H264SliceHeader& slice_hdr,
int32_t* pic_order_cnt);
+ // As specified, the POC of a frame with MMCO5 changes (to zero) after
+ // decoding. We instead return 0 immediately, and flag that this has occurred
+ // by returning true here until ComputePicOrderCnt() is called again.
+ //
+ // Frames with MMCO5 do not reorder relative to frames earlier in decode
+ // order, but may reorder relative to frames later in decode order (just like
+ // IDRs).
+ bool IsPendingMMCO5() { return pending_mmco5_; }
+
// Reset computation state. It's best (although not strictly required) to call
// this after a seek.
void Reset();
@@ -35,6 +45,7 @@ class MEDIA_EXPORT H264POC {
int32_t ref_pic_order_cnt_lsb_;
int32_t prev_frame_num_;
int32_t prev_frame_num_offset_;
+ bool pending_mmco5_;
DISALLOW_COPY_AND_ASSIGN(H264POC);
};
« no previous file with comments | « media/gpu/vt_video_decode_accelerator_mac.cc ('k') | media/video/h264_poc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698